feat(Core/SmartScripts): SMART_ACTION_SET_HEALTH_PCT
This commit is contained in:
parent
86f1b87fe6
commit
e28bdf9bde
3 changed files with 36 additions and 0 deletions
|
|
@ -1172,6 +1172,16 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
|||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SET_HEALTH_PCT:
|
||||
{
|
||||
if (e.action.setHealthPct.percent > 100 || !e.action.setHealthPct.percent)
|
||||
{
|
||||
LOG_ERROR("sql.sql", "SmartAIMgr: Entry %d SourceType %u Event %u Action %u is trying to set invalid HP percent %u, skipped.",
|
||||
e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.action.setHealthPct.percent);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_START_CLOSEST_WAYPOINT:
|
||||
case SMART_ACTION_FOLLOW:
|
||||
case SMART_ACTION_SET_ORIENTATION:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue