本文整理汇总了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;
}
开发者ID:AlexHjelm,项目名称:sunwell,代码行数:29,代码来源:MapManager.cpp
示例2: FindBaseMap
Map* MapManager::FindBaseNonInstanceMap(uint32 mapId) const
{
Map* map = FindBaseMap(mapId);
if (map && map->Instanceable())
return NULL;
return map;
}
开发者ID:Davuk,项目名称:ArkCORE-NG,代码行数:7,代码来源:MapManager.cpp
示例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;
}
开发者ID:Refuge89,项目名称:TrinityCore,代码行数:26,代码来源:MapManager.cpp
示例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;
}
开发者ID:090809,项目名称:TrinityCore,代码行数:23,代码来源:MapManager.cpp
示例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;
}
开发者ID:SkyFireArchives,项目名称:SkyFireEMU_406a,代码行数:23,代码来源:MapManager.cpp
注:本文中的FindBaseMap函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论