From 7031090dc3cfa727dff50c2739ed9ee7dc0f352a Mon Sep 17 00:00:00 2001 From: sirikfoll Date: Wed, 27 Jan 2016 14:57:05 -0200 Subject: [PATCH] Fix Achievement Defense of the Ancients The spell that trigger the achievement check, needs to be cast before setting up the variables used for the second round, otherwise the achievement will be granted to the wrong team. Also, SPELL_END_OF_ROUND needs to be casted on the end of the second round too, this was confirmed in retail. (cherry picked from commit 5cf794b3797c5c8b911e335fc29ae1e88de3ffea) --- src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp index d500771399e2d..149d914d128b7 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp @@ -389,6 +389,8 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) { if (TotalTime >= BG_SA_ROUNDLENGTH) { + CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); + CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); RoundScores[0].winner = Attackers; RoundScores[0].time = BG_SA_ROUNDLENGTH; TotalTime = 0; @@ -401,8 +403,6 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) ToggleTimer(); ResetObjs(); GetBgMap()->UpdateAreaDependentAuras(); - CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); - CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); return; } } @@ -410,6 +410,8 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff) { if (TotalTime >= EndRoundTimer) { + CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE); + CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE); RoundScores[1].time = BG_SA_ROUNDLENGTH; RoundScores[1].winner = (Attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE; if (RoundScores[0].time == RoundScores[1].time)