diff options
| author | Shauren <shauren.trinity@gmail.com> | 2020-09-04 13:38:24 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2020-09-04 13:38:24 +0200 |
| commit | b23190393248455f04d3a06def030a1ec7efad1e (patch) | |
| tree | 1ce3772314492dcdb985641269a3114813d4b4dc /src/server/scripts/World | |
| parent | b20acfe701e6f5f995f2776f076d3c494c02e1aa (diff) | |
Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port
Diffstat (limited to 'src/server/scripts/World')
| -rw-r--r-- | src/server/scripts/World/boss_emerald_dragons.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/World/duel_reset.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/World/go_scripts.cpp | 5 | ||||
| -rw-r--r-- | src/server/scripts/World/mob_generic_creature.cpp | 2 | ||||
| -rw-r--r-- | src/server/scripts/World/npc_innkeeper.cpp | 4 | ||||
| -rw-r--r-- | src/server/scripts/World/npcs_special.cpp | 8 |
6 files changed, 16 insertions, 13 deletions
diff --git a/src/server/scripts/World/boss_emerald_dragons.cpp b/src/server/scripts/World/boss_emerald_dragons.cpp index 698554344a1..c6839cdb836 100644 --- a/src/server/scripts/World/boss_emerald_dragons.cpp +++ b/src/server/scripts/World/boss_emerald_dragons.cpp @@ -769,7 +769,11 @@ class spell_mark_of_nature : public SpellScriptLoader bool Validate(SpellInfo const* /*spellInfo*/) override { - return ValidateSpellInfo({ SPELL_MARK_OF_NATURE, SPELL_AURA_OF_NATURE }); + return ValidateSpellInfo( + { + SPELL_MARK_OF_NATURE, + SPELL_AURA_OF_NATURE + }); } void FilterTargets(std::list<WorldObject*>& targets) diff --git a/src/server/scripts/World/duel_reset.cpp b/src/server/scripts/World/duel_reset.cpp index 8abe6773416..58946c4475d 100644 --- a/src/server/scripts/World/duel_reset.cpp +++ b/src/server/scripts/World/duel_reset.cpp @@ -15,10 +15,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include "GameTime.h" #include "ScriptMgr.h" -#include "Player.h" +#include "GameTime.h" #include "Pet.h" +#include "Player.h" #include "SpellHistory.h" #include "SpellInfo.h" #include "SpellMgr.h" diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 2635781f48c..dba64bed1cf 100644 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -46,11 +46,11 @@ EndContentData */ #include "ScriptMgr.h" #include "DB2Structure.h" +#include "GameEventMgr.h" #include "GameObject.h" #include "GameObjectAI.h" #include "GameTime.h" #include "Log.h" -#include "Map.h" #include "MotionMaster.h" #include "Player.h" #include "ScriptedCreature.h" @@ -58,7 +58,6 @@ EndContentData */ #include "TemporarySummon.h" #include "WorldSession.h" #include "World.h" -#include "GameEventMgr.h" /*###### ## go_cat_figurine @@ -1696,7 +1695,7 @@ public: break; std::vector<Player*> playersNearby; - me->GetPlayerListInGrid(playersNearby, me->GetMap()->GetVisibilityRange()); + me->GetPlayerListInGrid(playersNearby, me->GetVisibilityRange()); for (Player* player : playersNearby) { if (player->GetTeamId() == TEAM_HORDE) diff --git a/src/server/scripts/World/mob_generic_creature.cpp b/src/server/scripts/World/mob_generic_creature.cpp index 840161f8f9a..ca3b27140e4 100644 --- a/src/server/scripts/World/mob_generic_creature.cpp +++ b/src/server/scripts/World/mob_generic_creature.cpp @@ -36,7 +36,7 @@ public: } uint32 timer, interval; - const SpellInfo* spell; + SpellInfo const* spell; void UpdateAI(uint32 diff) override { diff --git a/src/server/scripts/World/npc_innkeeper.cpp b/src/server/scripts/World/npc_innkeeper.cpp index f4e0f3b9361..b994d1a9ee4 100644 --- a/src/server/scripts/World/npc_innkeeper.cpp +++ b/src/server/scripts/World/npc_innkeeper.cpp @@ -57,7 +57,7 @@ public: { if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !player->HasAura(SPELL_TRICK_OR_TREATED)) { - const char* localizedEntry; + char const* localizedEntry; switch (player->GetSession()->GetSessionDbcLocale()) { case LOCALE_frFR: localizedEntry = LOCALE_TRICK_OR_TREAT_2; break; @@ -76,7 +76,7 @@ public: if (me->IsInnkeeper()) { - const char* localizedEntry; + char const* localizedEntry; switch (player->GetSession()->GetSessionDbcLocale()) { case LOCALE_deDE: localizedEntry = LOCALE_INNKEEPER_3; break; diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 1d47dbe9785..d67f51796c5 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -17,14 +17,15 @@ #include "ScriptMgr.h" #include "CellImpl.h" -#include "CreatureTextMgr.h" #include "CombatAI.h" +#include "CreatureTextMgr.h" #include "GameEventMgr.h" #include "GameObject.h" #include "GameObjectAI.h" #include "GridNotifiersImpl.h" #include "Log.h" #include "MotionMaster.h" +#include "MoveSplineInit.h" #include "ObjectAccessor.h" #include "ObjectMgr.h" #include "PassiveAI.h" @@ -38,7 +39,6 @@ #include "SpellMgr.h" #include "TemporarySummon.h" #include "Vehicle.h" -#include "MoveSplineInit.h" /*######## # npc_air_force_bots @@ -110,9 +110,9 @@ public: SpawnedGUID.Clear(); // find the correct spawnhandling - static uint32 entryCount = sizeof(spawnAssociations) / sizeof(SpawnAssociation); + static uint8 constexpr const EntryCount = uint8(std::extent<decltype(spawnAssociations)>::value); - for (uint8 i = 0; i < entryCount; ++i) + for (uint8 i = 0; i < EntryCount; ++i) { if (spawnAssociations[i].thisCreatureEntry == creature->GetEntry()) { |
