本文整理汇总了C++中DungeonMap::Initialize方法的典型用法代码示例。如果您正苦于以下问题:C++ DungeonMap::Initialize方法的具体用法?C++ DungeonMap::Initialize怎么用?C++ DungeonMap::Initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DungeonMap
的用法示例。
在下文中一共展示了DungeonMap::Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateDungeonMap
DungeonMap* MapManager::CreateDungeonMap(uint32 id, uint32 InstanceId, Difficulty difficulty, DungeonPersistentState* save)
{
// make sure we have a valid map id
if (!sMapStore.LookupEntry(id))
{
sLog.outError("CreateDungeonMap: no entry for map %d", id);
MANGOS_ASSERT(false);
}
if (!ObjectMgr::GetInstanceTemplate(id))
{
sLog.outError("CreateDungeonMap: no instance template for map %d", id);
MANGOS_ASSERT(false);
}
// some instances only have one difficulty
if (!GetMapDifficultyData(id, difficulty))
difficulty = DUNGEON_DIFFICULTY_NORMAL;
DEBUG_LOG("MapInstanced::CreateDungeonMap: %s map instance %d for %d created with difficulty %d", save ? "" : "new ", InstanceId, id, difficulty);
DungeonMap* map = new DungeonMap(id, i_gridCleanUpDelay, InstanceId, difficulty);
// Dungeons can have saved instance data
bool load_data = save != nullptr;
map->Initialize(load_data);
return map;
}