Code Cleanup & Fixes Warnings (#74)
This commit is contained in:
parent
e11d1f3ad9
commit
57b14ad690
143 changed files with 2960 additions and 3427 deletions
|
|
@ -604,7 +604,7 @@ namespace Server.Spells
|
|||
|
||||
// Always allow monsters to teleport
|
||||
if (caster is BaseCreature bc && !bc.Controlled && !bc.Summoned && (type == TravelCheckType.TeleportTo || type == TravelCheckType.TeleportFrom))
|
||||
return true;
|
||||
return true;
|
||||
|
||||
m_TravelCaster = caster;
|
||||
m_TravelType = type;
|
||||
|
|
@ -794,12 +794,9 @@ namespace Server.Spells
|
|||
|
||||
#region Dueling
|
||||
if (Region.Find(loc, map).GetRegion<SafeZone>() != null)
|
||||
{
|
||||
PlayerMobile pm = caster as PlayerMobile;
|
||||
|
||||
if (pm.DuelContext?.Started != true || pm.DuelPlayer?.Eliminated != false)
|
||||
if (caster is PlayerMobile pm && (pm.DuelContext?.Started != true || pm.DuelPlayer?.Eliminated != false))
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
GuardedRegion reg = Region.Find(loc, map).GetRegion<GuardedRegion>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue