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


C++ BattlegroundMap类代码示例

本文整理汇总了C++中BattlegroundMap的典型用法代码示例。如果您正苦于以下问题:C++ BattlegroundMap类的具体用法?C++ BattlegroundMap怎么用?C++ BattlegroundMap使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了BattlegroundMap类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ACE_GUARD_RETURN

BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId,
		Battleground* bg) {
	// load/create a map
	ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);

	sLog->outDebug(LOG_FILTER_MAPS,
			"MapInstanced::CreateBattleground: map bg %d for %d created.",
			InstanceId, GetId());

	PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(
			bg->GetMapId(), bg->GetMinLevel());

	uint8 spawnMode;

	if (bracketEntry)
		spawnMode = bracketEntry->difficulty;
	else
		spawnMode = REGULAR_DIFFICULTY;

	BattlegroundMap *map = new BattlegroundMap(GetId(), GetGridExpiry(),
			InstanceId, this, spawnMode);
	ASSERT(map->IsBattlegroundOrArena());
	map->SetBG(bg);
	bg->SetBgMap(map);

	m_InstancedMaps[InstanceId] = map;
	return map;
}
开发者ID:micheledark,项目名称:ArkCORE,代码行数:28,代码来源:MapInstanced.cpp

示例2: ACE_GUARD_RETURN

BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battleground* pBg)
{
    if(!pBg)
        return NULL;

    // load/create map
    ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);

    PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(pBg->GetMapId(), pBg->GetMinLevel());

    uint8 spawnMode;

    if(bracketEntry)
        spawnMode = bracketEntry->difficulty;
    else
        spawnMode = REGULAR_DIFFICULTY;

    BattlegroundMap* pMap = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode);
    ASSERT(pMap->IsBattlegroundOrArena());
    pMap->SetBG(pBg);
    pBg->SetBgMap(pMap);

    m_InstancedMaps[InstanceId] = pMap;
    return pMap;
}
开发者ID:Darkelmo,项目名称:MythCore,代码行数:25,代码来源:MapInstanced.cpp

示例3: lock

BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battleground* bg)
{
    // load/create a map
    std::lock_guard<std::mutex> lock(_mapLock);

    TC_LOG_DEBUG("maps", "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());

    BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, DIFFICULTY_NONE);
    ASSERT(map->IsBattlegroundOrArena());
    map->SetBG(bg);
    bg->SetBgMap(map);

    m_InstancedMaps[InstanceId] = map;
    return map;
}
开发者ID:beyourself,项目名称:DeathCore_6.x,代码行数:15,代码来源:MapInstanced.cpp

示例4: ACE_GUARD_RETURN

BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battleground* bg)
{
    // load/create a map
    ACE_GUARD_RETURN(ACE_Thread_Mutex, Guard, Lock, NULL);

    sLog->outDebug (LOG_FILTER_NETWORKIO, "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());

    BattlegroundMap *map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this);
    ASSERT(map->IsBattlegroundOrArena());
    map->SetBG(bg);
    bg->SetBgMap(map);

    m_InstancedMaps[InstanceId] = map;
    return map;
}
开发者ID:Bootz,项目名称:SkyFire_one,代码行数:15,代码来源:MapInstanced.cpp

示例5: guard

BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battleground* bg)
{
    // load/create a map
    Guard guard(*this);

    sLog.outDebug("MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());

    BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this);
    ASSERT(map->IsBattlegroundOrArena());
    map->SetBG(bg);
    bg->SetBgMap(map);

    m_InstancedMaps[InstanceId] = map;
    return map;
}
开发者ID:Adeer,项目名称:OregonCore,代码行数:15,代码来源:MapInstanced.cpp

示例6: INFINITY_GUARD

BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battleground* bg)
{
    // load/create a map
    INFINITY_GUARD(ACE_Thread_Mutex, Lock);

    IC_LOG_DEBUG("maps", "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());

    uint8 spawnMode;

    spawnMode = REGULAR_DIFFICULTY;

    BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode);
    ASSERT(map->IsBattlegroundOrArena());
    map->SetBG(bg);
    bg->SetBgMap(map);

    m_InstancedMaps[InstanceId] = map;
    return map;
}
开发者ID:aikon-com-cn,项目名称:Infinity-Core,代码行数:19,代码来源:MapInstanced.cpp

示例7: lock

BattlegroundMap* MapInstanced::CreateBattleground(uint32 InstanceId, Battleground* bg)
{
    // load/create a map
    std::lock_guard<std::mutex> lock(_mapLock);

    TC_LOG_DEBUG("maps", "MapInstanced::CreateBattleground: map bg %d for %d created.", InstanceId, GetId());

    PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketByLevel(bg->GetMapId(), bg->GetMinLevel());

    uint8 spawnMode;

    if (bracketEntry)
        spawnMode = bracketEntry->difficulty;
    else
        spawnMode = REGULAR_DIFFICULTY;

    BattlegroundMap* map = new BattlegroundMap(GetId(), GetGridExpiry(), InstanceId, this, spawnMode);
    ASSERT(map->IsBattlegroundOrArena());
    map->SetBG(bg);
    bg->SetBgMap(map);

    m_InstancedMaps[InstanceId] = map;
    return map;
}
开发者ID:cooler-SAI,项目名称:ElunaTrinityWotlk,代码行数:24,代码来源:MapInstanced.cpp


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