Core/Objects: Allow more specific checks to include or exclude feign death units in CreatureWithOptionsInObjectRangeCheck::IsAlive check (#30361)

* this also extends SMART_TARGET_CLOSEST_CREATURE dead param
Port From (https://github.com/TrinityCore/TrinityCore/commit/92efc2523b75e4ca01be7d0894ed8bc979cb3049)
This commit is contained in:
Hondacrx
2025-05-19 11:08:47 -04:00
parent c0303c2e92
commit 87df85cac7
6 changed files with 52 additions and 8 deletions
+1 -1
View File
@@ -2918,7 +2918,7 @@ namespace Game.AI
}
Creature target = refObj.FindNearestCreatureWithOptions(e.Target.unitClosest.dist != 0 ? e.Target.unitClosest.dist : 100,
new FindCreatureOptions() { CreatureId = e.Target.unitClosest.entry, StringId = !e.Target.param_string.IsEmpty() ? e.Target.param_string : null, IsAlive = e.Target.unitClosest.dead == 0 });
new FindCreatureOptions() { CreatureId = e.Target.unitClosest.entry, StringId = !e.Target.param_string.IsEmpty() ? e.Target.param_string : null, IsAlive = (FindCreatureAliveState)e.Target.unitClosest.findCreatureAliveState });
if (target != null)
targets.Add(target);