Preventing town guards from being called on invulnerable BaseCreatures.

This commit is contained in:
eos@runuo.com 2013-08-17 18:09:15 +00:00
parent 6ae4f74e78
commit 8818ffdc80

View file

@ -345,7 +345,7 @@ namespace Server.Regions
public bool IsGuardCandidate( Mobile m )
{
if ( m is BaseGuard || !m.Alive || m.AccessLevel > AccessLevel.Player || m.Blessed || IsDisabled() )
if ( m is BaseGuard || !m.Alive || m.AccessLevel > AccessLevel.Player || m.Blessed || ( m is BaseCreature && ((BaseCreature)m).IsInvulnerable ) || IsDisabled() )
return false;
return (!AllowReds && m.Kills >= 5) || m.Criminal;