Scripts/AzureVault: Fix despawning of Volatile Saplings
This commit is contained in:
@@ -303,6 +303,18 @@ struct npc_ley_line_sprouts : public ScriptedAI
|
||||
DoCastAOE(SPELL_ARCANE_POWER, true);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
Creature* leymor = me->GetInstanceScript()->GetCreature(DATA_LEYMOR);
|
||||
if (!leymor)
|
||||
return;
|
||||
|
||||
if (!leymor->IsAIEnabled())
|
||||
return;
|
||||
|
||||
leymor->AI()->JustSummoned(summon);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (GetDifficulty() == DIFFICULTY_MYTHIC || GetDifficulty() == DIFFICULTY_MYTHIC_KEYSTONE)
|
||||
@@ -347,6 +359,14 @@ struct npc_volatile_sapling : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
void OnSpellFailed(SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id != SPELL_SAPPY_BURST)
|
||||
return;
|
||||
|
||||
me->KillSelf();
|
||||
}
|
||||
|
||||
private:
|
||||
bool _isSappyBurstCast;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user