Better function to despawn creature with script in azuremyst_isle

--HG--
branch : trunk
This commit is contained in:
Kudlaty
2009-07-09 11:43:57 +02:00
parent 820f77c265
commit 0687722812
@@ -579,7 +579,6 @@ struct TRINITY_DLL_DECL npc_nestlewood_owlkinAI : public ScriptedAI
void Reset() void Reset()
{ {
DespawnTimer = 0; DespawnTimer = 0;
m_creature->SetVisibility(VISIBILITY_ON);
} }
void UpdateAI(const uint32 diff) void UpdateAI(const uint32 diff)
@@ -590,12 +589,8 @@ struct TRINITY_DLL_DECL npc_nestlewood_owlkinAI : public ScriptedAI
if (DespawnTimer <= diff) if (DespawnTimer <= diff)
{ {
//once we are able to, despawn us //once we are able to, despawn us
m_creature->SetVisibility(VISIBILITY_OFF); m_creature->ForcedDespawn();
m_creature->setDeathState(JUST_DIED); return;
m_creature->SetHealth(0);
m_creature->CombatStop(true);
m_creature->DeleteThreatList();
m_creature->RemoveCorpse();
}else DespawnTimer -= diff; }else DespawnTimer -= diff;
} }