Core/Creatures: Allow disabling melee attacks for all creatures, not just the ones using SAI
Port From (https://github.com/TrinityCore/TrinityCore/commit/d26d38075cdb56dcef77f05276a360e717cc5032)
This commit is contained in:
@@ -258,8 +258,14 @@ namespace Game.Entities
|
||||
|
||||
Creature creature = ToCreature();
|
||||
// creatures cannot attack while evading
|
||||
if (creature != null && creature.IsInEvadeMode())
|
||||
return false;
|
||||
if (creature != null)
|
||||
{
|
||||
if (creature.IsInEvadeMode())
|
||||
return false;
|
||||
|
||||
if (!creature.CanMelee())
|
||||
meleeAttack = false;
|
||||
}
|
||||
|
||||
// nobody can attack GM in GM-mode
|
||||
if (victim.IsTypeId(TypeId.Player))
|
||||
|
||||
Reference in New Issue
Block a user