mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Wintergrasp: give quest credit for southern towers destroyed.
Updates #7953.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
/*#########################
|
||||
|
||||
Reference in New Issue
Block a user