refactor(Core): DespawnOrUnsummon (#23141)
This commit is contained in:
@@ -1436,7 +1436,7 @@ class spell_illidan_parasitic_shadowfiend_trigger : public SpellScript
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Creature* target = GetHitCreature())
|
||||
target->DespawnOrUnsummon(1);
|
||||
target->DespawnOrUnsummon(1ms);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1692,7 +1692,7 @@ class spell_illidan_cage_trap : public SpellScript
|
||||
if (GetCaster()->GetExactDist2d(target) < 4.0f)
|
||||
{
|
||||
target->AI()->DoAction(ACTION_ILLIDAN_CAGED);
|
||||
GetCaster()->ToCreature()->DespawnOrUnsummon(1);
|
||||
GetCaster()->ToCreature()->DespawnOrUnsummon(1ms);
|
||||
if (GameObject* gobject = GetCaster()->FindNearestGameObject(GO_CAGE_TRAP, 10.0f))
|
||||
gobject->SetLootState(GO_JUST_DEACTIVATED);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public:
|
||||
{
|
||||
summoner->GetAI()->DoAction(_action);
|
||||
_owner.SetStandState(UNIT_STAND_STATE_SUBMERGED);
|
||||
_owner.DespawnOrUnsummon(200);
|
||||
_owner.DespawnOrUnsummon(200ms);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -391,7 +391,7 @@ struct npc_creature_generator_akama : public ScriptedAI
|
||||
void SummonedCreatureDies(Creature* summon, Unit*) override
|
||||
{
|
||||
spawnCounter--;
|
||||
summon->DespawnOrUnsummon(10000);
|
||||
summon->DespawnOrUnsummon(10s);
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user