Missing query for PVPSTATS
This commit is contained in:
@@ -999,6 +999,29 @@ void Battleground::EndBattleground(TeamId winnerTeamId)
|
|||||||
|
|
||||||
player->GetSession()->SendPacket(&pvpLogData);
|
player->GetSession()->SendPacket(&pvpLogData);
|
||||||
|
|
||||||
|
if (isBattleground() && sWorld->getBoolConfig(CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE))
|
||||||
|
{
|
||||||
|
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_PVPSTATS_PLAYER);
|
||||||
|
BattlegroundScoreMap::const_iterator score = PlayerScores.find(player->GetGUID());
|
||||||
|
|
||||||
|
stmt->setUInt32(0, battlegroundId);
|
||||||
|
stmt->setUInt32(1, player->GetGUIDLow());
|
||||||
|
stmt->setBool(2, bgTeamId == winnerTeamId);
|
||||||
|
stmt->setUInt32(3, score->second->GetKillingBlows());
|
||||||
|
stmt->setUInt32(4, score->second->GetDeaths());
|
||||||
|
stmt->setUInt32(5, score->second->GetHonorableKills());
|
||||||
|
stmt->setUInt32(6, score->second->GetBonusHonor());
|
||||||
|
stmt->setUInt32(7, score->second->GetDamageDone());
|
||||||
|
stmt->setUInt32(8, score->second->GetHealingDone());
|
||||||
|
stmt->setUInt32(9, score->second->GetAttr1());
|
||||||
|
stmt->setUInt32(10, score->second->GetAttr2());
|
||||||
|
stmt->setUInt32(11, score->second->GetAttr3());
|
||||||
|
stmt->setUInt32(12, score->second->GetAttr4());
|
||||||
|
stmt->setUInt32(13, score->second->GetAttr5());
|
||||||
|
|
||||||
|
CharacterDatabase.Execute(stmt);
|
||||||
|
}
|
||||||
|
|
||||||
WorldPacket data;
|
WorldPacket data;
|
||||||
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime(), GetArenaType(), player->GetBgTeamId());
|
sBattlegroundMgr->BuildBattlegroundStatusPacket(&data, this, player->GetCurrentBattlegroundQueueSlot(), STATUS_IN_PROGRESS, TIME_TO_AUTOREMOVE, GetStartTime(), GetArenaType(), player->GetBgTeamId());
|
||||||
player->GetSession()->SendPacket(&data);
|
player->GetSession()->SendPacket(&data);
|
||||||
@@ -1897,3 +1920,8 @@ void Battleground::RewardXPAtKill(Player* killer, Player* victim)
|
|||||||
if (sWorld->getBoolConfig(CONFIG_BG_XP_FOR_KILL) && killer && victim)
|
if (sWorld->getBoolConfig(CONFIG_BG_XP_FOR_KILL) && killer && victim)
|
||||||
killer->RewardPlayerAndGroupAtKill(victim, true);
|
killer->RewardPlayerAndGroupAtKill(victim, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8 Battleground::GetUniqueBracketId() const
|
||||||
|
{
|
||||||
|
return GetMinLevel() / 10;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user