diff options
author | Nay <dnpd.dd@gmail.com> | 2013-08-09 08:38:09 -0700 |
---|---|---|
committer | Nay <dnpd.dd@gmail.com> | 2013-08-09 08:38:09 -0700 |
commit | edf77a4cf6e6a86d6ab41addacbe39a0ecff1ee4 (patch) | |
tree | f6a425992acd39d871948e55c5f9e72138e0ca72 /src | |
parent | 15696e29dde1ec7b223948d7eb064c4a98c4bb76 (diff) | |
parent | bd2120593d4281444307952ef67f932b15ee95d7 (diff) |
Merge pull request #10493 from Discover-/SmartAI-Action-Sound-Update
Core/SmartAI: Rename SMART_ACTION_SOUND's parameters and get rid of an e...
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScript.cpp | 4 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.cpp | 5 | ||||
-rw-r--r-- | src/server/game/AI/SmartScripts/SmartScriptMgr.h | 4 |
3 files changed, 4 insertions, 9 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp index 1a445435d4e..d5af023a5f0 100644 --- a/src/server/game/AI/SmartScripts/SmartScript.cpp +++ b/src/server/game/AI/SmartScripts/SmartScript.cpp @@ -250,9 +250,9 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u { if (IsUnit(*itr)) { - (*itr)->SendPlaySound(e.action.sound.sound, e.action.sound.range > 0 ? true : false); + (*itr)->SendPlaySound(e.action.sound.sound, e.action.sound.onlySelf > 0 ? true : false); TC_LOG_DEBUG(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SOUND: target: %s (GuidLow: %u), sound: %u, onlyself: %u", - (*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), e.action.sound.sound, e.action.sound.range); + (*itr)->GetName().c_str(), (*itr)->GetGUIDLow(), e.action.sound.sound, e.action.sound.onlySelf); } } diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp index 2fad3886535..eeeacb36032 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.cpp @@ -621,11 +621,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e) case SMART_ACTION_SOUND: if (!IsSoundValid(e, e.action.sound.sound)) return false; - if (e.action.sound.range > TEXT_RANGE_WORLD) - { - TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses invalid Text Range %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.sound.range); - return false; - } break; case SMART_ACTION_SET_EMOTE_STATE: case SMART_ACTION_PLAY_EMOTE: diff --git a/src/server/game/AI/SmartScripts/SmartScriptMgr.h b/src/server/game/AI/SmartScripts/SmartScriptMgr.h index d6ebfd3535f..724a0684ab9 100644 --- a/src/server/game/AI/SmartScripts/SmartScriptMgr.h +++ b/src/server/game/AI/SmartScripts/SmartScriptMgr.h @@ -385,7 +385,7 @@ enum SMART_ACTION SMART_ACTION_TALK = 1, // groupID from creature_text, duration to wait before TEXT_OVER event is triggered SMART_ACTION_SET_FACTION = 2, // FactionId (or 0 for default) SMART_ACTION_MORPH_TO_ENTRY_OR_MODEL = 3, // Creature_template entry(param1) OR ModelId (param2) (or 0 for both to demorph) - SMART_ACTION_SOUND = 4, // SoundId, TextRange + SMART_ACTION_SOUND = 4, // SoundId, onlySelf SMART_ACTION_PLAY_EMOTE = 5, // EmoteId SMART_ACTION_FAIL_QUEST = 6, // QuestID SMART_ACTION_ADD_QUEST = 7, // QuestID @@ -519,7 +519,7 @@ struct SmartAction struct { uint32 sound; - uint32 range; + uint32 onlySelf; } sound; struct |