* 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)
Stop combat when a Player moves to a Sanctuary area only if there is any PvP combat (it would be nice to keep PvE combat but that's still an issue)
(cherry picked from commit c7974bdf90)
* additional output for additem command
when removing items with additem:
if the user provides an amount too large of a negative amount, the command will now output the amount of items that could not be destroyed.
* renamed sql file to hopefully avoid conflicts
* added clarification to failure string
* changed unneeded else if condition to else
* code style; braces
* Update and rename 9999_99_99_99_world.sql to 2019_12_28_01_world.sql
(cherry picked from commit 6b19f4a0ab)
* Core/Achievements: fixed bug with counting honorless units for achievement type ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL
* Remove codestyle changes
* Remove codestyle changes
(cherry picked from commit f4be544629)
* Fix spell_area not checking for zoneID for quests
* Addendum to bdffe0a4a641414fe26c9b75b00f8e70ff0f1cb8
* Fix spell_area handle same spell with the same quests
Also fix not checking for quest_end at all.
* Addendum to 2d6b0545e3762b3a25005726d4093cf4a7945a8d
* Better commenting for 7a50189de3104f000d8b31fa6c415bb69cf1a3e7
* Addendum to 2d6b0545e3762b3a25005726d4093cf4a7945a8d
(cherry picked from commit 92d83c3c2e)
- Split quest pooling from PoolMgr (into QuestPoolMgr)
- Proper saving/restoring on server restart
- No more hacking into sObjectMgr to insert/remove available quests
(cherry picked from commit a5e73e41c0)