Fixes several more expression issues and cast type check merges.
This commit is contained in:
parent
f93c3b992e
commit
9542c79ea4
24 changed files with 106 additions and 145 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue