From 206af4840017c997c2f76c7acd6f5b6a4fdc138e Mon Sep 17 00:00:00 2001 From: Krudor Date: Sun, 4 Jun 2017 20:50:07 +0200 Subject: [PATCH] Use BroadcastText sound id if one was found --- src/server/game/Texts/CreatureTextMgr.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index db8a441776e..cafea34fcc5 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -244,7 +244,12 @@ 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 (BroadcastText const* bct = sObjectMgr->GetBroadcastText(iter->BroadcastTextId)) + if (uint32 broadcastTextSoundId = bct->SoundId) + finalSound = broadcastTextSoundId; if (range == TEXT_RANGE_NORMAL) range = iter->TextRange;