chore: Cleans up pattern checks. (#892)
This commit is contained in:
parent
171df32257
commit
63e1b02d93
283 changed files with 587 additions and 702 deletions
|
|
@ -245,7 +245,7 @@ namespace Server.Regions
|
|||
|
||||
var noto = Notoriety.Compute(helper, helped);
|
||||
|
||||
if (helper != helped && (noto == Notoriety.Criminal || noto == Notoriety.Murderer))
|
||||
if (helper != helped && noto is Notoriety.Criminal or Notoriety.Murderer)
|
||||
{
|
||||
CheckGuardCandidate(helper);
|
||||
}
|
||||
|
|
@ -358,8 +358,8 @@ namespace Server.Regions
|
|||
}
|
||||
|
||||
public bool IsGuardCandidate(Mobile m) =>
|
||||
!(m is BaseGuard) && m.Alive && m.AccessLevel <= AccessLevel.Player && !m.Blessed &&
|
||||
(!(m is BaseCreature creature) || !creature.IsInvulnerable) && !IsDisabled() &&
|
||||
m is not BaseGuard && m.Alive && m.AccessLevel <= AccessLevel.Player && !m.Blessed &&
|
||||
(m is not BaseCreature creature || !creature.IsInvulnerable) && !IsDisabled() &&
|
||||
(!AllowReds && m.Kills >= 5 || m.Criminal);
|
||||
|
||||
private class GuardTimer : Timer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue