本文整理汇总了C++中Corpse::IsInWorld方法的典型用法代码示例。如果您正苦于以下问题:C++ Corpse::IsInWorld方法的具体用法?C++ Corpse::IsInWorld怎么用?C++ Corpse::IsInWorld使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Corpse
的用法示例。
在下文中一共展示了Corpse::IsInWorld方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetBaseMap
MapMgr::~MapMgr()
{
_shutdown=true;
sEventMgr.RemoveEvents(this);
delete ScriptInterface;
// Remove objects
if(_cells)
{
for (uint32 i = 0; i < _sizeX; i++)
{
if(_cells[i] != 0)
{
for (uint32 j = 0; j < _sizeY; j++)
{
if(_cells[i][j] != 0)
{
_cells[i][j]->_unloadpending=false;
_cells[i][j]->RemoveObjects();
}
}
}
}
}
for(set<Object*>::iterator itr = _mapWideStaticObjects.begin(); itr != _mapWideStaticObjects.end(); ++itr)
{
if((*itr)->IsInWorld())
(*itr)->RemoveFromWorld(false);
delete (*itr);
}
free(m_GOStorage);
free(m_CreatureStorage);
Corpse * pCorpse;
for(set<Corpse*>::iterator itr = m_corpses.begin(); itr != m_corpses.end();)
{
pCorpse = *itr;
++itr;
if(pCorpse->IsInWorld())
pCorpse->RemoveFromWorld(false);
delete pCorpse;
}
Log.Notice("MapMgr", "Instance %u shut down. (%s)" , m_instanceID, GetBaseMap()->GetName());
}
示例2: GetBaseMap
MapMgr::~MapMgr()
{
CollideInterface.DeactiveMap(_mapId);
_shutdown = true;
sEventMgr.RemoveEvents(this);
if(ScriptInterface != NULL)
{
delete ScriptInterface;
ScriptInterface = NULL;
}
delete _terrain;
// Remove objects
if(_cells)
{
for(uint32 i = 0; i < _sizeX; i++)
{
if(_cells[i] != 0)
{
for(uint32 j = 0; j < _sizeY; j++)
{
if(_cells[i][j] != 0)
{
_cells[i][j]->_unloadpending = false;
_cells[i][j]->RemoveObjects();
}
}
}
}
}
for(set<Object*>::iterator itr = _mapWideStaticObjects.begin(); itr != _mapWideStaticObjects.end(); ++itr)
{
if((*itr)->IsInWorld())
(*itr)->RemoveFromWorld(false);
delete(*itr);
}
_mapWideStaticObjects.clear();
GOStorage.clear();
CreatureStorage.clear();
Corpse* pCorpse;
for(set<Corpse*>::iterator itr = m_corpses.begin(); itr != m_corpses.end();)
{
pCorpse = *itr;
++itr;
if(pCorpse->IsInWorld())
pCorpse->RemoveFromWorld(false);
delete pCorpse;
}
m_corpses.clear();
if(mInstanceScript != NULL)
mInstanceScript->Destroy();
// Empty remaining containers
m_PlayerStorage.clear();
m_PetStorage.clear();
m_DynamicObjectStorage.clear();
_combatProgress.clear();
_updates.clear();
_processQueue.clear();
Sessions.clear();
activeCreatures.clear();
activeGameObjects.clear();
_sqlids_creatures.clear();
_sqlids_gameobjects.clear();
_reusable_guids_creature.clear();
_reusable_guids_gameobject.clear();
if(m_battleground)
{
m_battleground = NULL;
}
Log.Notice("MapMgr", "Instance %u shut down. (%s)" , m_instanceID, GetBaseMap()->GetName());
}