Core/Scripts: Added wrapper method for despawning creatures DespawnOrUnsummon
This commit is contained in:
@@ -411,9 +411,9 @@ public:
|
||||
case PHASE_CTHUN_DONE:
|
||||
Creature* pPortal= me->FindNearestCreature(MOB_CTHUN_PORTAL, 10);
|
||||
if (pPortal)
|
||||
pPortal->ForcedDespawn();
|
||||
pPortal->DespawnOrUnsummon();
|
||||
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ public:
|
||||
{
|
||||
pInstance->DoUseDoorOrButton(pInstance->GetData64(GO_END_DOOR));
|
||||
//TODO: leave the area...
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public:
|
||||
// we mustn't remove the Creature in the same round in which we cast the summon spell, otherwise there will be no summons
|
||||
if (spellhit && morphtimer >= 5000)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
// walk 5 seconds before summoning
|
||||
@@ -335,7 +335,7 @@ public:
|
||||
{
|
||||
if (Must_Die_Timer <= diff)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
} else Must_Die_Timer -= diff;
|
||||
}
|
||||
@@ -396,7 +396,7 @@ public:
|
||||
Player* pPlayer = Unit::GetPlayer(*me, PlayerGUID);
|
||||
if (!pPlayer)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ public:
|
||||
|
||||
if (id == 57)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -489,7 +489,7 @@ public:
|
||||
{
|
||||
if (must_die_timer <= diff)
|
||||
{
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
} else must_die_timer -= diff;
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
if (RunAwayTimer)
|
||||
{
|
||||
if (RunAwayTimer <= diff)
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
else
|
||||
RunAwayTimer -= diff;
|
||||
|
||||
@@ -611,7 +611,7 @@ public:
|
||||
if (DespawnTimer <= diff)
|
||||
{
|
||||
//once we are able to, despawn us
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
} else DespawnTimer -= diff;
|
||||
}
|
||||
@@ -768,7 +768,7 @@ public:
|
||||
if(FleeTimer)
|
||||
{
|
||||
if(FleeTimer <= diff)
|
||||
me->ForcedDespawn();
|
||||
me->DespawnOrUnsummon();
|
||||
else FleeTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user