本文整理汇总了C++中OutdoorPvPWG::GetMaximumPlayerLimit方法的典型用法代码示例。如果您正苦于以下问题:C++ OutdoorPvPWG::GetMaximumPlayerLimit方法的具体用法?C++ OutdoorPvPWG::GetMaximumPlayerLimit怎么用?C++ OutdoorPvPWG::GetMaximumPlayerLimit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OutdoorPvPWG
的用法示例。
在下文中一共展示了OutdoorPvPWG::GetMaximumPlayerLimit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SendWGEntered
// Send that packet when player accept to join war(NEED TEST)
void WorldSession::SendWGEntered(uint32 BattleId)
{
OutdoorPvPWG *pvpWG = (OutdoorPvPWG*)sOutdoorPvPMgr->GetOutdoorPvPToZoneId(4197);
if(!pvpWG || !_player || !pvpWG->isWarTime())
return;
uint32 team = _player->GetTeamId();
if (pvpWG->m_playersinwar[team].size() < (pvpWG->GetMaximumPlayerLimit()/2)+1){}else
return;
pvpWG->m_playersinwar[team].insert(_player);
uint32 SPELL_TELEPORT_CAMP;
if (team == TEAM_ALLIANCE)
SPELL_TELEPORT_CAMP = SPELL_TELEPORT_ALLIENCE_CAMP;
else
SPELL_TELEPORT_CAMP = SPELL_TELEPORT_HORDE_CAMP;
if (pvpWG->getAttackerTeam() == team)
_player->CastSpell(_player, SPELL_TELEPORT_CAMP, false);
else
_player->CastSpell(_player, SPELL_TELEPORT_FORTRESS, false);
WorldPacket data(SMSG_BATTLEFIELD_MGR_ENTERED, 7);
data << uint32(BattleId); // Battle Id of Wintergrasp.
data << uint8(1); //unk
data << uint8(1); //unk
data << uint8(_player->isAFK()?1:0); //Clear AFK
SendPacket(&data);
}