feat(Core/SAI): Implement SMART_ACTION_SET_ANIM_TIER (#24143)

This commit is contained in:
killerwife
2025-12-19 04:26:35 +01:00
committed by GitHub
parent 65c98dcd11
commit f344c0517d
3 changed files with 22 additions and 1 deletions

View File

@@ -884,6 +884,7 @@ bool SmartAIMgr::CheckUnusedActionParams(SmartScriptHolder const& e)
case SMART_ACTION_MOVEMENT_RESUME: return sizeof(SmartAction::move);
case SMART_ACTION_WORLD_SCRIPT: return sizeof(SmartAction::worldStateScript);
case SMART_ACTION_DISABLE_REWARD: return sizeof(SmartAction::reward);
case SMART_ACTION_SET_ANIM_TIER: return sizeof(SmartAction::animTier);
case SMART_ACTION_DISMOUNT: return NO_PARAMS;
default:
LOG_WARN("sql.sql", "SmartAIMgr: entryorguid {} source_type {} id {} action_type {} is using an action with no unused params specified in SmartAIMgr::CheckUnusedActionParams(), please report this.",
@@ -1897,6 +1898,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
}
break;
}
case SMART_ACTION_SET_ANIM_TIER:
if (e.action.animTier.animTier >= uint32(AnimTier::Max))
{
LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} uses invalid animtier %u, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.animTier.animTier);
return false;
}
break;
case SMART_ACTION_AUTO_ATTACK:
return IsSAIBoolValid(e, e.action.autoAttack.attack);
case SMART_ACTION_ALLOW_COMBAT_MOVEMENT: