Core/SmartAI: Implement SMART_ACTION_SET_POWER, SMART_ACTION_ADD_POWER and SMART_ACTION_REMOVE_POWER (param1 = powertype, param2 = newPower). Required for upcoming EAI to SAI conversion (for ACTION_T_SET_UNIT_FIELD) (only SMART_ACTION_SET_POWER is required for the conversion but might as well do it right when on it).
This commit is contained in:
1 parent
b7d88a3c46
commit
75ca3573c8
3 files changed
+55
-3
No files matched your search
@@ -838,6 +838,15 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_POWER:
|
||||
case SMART_ACTION_ADD_POWER:
|
||||
case SMART_ACTION_REMOVE_POWER:
|
||||
if (e.action.power.powerType > MAX_POWERS)
|
||||
{
|
||||
TC_LOG_ERROR(LOG_FILTER_SQL, "SmartAIMgr: Entry %d SourceType %u Event %u Action %u uses non-existent Power %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.power.powerType);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SMART_ACTION_FOLLOW:
|
||||
case SMART_ACTION_SET_ORIENTATION:
|
||||
case SMART_ACTION_STORE_TARGET_LIST:
|
||||
|
||||
Reference in new issue
Block a user