From 4a14c61a906ee11db0b274310c25d7eca8f966d8 Mon Sep 17 00:00:00 2001 From: Carriola-wotlk <148633595+Carriola-wotlk@users.noreply.github.com> Date: Sun, 25 Aug 2024 15:01:37 +0200 Subject: [PATCH] fix(Scripts/BlackTemple) Gathios the Shatterer shouldnt use the same spell twice in a row (#19672) * fix: SelectTargetMethod Random replaced with MaxThreat * restore like origin * fix: random spell casting replaced with alternating spells casting * fix: alternating casting of aura, blessing and seal spells * refactor: randomized toggle initialization refactored --------- Co-authored-by: MattiaBallarini --- .../Outland/BlackTemple/illidari_council.cpp | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp index f77b4d639..39417fd2c 100644 --- a/src/server/scripts/Outland/BlackTemple/illidari_council.cpp +++ b/src/server/scripts/Outland/BlackTemple/illidari_council.cpp @@ -270,7 +270,12 @@ public: struct boss_gathios_the_shattererAI : public boss_illidari_council_memberAI { - boss_gathios_the_shattererAI(Creature* creature) : boss_illidari_council_memberAI(creature) { } + boss_gathios_the_shattererAI(Creature* creature) : boss_illidari_council_memberAI(creature) + { + _toggleBlessing = RAND(true, false); + _toggleAura = RAND(true, false); + _toggleSeal = RAND(true, false); + } Creature* SelectCouncilMember() { @@ -309,11 +314,15 @@ public: { case EVENT_SPELL_BLESSING: if (Unit* member = SelectCouncilMember()) - me->CastSpell(member, RAND(SPELL_BLESSING_OF_SPELL_WARDING, SPELL_BLESSING_OF_PROTECTION), false); + { + me->CastSpell(member, _toggleBlessing ? SPELL_BLESSING_OF_PROTECTION : SPELL_BLESSING_OF_SPELL_WARDING); + _toggleBlessing = !_toggleBlessing; + } events.ScheduleEvent(EVENT_SPELL_BLESSING, 15000); break; case EVENT_SPELL_AURA: - me->CastSpell(me, RAND(SPELL_DEVOTION_AURA, SPELL_CHROMATIC_RESISTANCE_AURA), false); + me->CastSpell(me, _toggleAura ? SPELL_DEVOTION_AURA : SPELL_CHROMATIC_RESISTANCE_AURA); + _toggleAura = !_toggleAura; events.ScheduleEvent(EVENT_SPELL_AURA, 60000); break; case EVENT_SPELL_CONSECRATION: @@ -333,7 +342,8 @@ public: events.ScheduleEvent(EVENT_SPELL_HAMMER_OF_JUSTICE, 0); break; case EVENT_SPELL_SEAL: - me->CastSpell(me, RAND(SPELL_SEAL_OF_COMMAND, SPELL_SEAL_OF_BLOOD), false); + me->CastSpell(me, _toggleSeal ? SPELL_SEAL_OF_COMMAND : SPELL_SEAL_OF_BLOOD); + _toggleSeal = !_toggleSeal; events.ScheduleEvent(EVENT_SPELL_SEAL, 20000); break; case EVENT_SPELL_JUDGEMENT: @@ -344,6 +354,10 @@ public: DoMeleeAttackIfReady(); } + private: + bool _toggleBlessing; + bool _toggleAura; + bool _toggleSeal; }; };