fix(Core/Battleground): correctly limit Eye of the Storm max points to 1600 (#18669)

- before the max points could exceed 1600 on winning which e.g.
  resulted in the achievement 'The Perfect Storm' not beeing
  triggered correctly
This commit is contained in:
sudlud
2024-04-04 23:29:34 +02:00
committed by GitHub
parent e863873d4c
commit 94df67b1c2

View File

@@ -113,6 +113,8 @@ void BattlegroundEY::AddPoints(TeamId teamId, uint32 points)
{
uint8 honorRewards = uint8(m_TeamScores[teamId] / _honorTics);
m_TeamScores[teamId] += points;
if (m_TeamScores[teamId] > BG_EY_MAX_TEAM_SCORE)
m_TeamScores[teamId] = BG_EY_MAX_TEAM_SCORE;
for (; honorRewards < uint8(m_TeamScores[teamId] / _honorTics); ++honorRewards)
RewardHonorToTeam(GetBonusHonorFromKill(1), teamId);