Core/Movement: use helpers for validation

(cherry picked from commit 7118806231)
This commit is contained in:
ccrs
2018-04-23 23:35:31 +02:00
committed by Shauren
parent d59a6af9c6
commit 0b6049fe0b
4 changed files with 8 additions and 7 deletions

View File

@@ -920,7 +920,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
}
case SMART_EVENT_MOVEMENTINFORM:
{
if (e.event.movementInform.type >= MAX_MOTION_TYPE)
if (IsInvalidMovementGeneratorType(e.event.movementInform.type))
{
TC_LOG_ERROR("sql.sql", "SmartAIMgr: Entry " SI64FMTD " SourceType %u Event %u Action %u uses invalid Motion type %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.event.movementInform.type);
return false;