本文整理匯總了C++中FindBaseMap函數的典型用法代碼示例。如果您正苦於以下問題:C++ FindBaseMap函數的具體用法?C++ FindBaseMap怎麽用?C++ FindBaseMap使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了FindBaseMap函數的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: FindBaseMap
Map* MapManager::CreateBaseMap(uint32 id)
{
Map* map = FindBaseMap(id);
if (map == NULL)
{
TRINITY_GUARD(ACE_Thread_Mutex, Lock);
map = FindBaseMap(id);
if (map == NULL) // pussywizard: check again after acquiring mutex
{
MapEntry const* entry = sMapStore.LookupEntry(id);
ASSERT(entry);
if (entry->Instanceable())
map = new MapInstanced(id);
else
{
map = new Map(id, 0, REGULAR_DIFFICULTY);
map->LoadRespawnTimes();
}
i_maps[id] = map;
}
}
ASSERT(map);
return map;
}
示例2: FindBaseMap
Map* MapManager::FindBaseNonInstanceMap(uint32 mapId) const
{
Map* map = FindBaseMap(mapId);
if (map && map->Instanceable())
return NULL;
return map;
}
示例3: FindBaseMap
Map* MapManager::CreateBaseMap(uint32 id)
{
Map* map = FindBaseMap(id);
if (map == nullptr)
{
std::lock_guard<std::mutex> lock(_mapsLock);
MapEntry const* entry = sMapStore.LookupEntry(id);
ASSERT(entry);
if (entry->Instanceable())
map = new MapInstanced(id, i_gridCleanUpDelay);
else
{
map = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
map->LoadRespawnTimes();
map->LoadCorpseData();
}
i_maps[id] = map;
}
ASSERT(map);
return map;
}
示例4: FindBaseMap
Map* MapManager::CreateBaseMap(uint32 id)
{
Map* map = FindBaseMap(id);
if (!map)
{
MapEntry const* entry = sMapStore.AssertEntry(id);
if (entry->ParentMapID != -1)
{
CreateBaseMap(entry->ParentMapID);
// must have been created by parent map
map = FindBaseMap(id);
return ASSERT_NOTNULL(map);
}
std::lock_guard<std::mutex> lock(_mapsLock);
map = CreateBaseMap_i(entry);
}
ASSERT(map);
return map;
}
示例5: FindBaseMap
Map* MapManager::CreateBaseMap(uint32 id)
{
Map* m = FindBaseMap(id);
if (m == NULL)
{
SKYFIRE_GUARD(ACE_Thread_Mutex, Lock);
const MapEntry* entry = sMapStore.LookupEntry(id);
if (entry && entry->Instanceable())
{
m = new MapInstanced(id, i_gridCleanUpDelay);
}
else
{
m = new Map(id, i_gridCleanUpDelay, 0, REGULAR_DIFFICULTY);
}
i_maps[id] = m;
}
ASSERT(m != NULL);
return m;
}