mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
feat(SmartAI): Implement action type 115 "SMART_ACTION_RANDOM_SOUND"
This commit is contained in:
committed by
Francesco Borzì
parent
9eb07a57d4
commit
acf47073ab
@@ -369,7 +369,6 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
sLog->outErrorDb("SmartAIMgr: EntryOrGuid %d using event(%u) has an action type that is not supported on 3.3.5a (%u), skipped.",
|
||||
e.entryOrGuid, e.event_id, e.GetActionType());
|
||||
return false;
|
||||
case SMART_ACTION_RANDOM_SOUND:
|
||||
case SMART_ACTION_SET_CORPSE_DELAY:
|
||||
case SMART_ACTION_DISABLE_EVADE:
|
||||
case SMART_ACTION_GO_SET_GO_STATE:
|
||||
@@ -770,6 +769,19 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
if (!IsSoundValid(e, e.action.sound.sound))
|
||||
return false;
|
||||
break;
|
||||
case SMART_ACTION_RANDOM_SOUND:
|
||||
if (e.action.randomSound.sound1 && !IsSoundValid(e, e.action.randomSound.sound1))
|
||||
return false;
|
||||
|
||||
if (e.action.randomSound.sound2 && !IsSoundValid(e, e.action.randomSound.sound2))
|
||||
return false;
|
||||
|
||||
if (e.action.randomSound.sound3 && !IsSoundValid(e, e.action.randomSound.sound3))
|
||||
return false;
|
||||
|
||||
if (e.action.randomSound.sound4 && !IsSoundValid(e, e.action.randomSound.sound4))
|
||||
return false;
|
||||
break;
|
||||
case SMART_ACTION_SET_EMOTE_STATE:
|
||||
case SMART_ACTION_PLAY_EMOTE:
|
||||
if (!IsEmoteValid(e, e.action.emote.emote))
|
||||
|
||||
Reference in New Issue
Block a user