mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
fix(Core/Arena): Fix logging scores in db (#17504)
This commit is contained in:
@@ -242,6 +242,7 @@ void Arena::EndBattleground(TeamId winnerTeamId)
|
||||
uint8 memberId = 0;
|
||||
for (auto const& [playerGuid, arenaLogEntryData] : ArenaLogEntries)
|
||||
{
|
||||
auto const& score = PlayerScores.find(playerGuid.GetCounter());
|
||||
stmt2 = CharacterDatabase.GetPreparedStatement(CHAR_INS_ARENA_LOG_MEMBERSTATS);
|
||||
stmt2->SetData(0, fightId);
|
||||
stmt2->SetData(1, ++memberId);
|
||||
@@ -250,9 +251,18 @@ void Arena::EndBattleground(TeamId winnerTeamId)
|
||||
stmt2->SetData(4, arenaLogEntryData.ArenaTeamId);
|
||||
stmt2->SetData(5, arenaLogEntryData.Acc);
|
||||
stmt2->SetData(6, arenaLogEntryData.IP);
|
||||
stmt2->SetData(7, arenaLogEntryData.DamageDone);
|
||||
stmt2->SetData(8, arenaLogEntryData.HealingDone);
|
||||
stmt2->SetData(9, arenaLogEntryData.KillingBlows);
|
||||
if (score != PlayerScores.end())
|
||||
{
|
||||
stmt2->SetData(7, score->second->GetDamageDone());
|
||||
stmt2->SetData(8, score->second->GetHealingDone());
|
||||
stmt2->SetData(9, score->second->GetKillingBlows());
|
||||
}
|
||||
else
|
||||
{
|
||||
stmt2->SetData(7, 0);
|
||||
stmt2->SetData(8, 0);
|
||||
stmt2->SetData(9, 0);
|
||||
}
|
||||
trans->Append(stmt2);
|
||||
}
|
||||
|
||||
|
||||
@@ -267,9 +267,6 @@ public:
|
||||
uint32 Acc{0};
|
||||
uint32 ArenaTeamId{0};
|
||||
std::string IP{};
|
||||
uint32 DamageDone{0};
|
||||
uint32 HealingDone{0};
|
||||
uint32 KillingBlows{0};
|
||||
};
|
||||
|
||||
enum BGHonorMode
|
||||
|
||||
Reference in New Issue
Block a user