diff --git a/src/game/Map.h b/src/game/Map.h index 8cc9b4791..e0739c423 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -389,22 +389,6 @@ class MANGOS_DLL_SPEC Map : public GridRefManager, public MaNGOS::Obj void SendToPlayers(WorldPacket const* data) const; - template - void BroadcastWorker(Do& _do) const - { - for(MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - _do(itr->getSource()); - } - - template - void BroadcastWorker(Do& _do, uint32 zoneid) const - { - for(MapRefManager::const_iterator itr = m_mapRefManager.begin(); itr != m_mapRefManager.end(); ++itr) - if(itr->getSource()->GetZoneId()==zoneid) - _do(itr->getSource()); - } - - typedef MapRefManager PlayerList; PlayerList const& GetPlayers() const { return m_mapRefManager; } diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 490db791a..4cfff2373 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -1313,7 +1313,13 @@ void WorldObject::MonsterYellToZone(int32 textId, uint32 language, uint64 Target { MaNGOS::MonsterChatBuilder say_build(*this, CHAT_MSG_MONSTER_YELL, textId,language,TargetGuid); MaNGOS::LocalizedPacketDo say_do(say_build); - GetMap()->BroadcastWorker(say_do,GetZoneId()); + + uint32 zoneid = GetZoneId(); + + Map::PlayerList const& pList = GetMap()->GetPlayers(); + for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr) + if(itr->getSource()->GetZoneId()==zoneid) + say_do(itr->getSource()); } void WorldObject::MonsterTextEmote(int32 textId, uint64 TargetGuid, bool IsBossEmote) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 87355f104..5ee4f9f83 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7577" + #define REVISION_NR "7578" #endif // __REVISION_NR_H__