Core/Unit: make neutral guards attack players involved in PvP

Port From (https://github.com/TrinityCore/TrinityCore/commit/a58dcd1d9cf5f943342d00628601170d6023ae25)
This commit is contained in:
hondacrx
2021-04-16 14:40:23 -04:00
parent 7ef7bb1728
commit a5d5b7ee3d
2 changed files with 12 additions and 0 deletions
+3
View File
@@ -3183,6 +3183,9 @@ namespace Game.Entities
Player player = playerAffectingAttacker ? playerAffectingAttacker : playerAffectingTarget;
Unit creature = playerAffectingAttacker ? target : this;
if (creature.IsContestedGuard() && player.HasPlayerFlag(PlayerFlags.ContestedPVP))
return true;
var factionTemplate = creature.GetFactionTemplateEntry();
if (factionTemplate != null)
{