aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKrudor <erikstrandberg93@hotmail.com>2017-03-18 20:15:38 +0100
committerShauren <shauren.trinity@gmail.com>2017-03-18 20:15:38 +0100
commit940c80e3e85aa4508f296c69cc8daf77c1b6e229 (patch)
tree9690b81873105514d9f1325f6ff83d79de08d49e /src
parent51207376b7efd06f5a6238ab22663dc9b3cced39 (diff)
Core/Creatures: Use `broadcast_text` sound entry (#19321)
Currently if you use broadcast text, there is no sound because it doesn't check the broadcast_text entry for it's sound id, it always uses the creature_text sound entry.
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Texts/CreatureTextMgr.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp
index 3122088f006..8a5c052a093 100644
--- a/src/server/game/Texts/CreatureTextMgr.cpp
+++ b/src/server/game/Texts/CreatureTextMgr.cpp
@@ -244,7 +244,11 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject
ChatMsg finalType = (msgType == CHAT_MSG_ADDON) ? iter->type : msgType;
Language finalLang = (language == LANG_ADDON) ? iter->lang : language;
- uint32 finalSound = sound ? sound : iter->sound;
+ uint32 finalSound = iter->sound;
+ if (sound)
+ finalSound = sound;
+ else if (BroadcastTextEntry const* bct = sBroadcastTextStore.LookupEntry(iter->BroadcastTextId))
+ finalSound = bct->SoundID[source->getGender() == GENDER_FEMALE ? 1 : 0];
if (range == TEXT_RANGE_NORMAL)
range = iter->TextRange;