mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-14 01:29:07 +00:00
feat(Core/SmartScripts): SMART_ACTION_SET_HEALTH_PCT
This commit is contained in:
committed by
GitHub
parent
86f1b87fe6
commit
e28bdf9bde
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user