// Note: this should be done by creature linkin in core void DoDespawnAdds() { for (GUIDVector::const_iterator itr = m_vAddGuids.begin(); itr != m_vAddGuids.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); } m_vAddGuids.clear(); for (GUIDVector::const_iterator itr = m_vAssassinGuids.begin(); itr != m_vAssassinGuids.end(); ++itr) { if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr)) pTemp->ForcedDespawn(); } m_vAssassinGuids.clear(); }
void InfernalCleanup() { // Infernal Cleanup for(GUIDVector::const_iterator itr = m_vInfernalGuids.begin(); itr!= m_vInfernalGuids.end(); ++itr) { Creature *pInfernal = m_creature->GetMap()->GetCreature(*itr); if (pInfernal && pInfernal->isAlive()) { pInfernal->SetVisibility(VISIBILITY_OFF); pInfernal->SetDeathState(JUST_DIED); } } m_vInfernalGuids.clear(); }