mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-10 11:10:33 +00:00
refactor(Core): DespawnOrUnsummon (#23141)
This commit is contained in:
@@ -603,7 +603,7 @@ struct npc_dark_iron_attack_mole_machine : public ScriptedAI
|
||||
{
|
||||
me->SummonCreature(NPC_DARK_IRON_GUZZLER, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ(), 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000);
|
||||
summonTimer = 0;
|
||||
me->DespawnOrUnsummon(3000);
|
||||
me->DespawnOrUnsummon(3s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -697,7 +697,7 @@ struct npc_hallows_end_soh : public ScriptedAI
|
||||
|
||||
void EnterEvadeMode(EvadeReason /* why */) override
|
||||
{
|
||||
me->DespawnOrUnsummon(1);
|
||||
me->DespawnOrUnsummon(1ms);
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 /*type*/) const override
|
||||
@@ -848,7 +848,7 @@ struct npc_hallows_end_soh : public ScriptedAI
|
||||
if (Unit* c = ObjectAccessor::GetUnit(*me, guid))
|
||||
c->RemoveAllAuras();
|
||||
|
||||
me->DespawnOrUnsummon(1);
|
||||
me->DespawnOrUnsummon(1ms);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1029,7 +1029,7 @@ struct boss_headless_horseman : public ScriptedAI
|
||||
std::list<Creature*> unitList;
|
||||
me->GetCreaturesWithEntryInRange(unitList, 100.0f, NPC_PUMPKIN_FIEND);
|
||||
for (std::list<Creature*>::iterator itr = unitList.begin(); itr != unitList.end(); ++itr)
|
||||
(*itr)->ToCreature()->DespawnOrUnsummon(500);
|
||||
(*itr)->ToCreature()->DespawnOrUnsummon(500ms);
|
||||
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.IsEmpty() && players.begin()->GetSource() && players.begin()->GetSource()->GetGroup())
|
||||
|
||||
@@ -247,7 +247,7 @@ struct npc_love_in_air_snivel_real : public ScriptedAI
|
||||
if (Unit* owner = me->ToTempSummon()->GetSummonerUnit())
|
||||
me->CastSpell(owner, SPELL_SNIVEL_GUN, true);
|
||||
|
||||
me->DespawnOrUnsummon(1000);
|
||||
me->DespawnOrUnsummon(1s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ class spell_winter_veil_racer_slam_hit : public SpellScript
|
||||
return;
|
||||
|
||||
target->CastSpell(target->GetPositionX() + irand(-10, 10), target->GetPositionY() + irand(-10, 10), target->GetPositionZ(), SPELL_RACER_DEATH_VISUAL, true);
|
||||
target->DespawnOrUnsummon(3000);
|
||||
target->DespawnOrUnsummon(3s);
|
||||
target->CastSpell(target, SPELL_RACER_FLAMES, true);
|
||||
caster->CastSpell(caster, SPELL_RACER_KILL_COUNTER, true);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user