* Core/Shared: Make WeatherType smart
* Scripts/Commands: Convert argument parsing of some misc commands to new system
(cherry picked from commit 5bab0e43c6)
* Core/Pet: Attempt to fix an assertion triggered when re-summoning the current pet
* Core/Pet: Attempt to fix an assertion triggered when stabling a pet while in a vehicle
* Core/Pet: Attempt to fix an assertion triggered when stabling a pet and casting spell 6962
* Core/Pet: Attempt to fix an assertion triggered when casting spell 6962 while being dead
* Core/Pet: Attempt to fix an assertion triggered when summoning a pet while on vehicle 34775
* Handle cases in a generic way
* Code cleanup
* Core/Pet: Attempt to fix an assertion triggered when summoning a pet while on vehicle 34775 with a new character
(cherry picked from commit e203ecda88)
* Core/Pets: Pet management refactoring
* Preload basic pet data on character login with async query
* Load additional pet data (declined names/auras/spells/cooldowns) using async query after we are sure pet loading will succeed
* Remove all select queries related to pet stable/unstable
* Remove all silent pet deletions except explicit UI-triggered abandons
* Fixed displaying stable master content when current pet is not summoned
* Allow to stable/swap unsummoned current pet
Closes#3610Closes#21266
(cherry picked from commit 5c1fc5e387)
* Misc: Use [[fallthrough]] attribute instead of comment to mark intentional fallthroughs
Related: #25006
* Misc: Add some missing breaks (no-ops) to satisfy clang
Related: #25006Closes#25055
* Build: Enable -Wimplicit-fallthrough on clang
Closes#25006
The names are a bit unhandy. Rename them (shorter but still meaningful).
GetGameTimeSystemPoint() -> GetSystemTime()
GetGameTimeSteadyPoint() -> Now()
Also add 2 new typedefs:
typedef std::chrono::steady_clock::time_point TimePoint;
typedef std::chrono::system_clock::time_point SystemTimePoint;
Closes#25042
(cherry picked from commit 896b68d5c2)
* Core/AI: Remove unneeded null checks
GetMap() can never return NULL.
Fixes additionally -Wunused-variable warnings
reported by GCC.
* Core/GameObject: Fix a -Wunused-variable warning reported by GCC
* Core/Player: Fix a -Wunused-variable warning reported by GCC
* Scritps/CavernsOfTime: Fix -Wimplicit-fallthrough warnings reported by GCC
* Scritps/CavernsOfTime: Fix a -Wmaybe-uninitialized warning reported by GCC
Warning:
/home/peterke/DEV/TrinityCore/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp: In member function ‘virtual void npc_arthas_stratholme::npc_arthas_stratholmeAI::UpdateAI(uint32)’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/npc_arthas.cpp:1119:58: warning: ‘emote’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1119 | (*it)->HandleEmoteCommand(emote);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~
* Scritps/PitOfSaron: Fix -Wunused-variable warnings reported by GCC
* Scritps/EyeOfEternity: Fix a -Wclass-memaccess warning reported by GCC
Warning:
/home/peterke/DEV/TrinityCore/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp: In member function ‘virtual void boss_malygos::boss_malygosAI::UpdateAI(uint32)’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp:950:81: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class ObjectGuid’; use assignment or value-initialization instead [-Wclass-memaccess]
950 | memset(_surgeTargetGUID, 0, sizeof(_surgeTargetGUID));
|
* Scritps/CoilfangReservoir: Fix a -Wclass-memaccess warning reported by GCC
Warning:
/home/peterke/DEV/TrinityCore/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp: In member function ‘void boss_leotheras_the_blind::boss_leotheras_the_blindAI::Initialize()’:
/home/peterke/DEV/TrinityCore/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp:220:55: warning: ‘void* memset(void*, int, size_t)’ clearing an object of non-trivial type ‘class ObjectGuid’; use assignment or value-initialization instead [-Wclass-memaccess]
220 | memset(InnderDemon, 0, sizeof(InnderDemon));
| ^
* Scritps/Naxx: Fix a -Wimplicit-fallthrough warning reported by GCC
For discussion see https://github.com/TrinityCore/TrinityCore/pull/25007
(cherry picked from commit 10be49bdfe)
Retail does not have a zone id for newly created character until their first login so we do the same as well. This will drastically improve performance on character creations as we no longer unnecessarily load grids and map data.
(cherry picked from commit c50bb00ac7)
Partly revert 671052575a
+ implemented timer reset to 300s after relog never worked, therefore removing that part;
+ reverting other parts with 300s timer changes, as not needed;
(cherry picked from commit 2efaf1dda8)
This is neccessary so that GameObject::BuildValuesUpdate from BuildValuesUpdateBlockForPlayer picks up correct inventory state and sets GO_DYNFLAG_LO_ACTIVATE
(cherry picked from commit 449bd9058b)
* Core/Player: add helper methods for PLAYER_FLAGS_DEVELOPER. Update .dev command to new command model
* Rename _player -> player
(cherry picked from commit 8128bb97db)
* Add some comments to Player::CanStoreItems to help me wrap my head around how the method works.
* Experimental fix for incoming trade-stack problem.
* Only add to stacks that aren't already full.
* Use remaining_count instead of static 1.
* Remove debug logging from exploration.
* More uses of remaining_count for consistency.
* Correct space count check
* Correct overflow problem.
* Remove redundant check, handled in existing for statement.
* Store Item pointers in order to be able to merge in multiple incoming stacks.
* Build fix - was continually working locally, but failing in CI.
* Break build in order to keep PR focused on Player.cpp changes.
* Adjust phrasing of how arrays are initialized.
* Fix phrasing of comments to avoid sounding like a ToDo item
* In the spirit of b649273d5f, rephrase an old comment to be a statement rather than a question.
(cherry picked from commit e11a13c755)
- use RATE_DURABILITY_LOSS_ON_DEATH for death from falling
- add note, that RATE_DURABILITY_LOSS_ON_DEATH doesn't change log message
(cherry picked from commit a1831e0c1e)
Co-authored-by: MitchesD <majklprofik@seznam.cz>
(cherry picked from commit e1a8ebc064)
* dropped unneeded IsUnderwater override for players since the default position data update considers collision height already so we don't have to rely on that tempfix anymore. This actually fixes breathing bars showing up depending on your characters size (gnomes get their breathing bar earlier, taurens later etc)
(cherry picked from commit bea850fb73)