Core/Units: Prevent backward melee attacks

Port From (https://github.com/TrinityCore/TrinityCore/commit/7d5d3cf655b3e701d8a570b03499a388476cbdf9)
This commit is contained in:
hondacrx
2023-04-25 08:58:18 -04:00
parent 9d955f42aa
commit 097346aad5
+4
View File
@@ -62,6 +62,10 @@ namespace Game.AI
if (!me.IsWithinMeleeRange(victim))
return;
// Check that the victim is in front of the unit
if (!me.HasInArc(2 * MathF.PI / 3, victim))
return;
//Make sure our attack is ready and we aren't currently casting before checking distance
if (me.IsAttackReady())
{