mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 23:56:25 +00:00
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 <ballarini.mattia1990@gmail.com>
This commit is contained in:
@@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user