Core/Spells: Fix group member classification in SelectRandomInjuredTargets

Port From (https://github.com/TrinityCore/TrinityCore/commit/04d44bd3a081fdf1b13ff20cd97a399f0fdfc477)
This commit is contained in:
Hondacrx
2025-08-19 21:30:31 -04:00
parent 068c3c7ce5
commit 4103c07b3c
+1 -1
View File
@@ -1093,7 +1093,7 @@ namespace Game.Scripting
var tempTargets = targets.Select<WorldObject, (WorldObject, int)>(target =>
{
int negativePoints = 0;
if (prioritizeGroupMembersOf != null && (!target.IsUnit() || target.ToUnit().IsInRaidWith(prioritizeGroupMembersOf)))
if (prioritizeGroupMembersOf != null && (!target.IsUnit() || !target.ToUnit().IsInRaidWith(prioritizeGroupMembersOf)))
negativePoints |= 1 << NOT_GROUPED;
if (prioritizePlayers && !target.IsPlayer() && (!target.IsCreature() || !target.ToCreature().IsTreatedAsRaidUnit()))