mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
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 5cf794b379)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user