//By wrapping the body of main in a try-catch block
// we can be assured that we'll catch all exceptions
// in the exception hierarchy. You can simply catch
// exception as is done below, or you can catch each
// of the exceptions in which you have an interest.
只要是在exception继承层次内的异常,都是可以捕捉到,
throw(); Destroys an object of class exception.
没有在exception层次内的异常也是不会被抛出的.
data.Initialize(MSG_PVP_LOG_DATA); // MSG_PVP_LOG_DATA
data << uint8(0x0);
data << uint32(sBattleGroundMgr.GetBattleGround(GetPlayer()->m_bgBattleGroundID)->GetPlayerScoresSize());
for(std::map<uint64, BattleGroundScore>::iterator itr=sBattleGroundMgr.GetBattleGround(GetPlayer()->m_bgBattleGroundID)->GetPlayerScoresBegin();itr!=sBattleGroundMgr.GetBattleGround(GetPlayer()->m_bgBattleGroundID)->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;*/
}
GetPlayer()->GetSession()->SendPacket(&data);
}
catch(...)
{
sLog.outDebug("WORLD ERROR:。WorldSession::HandleBattleGroundPVPlogdataOpcode has an Error been throw.");
}