parent
096d39609e
commit
8e9221bb5a
400 changed files with 3688 additions and 5969 deletions
|
|
@ -21,26 +21,19 @@ namespace Server.Items
|
|||
|
||||
public void SetFacing(Direction dir)
|
||||
{
|
||||
switch (dir)
|
||||
ItemID = dir switch
|
||||
{
|
||||
case Direction.East:
|
||||
ItemID = 0x3E65;
|
||||
break;
|
||||
case Direction.West:
|
||||
ItemID = 0x3E93;
|
||||
break;
|
||||
case Direction.North:
|
||||
ItemID = 0x3EAE;
|
||||
break;
|
||||
case Direction.South:
|
||||
ItemID = 0x3EB9;
|
||||
break;
|
||||
}
|
||||
Direction.East => 0x3E65,
|
||||
Direction.West => 0x3E93,
|
||||
Direction.North => 0x3EAE,
|
||||
Direction.South => 0x3EB9,
|
||||
_ => ItemID
|
||||
};
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item item)
|
||||
{
|
||||
if (m_Boat == null || !m_Boat.Contains(from) || m_Boat.IsMoving)
|
||||
if (m_Boat?.Contains(from) != true || m_Boat.IsMoving)
|
||||
return false;
|
||||
|
||||
return base.OnDragDrop(from, item);
|
||||
|
|
@ -48,7 +41,7 @@ namespace Server.Items
|
|||
|
||||
public override bool OnDragDropInto(Mobile from, Item item, Point3D p)
|
||||
{
|
||||
if (m_Boat == null || !m_Boat.Contains(from) || m_Boat.IsMoving)
|
||||
if (m_Boat?.Contains(from) != true || m_Boat.IsMoving)
|
||||
return false;
|
||||
|
||||
return base.OnDragDropInto(from, item, p);
|
||||
|
|
@ -56,7 +49,7 @@ namespace Server.Items
|
|||
|
||||
public override bool CheckItemUse(Mobile from, Item item)
|
||||
{
|
||||
if (item != this && (m_Boat == null || !m_Boat.Contains(from) || m_Boat.IsMoving))
|
||||
if (item != this && (m_Boat?.Contains(from) != true || m_Boat.IsMoving))
|
||||
return false;
|
||||
|
||||
return base.CheckItemUse(from, item);
|
||||
|
|
@ -64,7 +57,7 @@ namespace Server.Items
|
|||
|
||||
public override bool CheckLift(Mobile from, Item item, ref LRReason reject)
|
||||
{
|
||||
if (m_Boat == null || !m_Boat.Contains(from) || m_Boat.IsMoving)
|
||||
if (m_Boat?.Contains(from) != true || m_Boat.IsMoving)
|
||||
return false;
|
||||
|
||||
return base.CheckLift(from, item, ref reject);
|
||||
|
|
@ -77,7 +70,7 @@ namespace Server.Items
|
|||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_Boat == null || !m_Boat.Contains(from))
|
||||
if (m_Boat?.Contains(from) != true)
|
||||
m_Boat.TillerMan?.Say(502490); // You must be on the ship to open the hold.
|
||||
else if (m_Boat.IsMoving)
|
||||
m_Boat.TillerMan?.Say(502491); // I can not open the hold while the ship is moving.
|
||||
|
|
@ -116,4 +109,4 @@ namespace Server.Items
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue