mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
fix(Scripts/Spell): Priest shadowfiend attack and Shadowfiend Death proc (#20987)
Co-authored-by: killerwife <killerwife@gmail.com> Co-authored-by: Grimdhex <176165533+Grimdhex@users.noreply.github.com>
This commit is contained in:
@@ -27,10 +27,7 @@
|
||||
|
||||
enum PriestSpells
|
||||
{
|
||||
SPELL_PRIEST_GLYPH_OF_SHADOWFIEND = 58228,
|
||||
SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA = 58227,
|
||||
SPELL_PRIEST_SHADOWFIEND_DODGE = 8273,
|
||||
SPELL_PRIEST_LIGHTWELL_CHARGES = 59907
|
||||
SPELL_PRIEST_LIGHTWELL_CHARGES = 59907,
|
||||
};
|
||||
|
||||
struct npc_pet_pri_lightwell : public TotemAI
|
||||
@@ -55,31 +52,7 @@ struct npc_pet_pri_lightwell : public TotemAI
|
||||
}
|
||||
};
|
||||
|
||||
struct npc_pet_pri_shadowfiend : public PetAI
|
||||
{
|
||||
npc_pet_pri_shadowfiend(Creature* creature) : PetAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
PetAI::Reset();
|
||||
if (!me->HasAura(SPELL_PRIEST_SHADOWFIEND_DODGE))
|
||||
me->AddAura(SPELL_PRIEST_SHADOWFIEND_DODGE, me);
|
||||
|
||||
if (Unit* target = me->SelectNearestTarget(15.0f))
|
||||
AttackStart(target);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (me->IsSummon())
|
||||
if (Unit* owner = me->ToTempSummon()->GetSummonerUnit())
|
||||
if (owner->HasAura(SPELL_PRIEST_GLYPH_OF_SHADOWFIEND))
|
||||
owner->CastSpell(owner, SPELL_PRIEST_GLYPH_OF_SHADOWFIEND_MANA, true);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_priest_pet_scripts()
|
||||
{
|
||||
RegisterCreatureAI(npc_pet_pri_lightwell);
|
||||
RegisterCreatureAI(npc_pet_pri_shadowfiend);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user