aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShinDarth <borzifrancesco@gmail.com>2014-08-29 17:16:11 +0200
committerShinDarth <borzifrancesco@gmail.com>2014-08-29 17:16:11 +0200
commitf3f607179702b98f784ef30c2f967b3ecaadf534 (patch)
treedd26467523315fcb110eec9691d2a0019e4e0994 /src
parent1b7a9d5bfb9261b0a2889aac33e5cf1e68c438ce (diff)
Core/BG: prevent possible overflow + clean
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Battlegrounds/Battleground.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp
index c88f9beee15..69f6666dff3 100644
--- a/src/server/game/Battlegrounds/Battleground.cpp
+++ b/src/server/game/Battlegrounds/Battleground.cpp
@@ -724,7 +724,7 @@ void Battleground::EndBattleground(uint32 winner)
if (result)
{
Field* fields = result->Fetch();
- battleground_id = fields[0].GetInt64() + 1;
+ battleground_id = fields[0].GetUInt64() + 1;
}
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PVPSTATS_BATTLEGROUND);
@@ -810,8 +810,6 @@ void Battleground::EndBattleground(uint32 winner)
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PVPSTATS_PLAYER);
BattlegroundScoreMap::const_iterator score = PlayerScores.find(player->GetGUIDLow());
- // battleground_id, character_guid, score_killing_blows, score_deaths, score_honorable_kills, score_bonus_honor, score_damage_done, score_healing_done
-
stmt->setUInt32(0, battleground_id);
stmt->setUInt32(1, player->GetGUIDLow());
stmt->setUInt32(2, score->second->GetKillingBlows());