fix(Scripts/BlackTemple): Gurtogg Bloodboil shouldnt cast bloodboil o… (#19886)
fix(Scripts/BlackTemple): Gurtogg Bloodboil shouldnt cast bloodboil on phase 2 and shouldnt chase immune targets
This commit is contained in:
@@ -65,19 +65,9 @@ enum Misc
|
|||||||
GROUP_DELAY = 1
|
GROUP_DELAY = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_gurtogg_bloodboil : public CreatureScript
|
struct boss_gurtogg_bloodboil : public BossAI
|
||||||
{
|
{
|
||||||
public:
|
boss_gurtogg_bloodboil(Creature* creature) : BossAI(creature, DATA_GURTOGG_BLOODBOIL), _recentlySpoken(false) { }
|
||||||
boss_gurtogg_bloodboil() : CreatureScript("boss_gurtogg_bloodboil") { }
|
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
|
||||||
{
|
|
||||||
return GetBlackTempleAI<boss_gurtogg_bloodboilAI>(creature);
|
|
||||||
}
|
|
||||||
|
|
||||||
struct boss_gurtogg_bloodboilAI : public BossAI
|
|
||||||
{
|
|
||||||
boss_gurtogg_bloodboilAI(Creature* creature) : BossAI(creature, DATA_GURTOGG_BLOODBOIL), _recentlySpoken(false) { }
|
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
{
|
{
|
||||||
@@ -93,6 +83,7 @@ public:
|
|||||||
DoCastSelf(SPELL_ACIDIC_WOUND, true);
|
DoCastSelf(SPELL_ACIDIC_WOUND, true);
|
||||||
|
|
||||||
ScheduleTimedEvent(10s, [&] {
|
ScheduleTimedEvent(10s, [&] {
|
||||||
|
if (!me->HasAura(SPELL_FEL_RAGE_SELF))
|
||||||
me->CastCustomSpell(SPELL_BLOODBOIL, SPELLVALUE_MAX_TARGETS, 5, me, false);
|
me->CastCustomSpell(SPELL_BLOODBOIL, SPELLVALUE_MAX_TARGETS, 5, me, false);
|
||||||
}, 10s);
|
}, 10s);
|
||||||
|
|
||||||
@@ -143,6 +134,11 @@ public:
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CanAIAttack(Unit const* who) const override
|
||||||
|
{
|
||||||
|
return !who->IsImmunedToDamage(SPELL_SCHOOL_MASK_ALL);
|
||||||
|
}
|
||||||
|
|
||||||
void KilledUnit(Unit* /*victim*/) override
|
void KilledUnit(Unit* /*victim*/) override
|
||||||
{
|
{
|
||||||
if (!_recentlySpoken)
|
if (!_recentlySpoken)
|
||||||
@@ -166,18 +162,6 @@ public:
|
|||||||
Talk(SAY_DEATH);
|
Talk(SAY_DEATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
|
||||||
{
|
|
||||||
if (!UpdateVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
scheduler.Update(diff);
|
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
|
||||||
return;
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool CheckEvadeIfOutOfCombatArea() const override
|
bool CheckEvadeIfOutOfCombatArea() const override
|
||||||
{
|
{
|
||||||
return me->GetHomePosition().GetExactDist2d(me) > 105.0f;
|
return me->GetHomePosition().GetExactDist2d(me) > 105.0f;
|
||||||
@@ -186,7 +170,6 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool _recentlySpoken;
|
bool _recentlySpoken;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
class spell_gurtogg_bloodboil : public SpellScript
|
class spell_gurtogg_bloodboil : public SpellScript
|
||||||
{
|
{
|
||||||
@@ -231,7 +214,7 @@ class spell_gurtogg_eject : public SpellScript
|
|||||||
|
|
||||||
void AddSC_boss_gurtogg_bloodboil()
|
void AddSC_boss_gurtogg_bloodboil()
|
||||||
{
|
{
|
||||||
new boss_gurtogg_bloodboil();
|
RegisterBlackTempleCreatureAI(boss_gurtogg_bloodboil);
|
||||||
RegisterSpellScript(spell_gurtogg_bloodboil);
|
RegisterSpellScript(spell_gurtogg_bloodboil);
|
||||||
RegisterSpellScript(spell_gurtogg_eject);
|
RegisterSpellScript(spell_gurtogg_eject);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user