mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 16:38:42 +01:00
@@ -1317,25 +1317,17 @@ void BattlefieldWG::SendInitWorldStatesToAll()
|
||||
SendInitWorldStatesTo(player);
|
||||
}
|
||||
|
||||
void BattlefieldWG::BrokenWallOrTower(TeamId /*team*/)
|
||||
void BattlefieldWG::BrokenWallOrTower(TeamId team, BfWGGameObjectBuilding* building)
|
||||
{
|
||||
/*
|
||||
uint32 const WGQuest[2][6] =
|
||||
{
|
||||
{ 13186, 13181, 13222, 13538, 13177, 13179 },
|
||||
{ 13185, 13183, 13223, 13539, 13178, 13180 },
|
||||
};
|
||||
*/
|
||||
|
||||
// might be some use for this in the future. old code commented out below. KL
|
||||
/* if (team == GetDefenderTeam())
|
||||
if (team == GetDefenderTeam())
|
||||
{
|
||||
for (GuidSet::const_iterator itr = m_PlayersInWar[GetAttackerTeam()].begin(); itr != m_PlayersInWar[GetAttackerTeam()].end(); ++itr)
|
||||
for (auto itr = m_PlayersInWar[GetAttackerTeam()].begin(); itr != m_PlayersInWar[GetAttackerTeam()].end(); ++itr)
|
||||
{
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
IncrementQuest(player, WGQuest[player->GetTeamId()][2], true);
|
||||
if (player->GetDistance2d(GetGameObject(building->GetGUID())) < 50.0f)
|
||||
player->KilledMonsterCredit(QUEST_CREDIT_DEFEND_SIEGE);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
// Called when a tower is broke
|
||||
@@ -1634,7 +1626,7 @@ void BfWGGameObjectBuilding::Destroyed()
|
||||
break;
|
||||
}
|
||||
|
||||
_wg->BrokenWallOrTower(_teamControl);
|
||||
_wg->BrokenWallOrTower(_teamControl, this);
|
||||
}
|
||||
|
||||
void BfWGGameObjectBuilding::Init(GameObject* go)
|
||||
|
||||
@@ -154,7 +154,8 @@ enum WintergraspQuests
|
||||
{
|
||||
QUEST_VICTORY_WINTERGRASP_A = 13181,
|
||||
QUEST_VICTORY_WINTERGRASP_H = 13183,
|
||||
QUEST_CREDIT_TOWERS_DESTROYED = 35074
|
||||
QUEST_CREDIT_TOWERS_DESTROYED = 35074,
|
||||
QUEST_CREDIT_DEFEND_SIEGE = 31284
|
||||
};
|
||||
|
||||
/*#########################
|
||||
@@ -343,7 +344,7 @@ class TC_GAME_API BattlefieldWG : public Battlefield
|
||||
* \brief Called when a wall/tower is broken
|
||||
* - Update quest
|
||||
*/
|
||||
void BrokenWallOrTower(TeamId team);
|
||||
void BrokenWallOrTower(TeamId team, BfWGGameObjectBuilding* building);
|
||||
|
||||
/**
|
||||
* \brief Called when a tower is damaged
|
||||
|
||||
Reference in New Issue
Block a user