fix(Scripts/Temple of AhnQiraj): Slime Toxin clouds should despawn 10… (#13492)
* fix(Scripts/Temple of AhnQiraj): Slime Toxin clouds should despawn 10 sec after Viscidus death. Fixes #13420 * Update.
This commit is contained in:
@@ -64,14 +64,14 @@ void SummonList::DespawnEntry(uint32 entry)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SummonList::DespawnAll()
|
void SummonList::DespawnAll(uint32 delay /*= 0*/)
|
||||||
{
|
{
|
||||||
while (!storage_.empty())
|
while (!storage_.empty())
|
||||||
{
|
{
|
||||||
Creature* summon = ObjectAccessor::GetCreature(*me, storage_.front());
|
Creature* summon = ObjectAccessor::GetCreature(*me, storage_.front());
|
||||||
storage_.pop_front();
|
storage_.pop_front();
|
||||||
if (summon)
|
if (summon)
|
||||||
summon->DespawnOrUnsummon();
|
summon->DespawnOrUnsummon(delay);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ public:
|
|||||||
void Summon(Creature const* summon) { storage_.push_back(summon->GetGUID()); }
|
void Summon(Creature const* summon) { storage_.push_back(summon->GetGUID()); }
|
||||||
void Despawn(Creature const* summon) { storage_.remove(summon->GetGUID()); }
|
void Despawn(Creature const* summon) { storage_.remove(summon->GetGUID()); }
|
||||||
void DespawnEntry(uint32 entry);
|
void DespawnEntry(uint32 entry);
|
||||||
void DespawnAll();
|
void DespawnAll(uint32 delay = 0);
|
||||||
bool IsAnyCreatureAlive() const;
|
bool IsAnyCreatureAlive() const;
|
||||||
bool IsAnyCreatureWithEntryAlive(uint32 entry) const;
|
bool IsAnyCreatureWithEntryAlive(uint32 entry) const;
|
||||||
bool IsAnyCreatureInCombat() const;
|
bool IsAnyCreatureInCombat() const;
|
||||||
|
|||||||
@@ -133,6 +133,17 @@ struct boss_viscidus : public BossAI
|
|||||||
me->RemoveAurasDueToSpell(SPELL_INVIS_SELF);
|
me->RemoveAurasDueToSpell(SPELL_INVIS_SELF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void JustDied(Unit* /*killer*/) override
|
||||||
|
{
|
||||||
|
events.Reset();
|
||||||
|
summons.DespawnAll(10 * IN_MILLISECONDS);
|
||||||
|
if (instance)
|
||||||
|
{
|
||||||
|
instance->SetBossState(DATA_VISCIDUS, DONE);
|
||||||
|
instance->SaveToDB();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType effType, SpellSchoolMask spellSchoolMask) override
|
void DamageTaken(Unit* attacker, uint32& damage, DamageEffectType effType, SpellSchoolMask spellSchoolMask) override
|
||||||
{
|
{
|
||||||
if (me->HealthBelowPct(5))
|
if (me->HealthBelowPct(5))
|
||||||
|
|||||||
Reference in New Issue
Block a user