Core/Achievements: Added also check for player's team. Only defenders should get this achievement
This commit is contained in:
@@ -487,6 +487,9 @@ class BattlegroundSA : public Battleground
|
|||||||
// Achievement Defense of the Ancients
|
// Achievement Defense of the Ancients
|
||||||
bool gateDestroyed;
|
bool gateDestroyed;
|
||||||
|
|
||||||
|
/// Id of attacker team
|
||||||
|
TeamId Attackers;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -539,8 +542,6 @@ class BattlegroundSA : public Battleground
|
|||||||
/// Send packet to player for destroy boats (client part)
|
/// Send packet to player for destroy boats (client part)
|
||||||
void SendTransportsRemove(Player* player);
|
void SendTransportsRemove(Player* player);
|
||||||
|
|
||||||
/// Id of attacker team
|
|
||||||
TeamId Attackers;
|
|
||||||
/// Totale elapsed time of current round
|
/// Totale elapsed time of current round
|
||||||
uint32 TotalTime;
|
uint32 TotalTime;
|
||||||
/// Max time of round
|
/// Max time of round
|
||||||
|
|||||||
@@ -247,6 +247,9 @@ class achievement_bg_sa_defense_of_ancients : public AchievementCriteriaScript
|
|||||||
if (!battleground)
|
if (!battleground)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (player->GetTeamId() == static_cast<BattlegroundSA*>(battleground)->Attackers)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (!static_cast<BattlegroundSA*>(battleground)->gateDestroyed);
|
if (!static_cast<BattlegroundSA*>(battleground)->gateDestroyed);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user