Core/Entities: Use ObjectGuid class in game project
This commit is contained in:
1 parent
ce67a097bf
commit
a0e50ea35f
256 files changed
+3334
-3833
No files matched your search
@@ -37,9 +37,9 @@
|
||||
|
||||
void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
ObjectGuid guid;
|
||||
recvData >> guid;
|
||||
TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
|
||||
TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEMASTER_HELLO Message from %s", guid.ToString().c_str());
|
||||
|
||||
Creature* unit = GetPlayer()->GetMap()->GetCreature(guid);
|
||||
if (!unit)
|
||||
@@ -63,7 +63,7 @@ void WorldSession::HandleBattlemasterHelloOpcode(WorldPacket& recvData)
|
||||
SendBattleGroundList(guid, bgTypeId);
|
||||
}
|
||||
|
||||
void WorldSession::SendBattleGroundList(uint64 guid, BattlegroundTypeId bgTypeId)
|
||||
void WorldSession::SendBattleGroundList(ObjectGuid guid, BattlegroundTypeId bgTypeId)
|
||||
{
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildBattlegroundListPacket(&data, guid, _player, bgTypeId, 0);
|
||||
@@ -72,7 +72,7 @@ void WorldSession::SendBattleGroundList(uint64 guid, BattlegroundTypeId bgTypeId
|
||||
|
||||
void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
{
|
||||
uint64 guid;
|
||||
ObjectGuid guid;
|
||||
uint32 bgTypeId_;
|
||||
uint32 instanceId;
|
||||
uint8 joinAsGroup;
|
||||
@@ -98,7 +98,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
|
||||
BattlegroundTypeId bgTypeId = BattlegroundTypeId(bgTypeId_);
|
||||
|
||||
TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from (GUID: %u TypeId:%u)", GUID_LOPART(guid), GuidHigh2TypeId(GUID_HIPART(guid)));
|
||||
TC_LOG_DEBUG("network", "WORLD: Recvd CMSG_BATTLEMASTER_JOIN Message from %s", guid.ToString().c_str());
|
||||
|
||||
// can do this, since it's battleground, not arena
|
||||
BattlegroundQueueTypeId bgQueueTypeId = BattlegroundMgr::BGQueueTypeId(bgTypeId, 0);
|
||||
@@ -257,14 +257,14 @@ void WorldSession::HandleBattlegroundPlayerPositionsOpcode(WorldPacket& /*recvDa
|
||||
Player* allianceFlagCarrier = NULL;
|
||||
Player* hordeFlagCarrier = NULL;
|
||||
|
||||
if (uint64 guid = bg->GetFlagPickerGUID(TEAM_ALLIANCE))
|
||||
if (ObjectGuid guid = bg->GetFlagPickerGUID(TEAM_ALLIANCE))
|
||||
{
|
||||
allianceFlagCarrier = ObjectAccessor::FindPlayer(guid);
|
||||
if (allianceFlagCarrier)
|
||||
++flagCarrierCount;
|
||||
}
|
||||
|
||||
if (uint64 guid = bg->GetFlagPickerGUID(TEAM_HORDE))
|
||||
if (ObjectGuid guid = bg->GetFlagPickerGUID(TEAM_HORDE))
|
||||
{
|
||||
hordeFlagCarrier = ObjectAccessor::FindPlayer(guid);
|
||||
if (hordeFlagCarrier)
|
||||
@@ -336,7 +336,7 @@ void WorldSession::HandleBattlefieldListOpcode(WorldPacket &recvData)
|
||||
}
|
||||
|
||||
WorldPacket data;
|
||||
sBattlegroundMgr->BuildBattlegroundListPacket(&data, 0, _player, BattlegroundTypeId(bgTypeId), fromWhere);
|
||||
sBattlegroundMgr->BuildBattlegroundListPacket(&data, ObjectGuid::Empty, _player, BattlegroundTypeId(bgTypeId), fromWhere);
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ void WorldSession::HandleBattleFieldPortOpcode(WorldPacket &recvData)
|
||||
ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(ginfo.Team);
|
||||
if (at)
|
||||
{
|
||||
TC_LOG_DEBUG("bg.battleground", "UPDATING memberLost's personal arena rating for %u by opponents rating: %u, because he has left queue!", GUID_LOPART(_player->GetGUID()), ginfo.OpponentsTeamRating);
|
||||
TC_LOG_DEBUG("bg.battleground", "UPDATING memberLost's personal arena rating for %s by opponents rating: %u, because he has left queue!", _player->GetGUID().ToString().c_str(), ginfo.OpponentsTeamRating);
|
||||
at->MemberLost(_player, ginfo.OpponentsMatchmakerRating);
|
||||
at->SaveToDB();
|
||||
}
|
||||
@@ -587,7 +587,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
|
||||
{
|
||||
TC_LOG_DEBUG("network", "WORLD: CMSG_BATTLEMASTER_JOIN_ARENA");
|
||||
|
||||
uint64 guid; // arena Battlemaster guid
|
||||
ObjectGuid guid; // arena Battlemaster guid
|
||||
uint8 arenaslot; // 2v2, 3v3 or 5v5
|
||||
uint8 asGroup; // asGroup
|
||||
uint8 isRated; // isRated
|
||||
@@ -753,7 +753,7 @@ void WorldSession::HandleBattlemasterJoinArena(WorldPacket& recvData)
|
||||
|
||||
void WorldSession::HandleReportPvPAFK(WorldPacket& recvData)
|
||||
{
|
||||
uint64 playerGuid;
|
||||
ObjectGuid playerGuid;
|
||||
recvData >> playerGuid;
|
||||
Player* reportedPlayer = ObjectAccessor::FindPlayer(playerGuid);
|
||||
|
||||
|
||||
Reference in new issue
Block a user