Core/SAI: added new action SMART_ACTION_PLAY_ANIMKIT (#19170)

This commit is contained in:
Lopfest
2017-03-11 13:39:38 +01:00
committed by Shauren
parent fd256884d9
commit 61547cab59
3 changed files with 60 additions and 1 deletions
@@ -809,6 +809,16 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
if (!IsEmoteValid(e, e.action.emote.emote))
return false;
break;
case SMART_ACTION_PLAY_ANIMKIT:
if (!IsAnimKitValid(e, e.action.animKit.animKit))
return false;
if (e.action.animKit.type > 3)
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses invalid AnimKit type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.animKit.type);
return false;
}
break;
case SMART_ACTION_FAIL_QUEST:
case SMART_ACTION_OFFER_QUEST:
if (!e.action.quest.quest || !IsQuestValid(e, e.action.quest.quest))