本文整理汇总了C++中BattleGround::SetID方法的典型用法代码示例。如果您正苦于以下问题:C++ BattleGround::SetID方法的具体用法?C++ BattleGround::SetID怎么用?C++ BattleGround::SetID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BattleGround
的用法示例。
在下文中一共展示了BattleGround::SetID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CreateBattleGround
uint32 BattleGroundMgr::CreateBattleGround(uint32 MaxPlayersPerTeam, uint32 LevelMin, uint32 LevelMax, std::string BattleGroundName, uint32 MapID, float Team1StartLocX, float Team1StartLocY, float Team1StartLocZ, float Team1StartLocO, float Team2StartLocX, float Team2StartLocY, float Team2StartLocZ, float Team2StartLocO)
{
// Create the BG
BattleGround *bg = new BattleGround;
bg->SetMapId(MapID);
bg->SetMaxPlayersPerTeam(MaxPlayersPerTeam);
bg->SetMaxPlayers(MaxPlayersPerTeam*2);
bg->SetName(BattleGroundName);
bg->SetTeamStartLoc(0, Team1StartLocX, Team1StartLocY, Team1StartLocZ, Team1StartLocO);
bg->SetTeamStartLoc(1, Team2StartLocX, Team2StartLocY, Team2StartLocZ, Team2StartLocO);
bg->SetLevelRange(LevelMin, LevelMax);
uint32 BattleGroundID = m_BattleGrounds.size(); // this will be replaced with instance ID later.
if(BattleGroundID == 0) BattleGroundID = 1;
bg->SetID(BattleGroundID);
AddBattleGround(BattleGroundID, bg);
sLog.outString("BattleGroundMgr: Created new battleground: %u %s (Map %u, %u players per team, Levels %u-%u)", BattleGroundID, bg->m_Name.c_str(), bg->m_MapId, bg->m_MaxPlayersPerTeam, bg->m_LevelMin, bg->m_LevelMax);
return BattleGroundID;
}