diff --git a/src/game/Map.cpp b/src/game/Map.cpp index 6a4a5e12d..bc86d42fb 100644 --- a/src/game/Map.cpp +++ b/src/game/Map.cpp @@ -3230,13 +3230,15 @@ void Map::MonsterYellToMap(CreatureInfo const* cinfo, int32 textId, uint32 langu * Function to play sound to all players in map * * @param soundId Played Sound + * @param zoneId Id of the Zone to which the sound should be restricted */ -void Map::PlayDirectSoundToMap(uint32 soundId) +void Map::PlayDirectSoundToMap(uint32 soundId, uint32 zoneId /*=0*/) { WorldPacket data(SMSG_PLAY_SOUND, 4); data << uint32(soundId); Map::PlayerList const& pList = GetPlayers(); for (PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr) - itr->getSource()->SendDirectMessage(&data); + if (!zoneId || itr->getSource()->GetZoneId() == zoneId) + itr->getSource()->SendDirectMessage(&data); } diff --git a/src/game/Map.h b/src/game/Map.h index 31e8731cb..e44f05cbb 100644 --- a/src/game/Map.h +++ b/src/game/Map.h @@ -257,7 +257,7 @@ class MANGOS_DLL_SPEC Map : public GridRefManager void MonsterYellToMap(ObjectGuid guid, int32 textId, uint32 language, Unit* target); void MonsterYellToMap(CreatureInfo const* cinfo, int32 textId, uint32 language, Unit* target, uint32 senderLowGuid = 0); - void PlayDirectSoundToMap(uint32 soundId); + void PlayDirectSoundToMap(uint32 soundId, uint32 zoneId = 0); private: void LoadMapAndVMap(int gx, int gy); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 14b6f36b4..7d93cd27a 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 "11811" + #define REVISION_NR "11812" #endif // __REVISION_NR_H__