本文整理汇总了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;
}