Fixes several more expression issues and cast type check merges.

This commit is contained in:
Kamron Batman 2018-09-15 23:31:51 -07:00
parent f93c3b992e
commit 9542c79ea4
24 changed files with 106 additions and 145 deletions

View file

@ -77,14 +77,12 @@ namespace Server.Mobiles
{
Mobile from = e.Mobile;
if (!e.Handled && from is PlayerMobile && from.InRange(Location, 2) && e.HasKeyword(0x1F)) // *disguise*
if (!e.Handled && from is PlayerMobile pm && pm.InRange(Location, 2) && e.HasKeyword(0x1F)) // *disguise*
{
PlayerMobile pm = (PlayerMobile)from;
if (pm.NpcGuild == NpcGuild.ThievesGuild)
SayTo(from, 501839); // That particular item costs 700 gold pieces.
SayTo(pm, 501839); // That particular item costs 700 gold pieces.
else
SayTo(from, 501838); // I don't know what you're talking about.
SayTo(pm, 501838); // I don't know what you're talking about.
e.Handled = true;
}
@ -94,13 +92,11 @@ namespace Server.Mobiles
public override bool OnGoldGiven(Mobile from, Gold dropped)
{
if (from is PlayerMobile && dropped.Amount == 700)
if (from is PlayerMobile pm && dropped.Amount == 700)
{
PlayerMobile pm = (PlayerMobile)from;
if (pm.NpcGuild == NpcGuild.ThievesGuild)
{
from.AddToBackpack(new DisguiseKit());
pm.AddToBackpack(new DisguiseKit());
dropped.Delete();
return true;