From 0754da4e6cd9368f6c97d43bffa22e22022ad0ce Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Mon, 16 Jul 2018 01:08:59 +0200 Subject: [PATCH] Scripts/BoT: fixed Elementary achievement check logic * removed a unused eventMap definition from Flame Strike script --- .../boss_ascendant_council.cpp | 31 +++++++------------ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp index b299a244ae4..e1e401f1342 100644 --- a/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp +++ b/src/server/scripts/EasternKingdoms/BastionOfTwilight/boss_ascendant_council.cpp @@ -273,10 +273,7 @@ enum Actions ACTION_CAST_INFERNO_RUSH, // Arion - ACTION_CAST_LIGHTNING_BLAST, - - // Elementium Monstrosity - ACTION_FAIL_ACHIEVEMENT, + ACTION_CAST_LIGHTNING_BLAST }; enum MovePoints @@ -286,7 +283,7 @@ enum MovePoints enum AchievementData { - DATA_ELEMENTARY = 0 + DATA_ELEMENTARY = 1 }; enum SummonProperties @@ -1286,6 +1283,7 @@ class npc_elementium_monstrosity : public CreatureScript { _mergedHealth = 0; _mergedTargets = 0; + _liquidIceCount = 0; _achievementEnligible = true; me->SetReactState(REACT_PASSIVE); } @@ -1329,6 +1327,13 @@ class npc_elementium_monstrosity : public CreatureScript void JustSummoned(Creature* summon) override { _summons.Summon(summon); + + if (summon->GetEntry() == NPC_LIQUID_ICE) + { + _liquidIceCount++; + if (_liquidIceCount == 2) + _achievementEnligible = false; + } } void SpellHitTarget(Unit* target, SpellInfo const* spell) override @@ -1349,12 +1354,6 @@ class npc_elementium_monstrosity : public CreatureScript } } - void DoAction(int32 action) override - { - if (action == ACTION_FAIL_ACHIEVEMENT) - _achievementEnligible = false; - } - uint32 GetData(uint32 type) const override { if (type == DATA_ELEMENTARY) @@ -1406,6 +1405,7 @@ class npc_elementium_monstrosity : public CreatureScript SummonList _summons; uint32 _mergedHealth; uint8 _mergedTargets; + uint8 _liquidIceCount; bool _achievementEnligible; }; @@ -1817,9 +1817,6 @@ class npc_ascendant_council_flame_strike : public CreatureScript me->DespawnOrUnsummon(Seconds(2) + Milliseconds(300)); } } - - private: - EventMap _events; }; CreatureAI* GetAI(Creature* creature) const override @@ -2634,13 +2631,7 @@ class spell_elementium_monstrosity_cryogenic_aura : public AuraScript target->CastSpell(caster, SPELL_LIQUID_ICE_MOD_SCALE, true); } else - { target->CastSpell(target, SPELL_LIQUID_ICE_SUMMON, true); - - if (Creature* creature = target->ToCreature()) - if (creature->IsAIEnabled) - creature->AI()->DoAction(ACTION_FAIL_ACHIEVEMENT); - } } }