当前位置: 首页>>代码示例>>C++>>正文


C++ Corpse::IsInWorld方法代码示例

本文整理汇总了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());
}
开发者ID:Chero,项目名称:abcwow,代码行数:50,代码来源:MapMgr.cpp

示例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());
}
开发者ID:Thomas195,项目名称:arcemu,代码行数:83,代码来源:MapMgr.cpp


注:本文中的Corpse::IsInWorld方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。