refactor(Core): DespawnOrUnsummon (#23141)

This commit is contained in:
天鹭
2025-10-13 14:36:23 +08:00
committed by GitHub
parent 8e2e30328f
commit 53238a68d3
148 changed files with 363 additions and 366 deletions

View File

@@ -242,7 +242,7 @@ public:
{
me->GetMotionMaster()->MoveIdle();
me->CastSpell(b, SPELL_CONSUME_SOUL, true);
me->DespawnOrUnsummon(1);
me->DespawnOrUnsummon(1ms);
return;
}

View File

@@ -1153,7 +1153,7 @@ public:
ScriptedAI::EnterEvadeMode(why);
if (me->IsSummon())
me->ToTempSummon()->DespawnOrUnsummon(1);
me->ToTempSummon()->DespawnOrUnsummon(1ms);
}
};
};

View File

@@ -506,7 +506,7 @@ class spell_exploding_orb_auto_grow_aura : public AuraScript
target->RemoveAurasDueToSpell(SPELL_AUTO_GROW);
target->RemoveAurasDueToSpell(SPELL_EXPLODING_ORB_VISUAL);
if (target->IsCreature())
target->ToCreature()->DespawnOrUnsummon(2000);
target->ToCreature()->DespawnOrUnsummon(2s);
}
}

View File

@@ -341,7 +341,7 @@ public:
Unit::Kill(c, c, false);
}
c->DespawnOrUnsummon(10000);
c->DespawnOrUnsummon(10s);
}
pInstance->SetData(DATA_INSTANCE_PROGRESS, INSTANCE_PROGRESS_FINISHED_INTRO);
}
@@ -1381,7 +1381,7 @@ class spell_pos_slave_trigger_closest : public SpellScript
target->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
if (Creature* c = target->ToCreature())
{
c->DespawnOrUnsummon(7000);
c->DespawnOrUnsummon(7s);
c->AI()->Talk(0, p);
c->m_Events.AddEvent(new SlaveRunEvent(*c), c->m_Events.CalculateTime(3000));
}
@@ -1406,7 +1406,7 @@ class spell_pos_rimefang_frost_nova : public SpellScript
{
Unit::Kill(caster, target);
if (target->IsCreature())
target->ToCreature()->DespawnOrUnsummon(30000);
target->ToCreature()->DespawnOrUnsummon(30s);
}
}