Merge pull request #6490 from Vincent-Michael/notEvenAScratch
Battleground/Strand of the Ancients: Fix Achievement: Not Even a Scratch
This commit is contained in:
@@ -56,6 +56,8 @@ void BattlegroundSA::Reset()
|
||||
GateStatus[i] = BG_SA_GATE_OK;
|
||||
ShipsStarted = false;
|
||||
gateDestroyed = false;
|
||||
_notEvenAScratch[BG_TEAM_ALLIANCE] = true;
|
||||
_notEvenAScratch[BG_TEAM_HORDE] = true;
|
||||
Status = BG_SA_WARMUP;
|
||||
}
|
||||
|
||||
@@ -553,13 +555,13 @@ void BattlegroundSA::EventPlayerDamagedGO(Player* /*player*/, GameObject* go, ui
|
||||
SendWarningToAll(LANG_BG_SA_IS_UNDER_ATTACK, go->GetGOInfo()->name.c_str());
|
||||
}
|
||||
|
||||
void BattlegroundSA::HandleKillUnit(Creature* unit, Player* killer)
|
||||
void BattlegroundSA::HandleKillUnit(Creature* creature, Player* killer)
|
||||
{
|
||||
if (!unit)
|
||||
return;
|
||||
|
||||
if (unit->GetEntry() == NPC_DEMOLISHER_SA)
|
||||
if (creature->GetEntry() == NPC_DEMOLISHER_SA)
|
||||
{
|
||||
UpdatePlayerScore(killer, SCORE_DESTROYED_DEMOLISHER, 1);
|
||||
_notEvenAScratch[Attackers] = false;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -456,7 +456,7 @@ class BattlegroundSA : public Battleground
|
||||
/// Called when a player deal damage to building (door)
|
||||
virtual void EventPlayerDamagedGO(Player* player, GameObject* go, uint32 eventType);
|
||||
/// Called when a player kill a unit in bg
|
||||
virtual void HandleKillUnit(Creature* unit, Player* killer);
|
||||
virtual void HandleKillUnit(Creature* creature, Player* killer);
|
||||
/// Return the nearest graveyard where player can respawn
|
||||
virtual WorldSafeLocsEntry const* GetClosestGraveYard(Player* player);
|
||||
/// Called when a player click on flag (graveyard flag)
|
||||
@@ -531,9 +531,12 @@ class BattlegroundSA : public Battleground
|
||||
/// Update score board
|
||||
void UpdatePlayerScore(Player* Source, uint32 type, uint32 value, bool doAddHonor = true);
|
||||
|
||||
// Achievement Defense of the Ancients
|
||||
// Achievement: Defense of the Ancients
|
||||
bool gateDestroyed;
|
||||
|
||||
// Achievement: Not Even a Scratch
|
||||
bool notEvenAScratch(uint32 team) const { return _notEvenAScratch[GetTeamIndexByTeamId(team)]; }
|
||||
|
||||
/// Id of attacker team
|
||||
TeamId Attackers;
|
||||
|
||||
@@ -615,5 +618,7 @@ class BattlegroundSA : public Battleground
|
||||
bool InitSecondRound;
|
||||
std::map<uint32/*id*/, uint32/*timer*/> DemoliserRespawnList;
|
||||
|
||||
// Achievement: Not Even a Scratch
|
||||
bool _notEvenAScratch[BG_TEAMS_COUNT];
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user