mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-03-11 19:45:20 +00:00
refactor(Core): DespawnOrUnsummon (#23141)
This commit is contained in:
@@ -476,7 +476,7 @@ public:
|
||||
if (moveType == FOLLOW_MOTION_TYPE && data == _summonerGuid.GetCounter())
|
||||
{
|
||||
me->CastSpell((Unit*)nullptr, SPELL_DARK_OFFERING, false);
|
||||
me->DespawnOrUnsummon(1000);
|
||||
me->DespawnOrUnsummon(1s);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
for (std::list<Creature*>::const_iterator itr = cList.begin(); itr != cList.end(); ++itr)
|
||||
{
|
||||
player->KilledMonsterCredit(NPC_WINTERFIN_TADPOLE);
|
||||
(*itr)->DespawnOrUnsummon(urand(45000, 60000));
|
||||
(*itr)->DespawnOrUnsummon(randtime(45s, 60s));
|
||||
(*itr)->GetMotionMaster()->MoveFollow(player, 1.0f, frand(0.0f, 2 * M_PI), MOTION_SLOT_CONTROLLED);
|
||||
}
|
||||
}
|
||||
@@ -1694,7 +1694,7 @@ public:
|
||||
for (std::list<Creature*>::const_iterator itr = childrenList.begin(); itr != childrenList.end(); ++itr)
|
||||
{
|
||||
player->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID());
|
||||
(*itr)->DespawnOrUnsummon(5000);
|
||||
(*itr)->DespawnOrUnsummon(5s);
|
||||
(*itr)->GetMotionMaster()->MovePoint(1, go->GetPositionX() + 5, go->GetPositionY(), go->GetPositionZ());
|
||||
(*itr)->AI()->Talk(SAY_FREE_0);
|
||||
(*itr)->GetMotionMaster()->Clear();
|
||||
|
||||
@@ -42,7 +42,7 @@ void NPCStaveQuestAI::RevealForm()
|
||||
{
|
||||
me->UpdateEntry(GetFormEntry("evil"));
|
||||
me->SetFullHealth();
|
||||
me->DespawnOrUnsummon(900000);
|
||||
me->DespawnOrUnsummon(900s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,7 +373,7 @@ public:
|
||||
SetHomePosition();
|
||||
me->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1);
|
||||
me->SetImmuneToAll(true);
|
||||
me->DespawnOrUnsummon(5000);
|
||||
me->DespawnOrUnsummon(5s);
|
||||
break;
|
||||
}
|
||||
events.Repeat(2s);
|
||||
@@ -476,7 +476,7 @@ public:
|
||||
{
|
||||
if (flaggedForDespawn)
|
||||
{
|
||||
me->DespawnOrUnsummon(0);
|
||||
me->DespawnOrUnsummon(0ms);
|
||||
flaggedForDespawn = false;
|
||||
}
|
||||
}
|
||||
@@ -640,7 +640,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
Precious()->DespawnOrUnsummon(0);
|
||||
Precious()->DespawnOrUnsummon(0ms);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,9 +765,9 @@ public:
|
||||
me->SetUnitFlag(UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1);
|
||||
me->SetImmuneToAll(true);
|
||||
|
||||
Precious()->DespawnOrUnsummon(5000);
|
||||
Precious()->DespawnOrUnsummon(5s);
|
||||
|
||||
me->DespawnOrUnsummon(5000);
|
||||
me->DespawnOrUnsummon(5s);
|
||||
break;
|
||||
}
|
||||
events.Repeat(2s);
|
||||
@@ -978,7 +978,7 @@ public:
|
||||
me->CombatStop(true);
|
||||
me->Say(NELSON_DESPAWN_SAY);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
me->DespawnOrUnsummon(5000);
|
||||
me->DespawnOrUnsummon(5s);
|
||||
break;
|
||||
}
|
||||
events.Repeat(2s);
|
||||
@@ -1149,7 +1149,7 @@ public:
|
||||
me->CombatStop(true);
|
||||
me->Say(FRANKLIN_DESPAWN_SAY);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_TALK);
|
||||
me->DespawnOrUnsummon(5000);
|
||||
me->DespawnOrUnsummon(5s);
|
||||
break;
|
||||
}
|
||||
events.Repeat(2s);
|
||||
|
||||
Reference in New Issue
Block a user