Core/Wintergrasp: give quest credit for southern towers destroyed.

Updates #7953.
This commit is contained in:
SnapperRy
2016-10-04 17:23:36 +02:00
committed by Aokromes
parent 638368f0e0
commit 856b172060
2 changed files with 7 additions and 5 deletions

View File

@@ -1340,7 +1340,7 @@ uint32 const WGQuest[2][6] =
// Called when a tower is broke
void BattlefieldWG::UpdatedDestroyedTowerCount(TeamId team)
{
// Destroy an attack tower
// Southern tower
if (team == GetAttackerTeam())
{
// Update counter
@@ -1352,12 +1352,13 @@ void BattlefieldWG::UpdatedDestroyedTowerCount(TeamId team)
if (Player* player = ObjectAccessor::FindPlayer(*itr))
player->RemoveAuraFromStack(SPELL_TOWER_CONTROL);
// Add buff stack to defenders
// Add buff stack to defenders and give achievement/quest credit
for (auto itr = m_PlayersInWar[GetDefenderTeam()].begin(); itr != m_PlayersInWar[GetDefenderTeam()].end(); ++itr)
{
if (Player* player = ObjectAccessor::FindPlayer(*itr))
{
player->CastSpell(player, SPELL_TOWER_CONTROL, true);
player->KilledMonsterCredit(QUEST_CREDIT_TOWERS_DESTROYED);
DoCompleteOrIncrementAchievement(ACHIEVEMENTS_WG_TOWER_DESTROY, player);
}
}
@@ -1372,7 +1373,7 @@ void BattlefieldWG::UpdatedDestroyedTowerCount(TeamId team)
SendInitWorldStatesToAll();
}
}
else
else // Keep tower
{
UpdateData(BATTLEFIELD_WG_DATA_DAMAGED_TOWER_DEF, -1);
UpdateData(BATTLEFIELD_WG_DATA_BROKEN_TOWER_DEF, 1);

View File

@@ -152,8 +152,9 @@ enum WintergraspAreaIds
enum WintergraspQuests
{
QUEST_VICTORY_WINTERGRASP_A = 13181,
QUEST_VICTORY_WINTERGRASP_H = 13183
QUEST_VICTORY_WINTERGRASP_A = 13181,
QUEST_VICTORY_WINTERGRASP_H = 13183,
QUEST_CREDIT_TOWERS_DESTROYED = 35074
};
/*#########################