From cde6f6705fb61cf2cd3282e139b5828c6815d3c3 Mon Sep 17 00:00:00 2001 From: Krudor Date: Mon, 27 Mar 2017 07:52:17 +0200 Subject: Modify previous commit to expected behavior --- src/server/game/Texts/CreatureTextMgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Texts/CreatureTextMgr.cpp b/src/server/game/Texts/CreatureTextMgr.cpp index 8a5c052a093..829df1fdf77 100644 --- a/src/server/game/Texts/CreatureTextMgr.cpp +++ b/src/server/game/Texts/CreatureTextMgr.cpp @@ -248,7 +248,8 @@ uint32 CreatureTextMgr::SendChat(Creature* source, uint8 textGroup, WorldObject if (sound) finalSound = sound; else if (BroadcastTextEntry const* bct = sBroadcastTextStore.LookupEntry(iter->BroadcastTextId)) - finalSound = bct->SoundID[source->getGender() == GENDER_FEMALE ? 1 : 0]; + if (uint32 broadcastTextSoundId = bct->SoundID[source->getGender() == GENDER_FEMALE ? 1 : 0]) + finalSound = broadcastTextSoundId; if (range == TEXT_RANGE_NORMAL) range = iter->TextRange; -- cgit v1.2.3