Scripts/AzureVault: Fix despawning of Volatile Saplings

This commit is contained in:
ModoX
2023-03-31 13:44:29 +02:00
parent f1e95daf90
commit f5017f7348
@@ -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;
};