mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
feat(Core/SmartScripts): Improvements to SMART_EVENT_FRIENDLY_HEALTH_PCT: (#11171)
* Added new parameter: radius. * The event can be used with SMART_TARGET_SELF and SMART_TARGET_ACTION_INVOKER target types. * Closes #5270
This commit is contained in:
@@ -1138,6 +1138,13 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
|
||||
case SMART_TARGET_PLAYER_RANGE:
|
||||
case SMART_TARGET_PLAYER_DISTANCE:
|
||||
break;
|
||||
case SMART_TARGET_SELF:
|
||||
case SMART_TARGET_ACTION_INVOKER:
|
||||
if (!NotNULL(e, e.event.friendlyHealthPct.radius))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("sql.sql", "SmartAIMgr: Entry {} SourceType {} Event {} Action {} uses invalid target_type {}, skipped.", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType(), e.GetTargetType());
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user