Commit Graph

167 Commits

Author SHA1 Message Date
sudlud
e447351b0f fix(Core/Creature): Remove automated z spawn correction (#18200)
* fix(Core/Creature): Remove automated z spawn correction

* comment out unused parameter

* remove gridLoad parameter from Creature::LoadCreatureFromDB()
2024-01-21 07:33:00 -03:00
Andrew
a11434b24f refactor(Core/GameObject): Move the GameObject state save handling to… (#18080)
* refactor(Core/GameObject): Move the GameObject state save handling to instance level

* Update GameObject.h

* remove leftover

* small improvements
2024-01-01 01:51:33 -03:00
IntelligentQuantum
258e369ee5 chore(Core): remove useless includes (#18036) 2023-12-23 12:16:27 -03:00
Kitzunu
4fb0464b60 fix(Core/Quest): Throw error if quest_template RewardItemId is not se… (#17924)
fix(Core/Quest): Throw error if quest_template RewardItemId is not set in order

* closes https://github.com/azerothcore/azerothcore-wotlk/issues/17740
2023-12-03 13:38:51 +01:00
Winfidonarleyan
eb1ecc38a5 feat(Core/Scripting): move all script objects to separated files (#17860)
* feat(Core/Scripts): move all script objects to separated files

* Apply 5bfeabde81

* try gcc build

* again
2023-12-02 21:13:20 +01:00
Kitzunu
5bfeabde81 chore(Core/Misc): rename spellInfo pointers (#17914)
* Rename all
2023-12-02 06:03:15 -03:00
Winfidonarleyan
e90d7a2f92 chore(Core/Misc): sort includes (#17776)
* chore(Cleanup): sort includes

* fix build

* fix build again
2023-11-18 17:51:26 +01:00
KJack
751ffc7c70 feat(Core/Hooks): Add OnAfterDatabaseLoadCreatureTemplates hook (#17621)
* Add OnAfterDatabaseLoadCreatureTemplates hook
- fix issue where the fast template cache was not updated correctly after a CS reload of a single creature template

* Parameter naming tweak to reduce confusion.

* Refactor to streamline fastcache creation, remove threading concerns

* Remove unneeded resize when loading creature templates

* Update fast cache resizing to highest-performing option
2023-10-31 06:58:45 -03:00
Alyst3r
2e55cad450 refactor(DB/reputation_spillover_template): Reputation spillover table expansion (#14763)
* Update ObjectMgr.cpp

Rework to `ObjectMgr::LoadReputationSpilloverTemplate()` allowing more factons to be added.

* Create reputation_spillover_template-update.sql

Alteration to `reputation_spillover_template` table, update allowing to add two more factions.

* Update SharedDefines.h

`MAX_SPILLOVER_FACTIONS` is now equal 6 instead of 4.

* Update reputation_spillover_template-update.sql

Now it alters table instead recreating it.
2023-10-22 04:45:50 +02:00
Matthew M Dean
bc6a744538 fix(Core/Item): Reduce amount of excessive logging for enforeDBCAttributes (#16508)
bypass code block if enforceDBCAttributes is set to false
2023-09-17 21:00:37 +02:00
Benjamin Jackson
358a1e71e0 refactor(DB/Player): Unify two player stat tables. (#17188)
* Init.

Change query table names, move data to existing table.

* Combine two player stat loading functions.
2023-09-15 02:35:26 +02:00
Francesco Borzì
5d01b700fd refactor(Core): remove unused imports (#17094) 2023-08-28 13:39:43 +02:00
Kitzunu
a369402f4b fix(DB/Gossip): Change MenuID to INT from SMALLINT (#16982)
* fix(DB/Gossip): Change MenuID to INT from SMALLINT

* update cpp
2023-08-12 19:49:43 +02:00
cTrinity
64a7c59b57 fix(Core/ObjectMgr.cpp): Wrong format occurred (invalid format string) (#16168)
* fix(Core/ObjectMgr.cpp): Wrong format occurred (invalid format string)

Wrong format occurred (invalid format string)

* fix(Core/ObjectMgr.cpp): Wrong format occurred (invalid format string)

* fix(Core/ObjectMgr.cpp): Wrong format occurred (invalid format string)

Co-authored-by: Angelo Venturini <nefertum.dev@protonmail.com>

---------

Co-authored-by: Angelo Venturini <nefertum.dev@protonmail.com>
2023-05-13 14:40:46 -03:00
M'Dic
7e58650cf5 revert(Core): ChrRace.dbc full implementation (#16114)
* revert (core): ChrRace.dbc full implementation

we revert this due to several issues arrising. Although the dbc reading is done in full and correctly. Azerothcore relied on the original handling (althought not propper) for so long that  there is

* revert

* Update remove_charrace_dbc.sql

* Update remove_charrace_dbc.sql

* Update remove_charrace_dbc.sql
2023-04-29 08:23:11 -03:00
M'Dic
3eae4c5713 fix(core/dbc): improve ChrRace DBC handling (#14843)
Cherry pick of https://github.com/TrinityCore/TrinityCore/pull/24508

Co-authored-by: HelloKitty <5829095+HelloKitty@users.noreply.github.com>
2023-04-28 01:29:33 +02:00
M'Dic
ab2c062f03 feat(core\dbc): item.dbc, sItemStore, item_dbc, item enforcement conf, subclass fix (#14675)
feat (core\log\db): item.dbc and enforcement

dbc enforcement partial pick from tc: 0c44bd33ee

Custom Item for testing by menevia16a (SPP DEV VEIL)

feat (core\log\db): item.dbc and enforcement

Update Item.sql

Update DBCStores.cpp

Update World.cpp

Update ObjectMgr.cpp

further replacement from template to dbc lookup

further logging and implementation

cherry pick tc fd26c3c87c

replace with db lookup

update (sql): Murder all the backticks

line break fixit

fix (item_template): fix incorrect subclass

fix incorrect subclass matching with dbc enforcement

update: log correction for sub class

update log correction for sub class

add subclass to dbc enforcement

add subclass dbc enforcement since it is part of the item.dbc item_dbc

update (log): additional log

Co-authored-by: blub <trinity.michael_vincent@gmx.eu>
Co-authored-by: Shocker <511388+shocker@users.noreply.github.com>
Co-authored-by: Veil <1913466+menevia16a@users.noreply.github.com>
Co-authored-by: Shocker <43253032+shockerqt@users.noreply.github.com>
2023-04-28 01:26:44 +02:00
天鹿
df77b5f4f7 chore(core): cleanup code p3 (#16073)
* Update MMapMgr.cpp

* Update UpdateFetcher.cpp

* Update AuctionHouseMgr.cpp

* Update AuctionHouseMgr.h

* Update BattlegroundAV.cpp

* Update ChannelMgr.cpp

* Update ThreatMgr.h

* Update Player.h

* Update PlayerSettings.cpp

* Update ObjectMgr.cpp

* Update Guild.cpp

* Update Guild.h

* Update Map.cpp

* Update World.cpp

* Update boss_nefarian.cpp

* Update boss_prince_malchezaar.cpp

* Update boss_venoxis.cpp

* Update zone_elwynn_forest.cpp

* Update zulfarrak.cpp

* Update boss_novos.cpp
2023-04-24 08:13:07 -03:00
ZhengPeiRu21
0667454dd9 feat: Allow Float Rep Values (#15818) 2023-04-22 10:42:00 -03:00
Kitzunu
9eb4b3a336 feat(Core/Character): Implement profanity_name (#15156) 2023-03-04 17:43:14 -03:00
Kitzunu
5a9aeada12 feat(Core/DBC): Implement NamesProfanity and NamesReserved DBC (#14956) 2023-02-12 10:51:42 +01:00
Skjalf
66f4feb1da chore(DB/SQL): Correct file to comply with standards (#14953) 2023-02-11 19:50:19 -03:00
Pedro Antonio
2e6c28c4d8 feat(Core/Pet): DK Petname generation locale (#14059) 2023-02-11 18:21:43 -03:00
Kitzunu
409c7356ea refactor(Core/ObjectMgr): Load Creatures.CustomIDs into stores (#14835) 2023-02-05 09:32:41 -03:00
Skjalf
dba8c49bce chore(Core/Object): Rename GetGOData() to GetGameObjectData() (#14875) 2023-02-05 08:35:52 -03:00
Benjamin Jackson
916d4f50da chore(Core/ObjectMgr): Adjust a few comments/logs to reflect recent changes with stat handling. (#14759) 2023-01-26 05:29:44 -03:00
Benjamin Jackson
4e2270c935 feat(Core/ObjectMgr): Add handling specific to heroic player level stats (DKs). (#14378) 2023-01-25 13:14:31 -03:00
M'Dic
437d93926f fix (core): macos12 depreciation workflow error / security CWE-120 (#14746)
* fix (core): macos12 depreciation workflow error

Fix workflow error message:
azerothcore-wotlk/src/common/Utilities/Util.cpp:558:9: fatal error: 'sprintf' is deprecated: This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead. [-Wdeprecated-declarations]
        sprintf(buffer, "%02X", bytes[i]);

* Update BattlegroundAV.cpp

* more macos12 fixit

* Update spell_generic.cpp
2023-01-23 06:13:27 -05:00
Kitzunu
aecf278cbe chore(Core/Docs): Remvoe old comment (#14684)
* fixed in e322c017ea
2023-01-15 14:30:48 +01:00
Revision
1c523bd611 feat(Core/Config): Allow disable points of interest for quests (#14501) 2023-01-04 20:30:57 -03:00
Benjamin Jackson
5534455c32 refactor(Core/player_levelstats): Split player_levelstats into class and race specific tables. (#14383)
Co-authored-by: ahchxj2416 <64737877+ahchxj2416@users.noreply.github.com>
Co-authored-by: Shauren <shauren.trinity@gmail.com>
Co-authored-by: funjoker <torti-esser@web.de>
2023-01-02 21:04:08 +01:00
Kitzunu
4870b14b1f refactor(Core/Object): getLevel() -> GetLevel() (#14122)
* refactor(Core/Object): getLevel() -> GetLevel()

* fix build and sneak some doxygen in

* codeSTLE

* codestyle
2022-12-31 17:39:23 +01:00
UltraNix
f3820bd375 fix(Core/Players): Players should nt able to rest in unfriendly taver… (#13493)
* fix(Core/Players): Players should nt able to rest in unfriendly taverns. Original author: @Rushor

Fixes #13459

* Update.
2022-10-29 07:15:18 -03:00
M'Dic
967f8ce6d6 update (core): Startup console capitalizations (#13195) 2022-10-01 13:09:34 -04:00
ZhengPeiRu21
fbf65ebc9d feat(Core): Allow negative resistance values (#12958)
* feat(Core): Allow negative resistance values

* Add SQL
2022-09-25 10:45:22 -03:00
Benjamin Jackson
fc2433cf9e fix(Scripts/Mail) Fix faction server mail rewards. (#12593)
* Create blackrock-drakes.sql

* Switch some things around.

* DELETE IT AGAIN
2022-07-31 09:43:40 -04:00
UltraNix
0b0a142580 feat(Core/Entities): Enabled loading basic stats for players, pets an… (#12394)
* feat(Core/Entities): Enabled loading basic stats for players, pets and items from database as 32 bit integers.

Closes #12386
2022-07-23 12:12:07 -04:00
Nefertumm
9b6da94510 fix(Core/AI): more AI factory checks (#12402)
Co-authored-by: ariel- <ariel-@users.noreply.github.com>
Co-authored-by: Treeston <treeston@users.noreply.github.com>
Co-authored-by: Aokromes <aokromes@users.noreply.github.com>
2022-07-19 14:31:03 -03:00
Julio A. Leyva Osorio
37c1ce5e36 fix(core): Npc gossip error logging (#11999) 2022-06-24 12:35:25 -03:00
Nefertumm
396fd35ed5 fix(Core/Spells): Implement SPELL_EFFECT_ACTIVATE_OBJECT (#11648)
Co-authored-by: jackpoz <giacomopoz@gmail.com>
2022-06-13 21:10:31 -03:00
Hanabi
a6a2ca8ef7 feat(Core/GameObjects): Instance gameobject save data implementation (#11113)
* fix(Core): Save gameobject state on instances

Currently, azerothcore doesn't save gameobject states on instances.
Whenever there's a re-start or crash, the instance's gameobjects and
their states aren't saved, producing un-wanted behaviours and blocking instances at times.

Implemented CRUD for new table `instance_saved_data` that holds the states of gameobjects.

- When worldserver launches and gameobjects are loaded, this will check
  if this object's state exists on the DB and sets the previous state.
- On instance deletion (reset) these states are also removed based on
  the instance ID.
- Whenever a gameobject state changes inside a dungeon or raid, we save
  on the database the set state.

* Select query to synchronous and used FindMap()

* loading gameobject states on create

* reseting instance saved data

* missing reset methods and on create state

* database structure

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/Player/PlayerMisc.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Groups/Group.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* codestyle

* table changes

* table style

* codestyle

* table changes for columns

* data sanitization

* todo:

- Finish loading db data into the containers
- Using containers to find data
- How to get data from ObjectMGR inside Gameobject?

* loading on start up and db changes

* Removing unused data structure

* Uninitialised integer

* Whitespace

* clean-up and hooks to save states on memory

* Codestyle MySQL deprecated backticks

* i dont understand codefactor

* build

* Update data/sql/updates/pending_db_world/rev_1643395587559675400.sql

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Globals/ObjectMgr.h

Co-authored-by: Kargatum <dowlandtop@yandex.com>

* review changes

* unecessary removal

* pushback instead of emplace

* wrong database update

* Update ObjectMgr.cpp

* missing check

* removing entry from the PR

* missing removals

* last delete

* build

* aha! Found the culprit for the sudden assert errors

* type safety, save only important gameobjects

* static cast to unsigned short

* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* type changes

* queries fix

* fix build

* enabling which gameobjects to save on the database

* deadmines iron clad door

* Adjustment to gameobject onj create state and instances:

- Gnomeregan doors and Grubbis boss state
- Deadmines missing doors
- Stratholme gameobjects state saved

* forgot emi blastfuse change to despawn

* Leaving group logic

* codestyle

* fixing merge issues

* prevent bad behaviour

* brain meltdown

* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql

* Update data/sql/updates/pending_db_world/rev_1649359139539727000.sql

Co-authored-by: Claudiodfc <54484196+claudiodfc@users.noreply.github.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Kargatum <dowlandtop@yandex.com>
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
2022-05-24 10:33:45 -03:00
Kitzunu
c55c4aa015 feat(Core/Creature): CREATURE_FLAG_EXTRA_MODULE (#11445)
* feat(Core/Creature): CREATURE_FLAG_EXTRA_MODULE

* Update CreatureData.h

* Update CreatureData.h

* Update CreatureData.h

* Update enuminfo_CreatureData.cpp

* Update enuminfo_CreatureData.cpp

* Update enuminfo_CreatureData.cpp

Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
2022-04-23 16:22:17 +02:00
Kitzunu
1501445b0a chore(Core/Misc): nullptr cleanup (#11467) 2022-04-21 19:17:20 +02:00
Kitzunu
7ecd738674 feat(Core/Mail): Server mail (#10628) 2022-04-19 23:43:14 +02:00
UltraNix
f0eb6d36a3 fix(Core/Handlers): Faction Change service properly reset and give ne… (#9729)
Fixes #7981
Fixes #8732
2022-03-25 11:45:07 +01:00
Bogir[rus]
75439773d0 fix and bringing to a unified style warnings of server loading logs to be more visible at server startup (#10970) 2022-03-12 04:57:26 -03:00
Bogir[rus]
e05cfe5737 fix (Console): count of Broadcast Text Locales shown by logger on server start (#10942) 2022-03-09 08:11:08 -05:00
Kitzunu
d927ce6fac feat(Core/Creature): Implement quest_greetings table (#10526)
* cherry-pick commit (6dda09818d)

Co-Authored-By: ForesterDev <11771800+ForesterDev@users.noreply.github.com>
Co-Authored-By: Giacomo Pozzoni <giacomopoz@gmail.com>
2022-03-06 18:19:08 +01:00
UltraNix
73957b95f6 fix(Core/Mail): do not show expired mails in packets (#10560)
Fixed #5920
2022-03-01 13:57:37 +01:00
Kitzunu
455899dc75 fix(Core/Misc): Change const to be after type name (#10591) 2022-02-14 16:05:45 -03:00