diff --git a/Source/Game/Scripting/SpellScript.cs b/Source/Game/Scripting/SpellScript.cs index 3581dfc8f..42592bbd1 100644 --- a/Source/Game/Scripting/SpellScript.cs +++ b/Source/Game/Scripting/SpellScript.cs @@ -1093,7 +1093,7 @@ namespace Game.Scripting var tempTargets = targets.Select(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()))