Moves Item/Mobile locks to a handler. (#34)

This commit is contained in:
Kamron Batman 2019-03-15 11:05:26 -07:00 committed by GitHub
parent cf90a58bea
commit de50bc9e43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 876 additions and 1055 deletions

View file

@ -16,10 +16,7 @@ namespace Server.Items
{
From = from;
if (From.NetState != null)
Address = From.NetState.Address;
else
Address = IPAddress.None;
Address = From.NetState?.Address ?? IPAddress.None;
Date = DateTime.UtcNow;
}
@ -367,9 +364,7 @@ namespace Server.Items
public string FormatPrice()
{
if (m_TicketPrice == 0)
return "FREE";
return $"{m_TicketPrice} gold";
return m_TicketPrice == 0 ? "FREE" : $"{m_TicketPrice} gold";
}
public override void GetProperties(ObjectPropertyList list)