本文整理汇总了C++中BattleGround::GetPlayerScoresBegin方法的典型用法代码示例。如果您正苦于以下问题:C++ BattleGround::GetPlayerScoresBegin方法的具体用法?C++ BattleGround::GetPlayerScoresBegin怎么用?C++ BattleGround::GetPlayerScoresBegin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BattleGround
的用法示例。
在下文中一共展示了BattleGround::GetPlayerScoresBegin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleBattleGroundPVPlogdataOpcode
void WorldSession::HandleBattleGroundPVPlogdataOpcode( WorldPacket &recv_data )
{
sLog.outDebug( "WORLD: Recvd MSG_PVP_LOG_DATA Message");
if(!GetPlayer()->InBattleGround())
return;
BattleGround* bg = sBattleGroundMgr.GetBattleGround(GetPlayer()->GetBattleGroundId());
if(!bg)
return;
WorldPacket data(MSG_PVP_LOG_DATA, (1+4+40*bg->GetPlayerScoresSize()));
data << uint8(0x0);
data << uint32(bg->GetPlayerScoresSize());
for(std::map<uint64, BattleGroundScore>::iterator itr=bg->GetPlayerScoresBegin();itr!=bg->GetPlayerScoresEnd();++itr)
{
data << (uint64)itr->first; //8
data << (uint32)itr->second.Rank; //4 //Rank
data << (uint32)itr->second.KillingBlows; //4
data << (uint32)itr->second.Deaths; //4
data << (uint32)itr->second.HonorableKills; //4
data << (uint32)itr->second.DishonorableKills; //4
data << (uint32)itr->second.BonusHonor; //4
data << (uint32)0;
data << (uint32)0;
/*data << itr->second.Rank;
data << itr->second.Unk1;
data << itr->second.Unk2;
data << itr->second.Unk3;
data << itr->second.Unk4;*/
}
SendPacket(&data);
sLog.outDebug( "WORLD: Send MSG_PVP_LOG_DATA Message players:%u", bg->GetPlayerScoresSize());
//data << (uint8)0; ////Warsong Gulch
/*data << (uint8)1; //
data << (uint8)1; //
//strangest thing 2 different
data << (uint32)NumberofPlayers;
for (uint8 i = 0; i < NumberofPlayers; i++)
{
data << (uint64)8;//GUID //8
data << (uint32)0;//rank
data << (uint32)0;//killing blows
data << (uint32)0;//honorable kills
data << (uint32)0;//deaths
data << (uint32)0;//Bonus Honor
data << (uint32)0;//I think Instance
data << (uint32)0;
data << (uint32)0; //8*4 = 32+8=40
//1 player is 40 bytes
}
data.hexlike();
SendPacket(&data);*/
}