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

@@ -327,7 +327,7 @@ struct npc_pet_gen_argent_pony_bridle : public ScriptedAI
creature->CastSpell(creature, spellId, true);
player->AddSpellCooldown(spellId, 0, 3 * MINUTE * IN_MILLISECONDS);
player->AddSpellCooldown(player->GetTeamId(true) ? SPELL_AURA_TIRED_G : SPELL_AURA_TIRED_S, 0, 3 * MINUTE * IN_MILLISECONDS + 4 * HOUR * IN_MILLISECONDS);
creature->DespawnOrUnsummon(3 * MINUTE * IN_MILLISECONDS);
creature->DespawnOrUnsummon(180s);
}
return true;
}
@@ -388,7 +388,7 @@ struct npc_pet_gen_target_following_bomb : public NullCreatureAI
if (me->GetDistance(target) < 3.0f)
{
me->CastSpell(me, bombSpellId, false);
me->DespawnOrUnsummon(500);
me->DespawnOrUnsummon(500ms);
}
}
else if (!me->HasUnitState(UNIT_STATE_FOLLOW))
@@ -557,7 +557,7 @@ struct npc_pet_gen_imp_in_a_bottle : public NullCreatureAI
if (_talkTimer >= 5000)
{
_talkTimer = 0;
me->DespawnOrUnsummon(1);
me->DespawnOrUnsummon(1ms);
if (!_hasParty)
Talk(0, ObjectAccessor::GetPlayer(*me, _ownerGUID));
else if (Player* player = ObjectAccessor::GetPlayer(*me, _ownerGUID))