Core/SAI: Make 'no, thanks' actions deprecated

Deprecated events and actions will be removed after 2 weeks

(cherry picked from commit ab3bb36a46)
This commit is contained in:
offl
2021-10-21 00:58:32 +03:00
committed by Shauren
parent 64f525beda
commit 6ac4e9dd4a

View File

@@ -2394,6 +2394,24 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
// Additional check for deprecated
switch (e.GetActionType())
{
// Deprecated
case SMART_ACTION_SET_SWIM:
case SMART_ACTION_OVERRIDE_SCRIPT_BASE_OBJECT:
case SMART_ACTION_RESET_SCRIPT_BASE_OBJECT:
case SMART_ACTION_SET_CAN_FLY:
case SMART_ACTION_REMOVE_AURAS_BY_TYPE:
case SMART_ACTION_SET_SIGHT_DIST:
case SMART_ACTION_FLEE:
case SMART_ACTION_REMOVE_ALL_GAMEOBJECTS:
TC_LOG_WARN("sql.sql.deprecation", "SmartAIMgr: Deprecated action_type(%u), Entry " SI64FMTD " SourceType %u Event %u, it might be removed in the future, loaded for now.", e.GetActionType(), e.entryOrGuid, e.GetScriptType(), e.event_id);
break;
default:
break;
}
if (!CheckUnusedActionParams(e))
return false;