Merge branch 'broadcast_text_fix' into '4.3.4'

Use sound id from BroadcastText template if one is specified in creature_text

See merge request !46
This commit is contained in:
Aokromes
2017-06-04 22:32:33 +00:00

View File

@@ -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;