fix(Scripts/AhnQiraj): Anubisath Sentinel and Anubisath Guardian shou… (#12656)

fix(Scripts/AhnQiraj): Anubisath Sentinel and Anubisath Guardian should spawn Small Obsidian Chunk on death.

Fixes #12474
This commit is contained in:
UltraNix
2022-08-10 04:24:25 +02:00
committed by GitHub
parent 8986421c71
commit f0afe611ff
2 changed files with 35 additions and 25 deletions
@@ -42,6 +42,7 @@ enum Spells
SPELL_STRENGHT_OF_OSSIRIAN = 25176, SPELL_STRENGHT_OF_OSSIRIAN = 25176,
SPELL_SAND_STORM = 25160, SPELL_SAND_STORM = 25160,
SPELL_SUMMON_CRYSTAL = 25192, SPELL_SUMMON_CRYSTAL = 25192,
SPELL_SUMMON_SMALL_OBSIDIAN_CHUNK = 27627, // Server-side
// Crystal // Crystal
SPELL_FIRE_WEAKNESS = 25177, SPELL_FIRE_WEAKNESS = 25177,
@@ -347,6 +348,11 @@ struct npc_anubisath_guardian : public ScriptedAI
} }
} }
void JustDied(Unit* /*killer*/) override
{
DoCastSelf(SPELL_SUMMON_SMALL_OBSIDIAN_CHUNK, true);
}
void UpdateAI(uint32 diff) override void UpdateAI(uint32 diff) override
{ {
if (!UpdateVictim()) if (!UpdateVictim())
@@ -52,7 +52,9 @@ enum Spells
SPELL_MSTRIKE = 24573, SPELL_MSTRIKE = 24573,
SPELL_STORM_BUFF = 2148, SPELL_STORM_BUFF = 2148,
SPELL_STORM = 26546 SPELL_STORM = 26546,
SPELL_SUMMON_SMALL_OBSIDIAN_CHUNK = 27627 // Server-side
}; };
class npc_anubisath_sentinel : public CreatureScript class npc_anubisath_sentinel : public CreatureScript
@@ -273,6 +275,8 @@ public:
sent->ModifyHealth(int32(sent->CountPctFromMaxHealth(50))); sent->ModifyHealth(int32(sent->CountPctFromMaxHealth(50)));
CAST_AI(aqsentinelAI, sent->AI())->GainSentinelAbility(ability); CAST_AI(aqsentinelAI, sent->AI())->GainSentinelAbility(ability);
} }
DoCastSelf(SPELL_SUMMON_SMALL_OBSIDIAN_CHUNK, true);
} }
}; };
}; };