From 2e4609f6e18c181fbb54ec851a9ccd5bd3c6eb7b Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 27 Dec 2020 22:43:36 +0100 Subject: Core/Chat: Send broadcast text id in sound packets to allow playing encrypted sound files --- src/server/game/AI/SmartScripts/SmartScript.cpp | 2 +- src/server/game/AI/SmartScripts/SmartScriptMgr.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/server/game/AI/SmartScripts') diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index ea07eeafcfb..fa05118537c 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -297,7 +297,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { if (IsUnit(target)) { - target->PlayDirectSound(e.action.sound.sound, e.action.sound.onlySelf ? target->ToPlayer() : nullptr); + target->PlayDirectSound(e.action.sound.sound, e.action.sound.onlySelf ? target->ToPlayer() : nullptr, e.action.sound.keyBroadcastTextId); TC_LOG_DEBUG("scripts.ai", "SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (%s), sound: %u, onlyself: %u", target->GetName().c_str(), target->GetGUID().ToString().c_str(), e.action.sound.sound, e.action.sound.onlySelf); } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index 26563797b1c..3039afd29bf 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -625,6 +625,8 @@ struct SmartAction { uint32 sound; uint32 onlySelf; + uint32 distance; // NYI: awaiting cherry-pick + uint32 keyBroadcastTextId; } sound; struct -- cgit v1.2.3