mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
Fixed build
This commit is contained in:
@@ -642,3 +642,13 @@ void OutdoorPvP::SendDefenseMessage(uint32 zoneId, uint32 id)
|
||||
Trinity::LocalizedPacketDo<DefenseMessageBuilder> localizer(builder);
|
||||
BroadcastWorker(localizer, zoneId);
|
||||
}
|
||||
|
||||
template<class Worker>
|
||||
void OutdoorPvP::BroadcastWorker(Worker& _worker, uint32 zoneId)
|
||||
{
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
for (PlayerSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
if (player->GetZoneId() == zoneId)
|
||||
_worker(player);
|
||||
}
|
||||
|
||||
@@ -304,14 +304,7 @@ class OutdoorPvP : public ZoneScript
|
||||
void TeamCastSpell(TeamId team, int32 spellId);
|
||||
|
||||
template<class Worker>
|
||||
void BroadcastWorker(Worker& _worker, uint32 zoneId)
|
||||
{
|
||||
for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i)
|
||||
for (PlayerSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr)
|
||||
if (Player* player = ObjectAccessor::FindPlayer(*itr))
|
||||
if (player->GetZoneId() == zoneId)
|
||||
_worker(player);
|
||||
}
|
||||
void BroadcastWorker(Worker& _worker, uint32 zoneId);
|
||||
};
|
||||
|
||||
#endif /*OUTDOOR_PVP_H_*/
|
||||
|
||||
Reference in New Issue
Block a user