diff options
author | Shauren <shauren.trinity@gmail.com> | 2014-10-22 10:53:05 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2014-10-22 10:53:05 +0200 |
commit | 1ac720f95f9728c0dfe89a8fcd6e6cb9edf26988 (patch) | |
tree | d245afb8145ab6dabd1d88e6c3f8a677dfe588ab /src/server/game | |
parent | f13d0da626a56abde3ac3a8b69ebb73a25fa7358 (diff) |
Core/Groups: Use full guid for battleground score storage
Diffstat (limited to 'src/server/game')
10 files changed, 15 insertions, 15 deletions
diff --git a/src/server/game/Battlegrounds/Arena.cpp b/src/server/game/Battlegrounds/Arena.cpp index b75a71f32b7..b0a40350518 100644 --- a/src/server/game/Battlegrounds/Arena.cpp +++ b/src/server/game/Battlegrounds/Arena.cpp @@ -42,7 +42,7 @@ Arena::Arena() void Arena::AddPlayer(Player* player) { Battleground::AddPlayer(player); - PlayerScores[player->GetGUIDLow()] = new ArenaScore(player->GetGUID(), player->GetBGTeam()); + PlayerScores[player->GetGUID()] = new ArenaScore(player->GetGUID(), player->GetBGTeam()); if (player->GetBGTeam() == ALLIANCE) // gold { @@ -180,10 +180,10 @@ void Arena::EndBattleground(uint32 winner) if (sWorld->getBoolConfig(CONFIG_ARENA_LOG_EXTENDED_INFO)) for (auto const& score : PlayerScores) - if (Player* player = ObjectAccessor::FindConnectedPlayer(ObjectGuid(HIGHGUID_PLAYER, score.first))) + if (Player* player = ObjectAccessor::FindConnectedPlayer(score.first)) { TC_LOG_DEBUG("bg.arena", "Statistics match Type: %u for %s (GUID: %u, Team: %d, IP: %s): %s", - GetArenaType(), player->GetName().c_str(), score.first, player->GetArenaTeamId(GetArenaType() == 5 ? 2 : GetArenaType() == 3), + GetArenaType(), player->GetName().c_str(), score.first.ToString().c_str(), player->GetArenaTeamId(GetArenaType() == 5 ? 2 : GetArenaType() == 3), player->GetSession()->GetRemoteAddress().c_str(), score.second->ToString().c_str()); } } diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 73951a5b35e..3a7cc7e9117 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -822,7 +822,7 @@ void Battleground::EndBattleground(uint32 winner) if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE)) { stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PVPSTATS_PLAYER); - BattlegroundScoreMap::const_iterator score = PlayerScores.find(player->GetGUIDLow()); + BattlegroundScoreMap::const_iterator score = PlayerScores.find(player->GetGUID()); stmt->setUInt32(0, battlegroundId); stmt->setUInt32(1, player->GetGUIDLow()); @@ -918,7 +918,7 @@ void Battleground::RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool Sen participant = true; } - BattlegroundScoreMap::iterator itr2 = PlayerScores.find(guid.GetCounter()); + BattlegroundScoreMap::iterator itr2 = PlayerScores.find(guid); if (itr2 != PlayerScores.end()) { delete itr2->second; // delete player's score @@ -1345,7 +1345,7 @@ void Battleground::BuildPvPLogDataPacket(WorldPacket& data) bool Battleground::UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor) { - BattlegroundScoreMap::const_iterator itr = PlayerScores.find(player->GetGUIDLow()); + BattlegroundScoreMap::const_iterator itr = PlayerScores.find(player->GetGUID()); if (itr == PlayerScores.end()) // player not found... return false; diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 851a191927c..8fb45f3a4d2 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -313,7 +313,7 @@ class Battleground BattlegroundPlayerMap const& GetPlayers() const { return m_Players; } uint32 GetPlayersSize() const { return m_Players.size(); } - typedef std::map<uint32, BattlegroundScore*> BattlegroundScoreMap; + typedef std::map<ObjectGuid, BattlegroundScore*> BattlegroundScoreMap; uint32 GetPlayerScoresSize() const { return PlayerScores.size(); } uint32 GetReviveQueueSize() const { return m_ReviveQueue.size(); } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 64c83488ec4..be2110b389c 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -224,7 +224,7 @@ void BattlegroundAB::StartingEventOpenDoors() void BattlegroundAB::AddPlayer(Player* player) { Battleground::AddPlayer(player); - PlayerScores[player->GetGUIDLow()] = new BattlegroundABScore(player->GetGUID(), player->GetBGTeam()); + PlayerScores[player->GetGUID()] = new BattlegroundABScore(player->GetGUID(), player->GetBGTeam()); } void BattlegroundAB::RemovePlayer(Player* /*player*/, ObjectGuid /*guid*/, uint32 /*team*/) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index a43339fb8e5..936f87497e6 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -437,7 +437,7 @@ void BattlegroundAV::StartingEventOpenDoors() void BattlegroundAV::AddPlayer(Player* player) { Battleground::AddPlayer(player); - PlayerScores[player->GetGUIDLow()] = new BattlegroundAVScore(player->GetGUID(), player->GetBGTeam()); + PlayerScores[player->GetGUID()] = new BattlegroundAVScore(player->GetGUID(), player->GetBGTeam()); } void BattlegroundAV::EndBattleground(uint32 winner) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp index 6da6f81e19b..034f7c91999 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundEY.cpp @@ -363,7 +363,7 @@ void BattlegroundEY::UpdatePointsIcons(uint32 Team, uint32 Point) void BattlegroundEY::AddPlayer(Player* player) { Battleground::AddPlayer(player); - PlayerScores[player->GetGUIDLow()] = new BattlegroundEYScore(player->GetGUID(), player->GetBGTeam()); + PlayerScores[player->GetGUID()] = new BattlegroundEYScore(player->GetGUID(), player->GetBGTeam()); m_PlayersNearPoint[EY_POINTS_MAX].push_back(player->GetGUID()); } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp index 1a93048812f..3b38a7c6c74 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundIC.cpp @@ -246,7 +246,7 @@ void BattlegroundIC::StartingEventOpenDoors() void BattlegroundIC::AddPlayer(Player* player) { Battleground::AddPlayer(player); - PlayerScores[player->GetGUIDLow()] = new BattlegroundICScore(player->GetGUID(), player->GetBGTeam()); + PlayerScores[player->GetGUID()] = new BattlegroundICScore(player->GetGUID(), player->GetBGTeam()); if (nodePoint[NODE_TYPE_QUARRY].nodeState == (player->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H)) player->CastSpell(player, SPELL_QUARRY, true); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index 666b7e41d23..0243b3f390e 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -478,7 +478,7 @@ void BattlegroundSA::FillInitialWorldStates(WorldPacket& data) void BattlegroundSA::AddPlayer(Player* player) { Battleground::AddPlayer(player); - PlayerScores[player->GetGUIDLow()] = new BattlegroundSAScore(player->GetGUID(), player->GetBGTeam()); + PlayerScores[player->GetGUID()] = new BattlegroundSAScore(player->GetGUID(), player->GetBGTeam()); SendTransportInit(player); diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp index 17478781137..3bdfd3a241d 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundWS.cpp @@ -229,7 +229,7 @@ void BattlegroundWS::StartingEventOpenDoors() void BattlegroundWS::AddPlayer(Player* player) { Battleground::AddPlayer(player); - PlayerScores[player->GetGUIDLow()] = new BattlegroundWGScore(player->GetGUID(), player->GetBGTeam()); + PlayerScores[player->GetGUID()] = new BattlegroundWGScore(player->GetGUID(), player->GetBGTeam()); } void BattlegroundWS::RespawnFlag(uint32 Team, bool captured) diff --git a/src/server/game/Guilds/Guild.cpp b/src/server/game/Guilds/Guild.cpp index 1c485e2f749..0b932ad053b 100644 --- a/src/server/game/Guilds/Guild.cpp +++ b/src/server/game/Guilds/Guild.cpp @@ -1220,8 +1220,8 @@ bool Guild::Create(Player* pLeader, std::string const& name) _todayExperience = 0; _CreateLogHolders(); - TC_LOG_DEBUG("guild", "GUILD: creating guild [%s] for leader %s (%u)", - name.c_str(), pLeader->GetName().c_str(), m_leaderGuid.GetCounter()); + TC_LOG_DEBUG("guild", "GUILD: creating guild [%s] for leader %s (%s)", + name.c_str(), pLeader->GetName().c_str(), m_leaderGuid.ToString().c_str()); SQLTransaction trans = CharacterDatabase.BeginTransaction(); |