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

@@ -344,7 +344,7 @@ public:
if (Creature* pIchoron = pInstance->instance->GetCreature(pInstance->GetGuidData(DATA_ICHORON_GUID)))
if (pIchoron->AI())
pIchoron->AI()->DoAction(ACTION_WATER_ELEMENT_KILLED);
me->DespawnOrUnsummon(2500);
me->DespawnOrUnsummon(2500ms);
}
void AttackStart(Unit* /*who*/) override {}

View File

@@ -135,7 +135,7 @@ public:
if (me->GetDistance(c) < 3.0f)
{
c->CastSpell(me, SPELL_ARCANE_POWER, false);
c->DespawnOrUnsummon(8000);
c->DespawnOrUnsummon(8s);
found = true;
}
if (found)

View File

@@ -222,7 +222,7 @@ public:
if (Creature* c = pInstance->instance->GetCreature(SummonedGUID))
c->DespawnOrUnsummon();
}
me->DespawnOrUnsummon(5000);
me->DespawnOrUnsummon(5s);
}
void SummonedCreatureDespawn(Creature* pSummoned) override

View File

@@ -205,7 +205,7 @@ public:
break;
case EVENT_SUMMON_SABOTEOUR:
DoSummon(NPC_SABOTEOUR, me, 2.0f, 0, TEMPSUMMON_CORPSE_DESPAWN);
me->DespawnOrUnsummon(3000);
me->DespawnOrUnsummon(3s);
break;
}
@@ -1136,7 +1136,7 @@ public:
me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetDisplayId(11686);
me->CastSpell(me, SPELL_TELEPORT_VISUAL, true);
me->DespawnOrUnsummon(1000);
me->DespawnOrUnsummon(1s);
}
++count;
}