Skip to content

Commit

Permalink
Fix Achievement Defense of the Ancients
Browse files Browse the repository at this point in the history
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 5cf794b)
  • Loading branch information
sirikfoll authored and Shauren committed Apr 2, 2016
1 parent ca1239a commit 7031090
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/server/game/Battlegrounds/Zones/BattlegroundSA.cpp
Expand Up @@ -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;
Expand All @@ -401,15 +403,15 @@ void BattlegroundSA::PostUpdateImpl(uint32 diff)
ToggleTimer();
ResetObjs();
GetBgMap()->UpdateAreaDependentAuras();
CastSpellOnTeam(SPELL_END_OF_ROUND, ALLIANCE);
CastSpellOnTeam(SPELL_END_OF_ROUND, HORDE);
return;
}
}
else if (Status == BG_SA_ROUND_TWO)
{
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)
Expand Down

0 comments on commit 7031090

Please sign in to comment.