mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Merge pull request #10493 from Discover-/SmartAI-Action-Sound-Update
Core/SmartAI: Rename SMART_ACTION_SOUND's parameters and get rid of an e...
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user