diff options
author | Ovah <dreadkiller@gmx.de> | 2022-02-21 20:03:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-21 20:03:53 +0100 |
commit | d7736ef73251ebbb280bb1524e6877e198bccd58 (patch) | |
tree | 9d466e7fae69040610bad3ad0884859e5eb24fbd /src | |
parent | 1e318ee5fc4ab9dbfcd614255b79c497619144d1 (diff) |
Scripts/Antorus: updated Garothi Worldbreaker initialization for dynamic spawn handling (#27817)
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp b/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp index 7ba2a494731..b8c45975ff8 100644 --- a/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp +++ b/src/server/scripts/Argus/AntorusTheBurningThrone/boss_garothi_worldbreaker.cpp @@ -178,16 +178,16 @@ Position const AnnihilationCenterReferencePos = { -3296.72f, 9767.78f, -60.0f }; struct boss_garothi_worldbreaker : public BossAI { - boss_garothi_worldbreaker(Creature* creature) : BossAI(creature, DATA_GAROTHI_WORLDBREAKER) + boss_garothi_worldbreaker(Creature* creature) : BossAI(creature, DATA_GAROTHI_WORLDBREAKER), + _apocalypseDriveCount(0), _searingBarrageSpellId(0), _lastCanonEntry(NPC_DECIMATOR), _castEradication(false) { - Initialize(); + _apocalypseDriveHealthLimit = { }; + SetCombatMovement(false); me->SetReactState(REACT_PASSIVE); } - void Initialize() + void InitializeAI() override { - SetCombatMovement(false); - switch (GetDifficulty()) { case DIFFICULTY_MYTHIC_RAID: @@ -203,19 +203,10 @@ struct boss_garothi_worldbreaker : public BossAI default: break; } - - // Todo: move this section out of the ctor and remove the .clear call when dynamic spawns have been merged. - _apocalypseDriveCount = 0; - _searingBarrageSpellId = 0; - _lastCanonEntry = NPC_DECIMATOR; - _castEradication = false; - _surgingFelDummyGuids.clear(); } - void Reset() override + void JustAppeared() override { - _Reset(); - Initialize(); me->SummonCreatureGroup(SUMMON_GROUP_ID_SURGING_FEL); } @@ -243,7 +234,7 @@ struct boss_garothi_worldbreaker : public BossAI void KilledUnit(Unit* victim) override { if (victim->IsPlayer()) - Talk(SAY_SLAY); + Talk(SAY_SLAY, victim); } void JustDied(Unit* /*killer*/) override @@ -438,7 +429,7 @@ struct boss_garothi_worldbreaker : public BossAI DoSpellAttackIfReady(SPELL_CARNAGE); } private: - uint8 _apocalypseDriveHealthLimit[MaxApocalypseDriveCount]; + std::array<uint8, MaxApocalypseDriveCount> _apocalypseDriveHealthLimit; uint8 _apocalypseDriveCount; uint32 _searingBarrageSpellId; uint32 _lastCanonEntry; |