Preventing town guards from being called on invulnerable BaseCreatures.
This commit is contained in:
parent
6ae4f74e78
commit
8818ffdc80
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue