Core/Creatures: Allow toggling CREATURE_STATIC_FLAG_4_TREAT_AS_RAID_UNIT_FOR_HELPFUL_SPELLS

Port From (https://github.com/TrinityCore/TrinityCore/commit/0139ec41bb3e2348b56fad2b4182b4a7a0494ac9)
This commit is contained in:
hondacrx
2024-02-29 17:15:52 -05:00
parent 34ffdaa4f6
commit 0eb34a2dc8
4 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -1055,7 +1055,7 @@ namespace Game.Scripting
if (prioritizeGroupMembersOf != null && (!target.IsUnit() || target.ToUnit().IsInRaidWith(prioritizeGroupMembersOf)))
negativePoints |= 1 << NOT_GROUPED;
if (prioritizePlayers && !target.IsPlayer() && (!target.IsCreature() || !target.ToCreature().HasFlag(CreatureStaticFlags4.TreatAsRaidUnitForHelpfulSpells)))
if (prioritizePlayers && !target.IsPlayer() && (!target.IsCreature() || !target.ToCreature().IsTreatedAsRaidUnit()))
negativePoints |= 1 << NOT_PLAYER;
if (!target.IsUnit() || target.ToUnit().IsFullHealth())