Core/SAI: added SMART_ACTION_RANDOM_SOUND

Closes #16376

(cherry picked from commit e4af2baa7e)
This commit is contained in:
Lopfest
2016-01-26 03:26:41 +00:00
committed by Shauren
parent 6e5a129d91
commit c457de1e80
3 changed files with 45 additions and 1 deletions

View File

@@ -840,6 +840,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (e.action.randomEmote.emote6 && !IsEmoteValid(e, e.action.randomEmote.emote6))
return false;
break;
case SMART_ACTION_RANDOM_SOUND:
for (uint8 i = 0; i < SMART_ACTION_PARAM_COUNT - 1; i++)
{
if (e.action.randomSound.sound[i] && !IsSoundValid(e, e.action.randomSound.sound[i]))
return false;
}
break;
case SMART_ACTION_CAST:
{
if (!IsSpellValid(e, e.action.cast.spell))