Formatting FIxes (#58)

This commit is contained in:
Kamron Batman 2019-10-04 23:08:13 -07:00 • committed by GitHub
parent 57fb9fb525
commit 096d39609e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1318 changed files with 11633 additions and 22129 deletions

View file

@ -10,10 +10,8 @@ namespace Server.Mobiles
}
public AnimalBuyInfo(int controlSlots, string name, Type type, int price, int amount, int itemID, int hue) : base(
name, type, price, amount, itemID, hue)
{
name, type, price, amount, itemID, hue) =>
ControlSlots = controlSlots;
}
public override int ControlSlots{ get; }
}

View file

@ -448,25 +448,13 @@ namespace Server.Mobiles
return true;
}
public virtual bool IsValidBulkOrder(Item item)
{
return false;
}
public virtual bool IsValidBulkOrder(Item item) => false;
public virtual Item CreateBulkOrder(Mobile from, bool fromContextMenu)
{
return null;
}
public virtual Item CreateBulkOrder(Mobile from, bool fromContextMenu) => null;
public virtual bool SupportsBulkOrders(Mobile from)
{
return false;
}
public virtual bool SupportsBulkOrders(Mobile from) => false;
public virtual TimeSpan GetNextBulkOrder(Mobile from)
{
return TimeSpan.Zero;
}
public virtual TimeSpan GetNextBulkOrder(Mobile from) => TimeSpan.Zero;
public virtual void OnSuccessfulBulkOrderReceive(Mobile from)
{
@ -497,10 +485,7 @@ namespace Server.Mobiles
}
}
public virtual bool GetGender()
{
return Utility.RandomBool();
}
public virtual bool GetGender() => Utility.RandomBool();
public virtual void InitBody()
{
@ -534,10 +519,7 @@ namespace Server.Mobiles
}
}
public virtual int GetShoeHue()
{
return 0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue();
}
public virtual int GetShoeHue() => 0.1 > Utility.RandomDouble() ? 0 : Utility.RandomNeutralHue();
public virtual void CheckMorph()
{
@ -682,10 +664,7 @@ namespace Server.Mobiles
Title = string.Join(" ", split);
}
public virtual int GetHairHue()
{
return Race.RandomHairHue();
}
public virtual int GetHairHue() => Race.RandomHairHue();
public virtual void InitOutfit()
{
@ -1117,11 +1096,9 @@ namespace Server.Mobiles
}
}
public virtual bool CheckVendorAccess(Mobile from)
{
return Region.GetRegion<GuardedRegion>()?.CheckVendorAccess(this, from) != false ||
Region != from.Region && from.Region.GetRegion<GuardedRegion>()?.CheckVendorAccess(this, from) != false;
}
public virtual bool CheckVendorAccess(Mobile from) =>
Region.GetRegion<GuardedRegion>()?.CheckVendorAccess(this, from) != false ||
Region != from.Region && from.Region.GetRegion<GuardedRegion>()?.CheckVendorAccess(this, from) != false;
public override void Serialize(GenericWriter writer)
{
@ -1268,15 +1245,9 @@ namespace Server.Mobiles
base.AddCustomContextEntries(from, list);
}
public virtual IShopSellInfo[] GetSellInfo()
{
return m_ArmorSellInfo.ToArray();
}
public virtual IShopSellInfo[] GetSellInfo() => m_ArmorSellInfo.ToArray();
public virtual IBuyItemInfo[] GetBuyInfo()
{
return m_ArmorBuyInfo.ToArray();
}
public virtual IBuyItemInfo[] GetBuyInfo() => m_ArmorBuyInfo.ToArray();
private class BulkOrderInfoEntry : ContextMenuEntry
{
@ -1334,10 +1305,7 @@ namespace Server.Mobiles
#region Faction
public virtual int GetPriceScalar()
{
return 100 + Town.FromRegion(Region)?.Tax ?? 0;
}
public virtual int GetPriceScalar() => 100 + Town.FromRegion(Region)?.Tax ?? 0;
public void UpdateBuyInfo()
{

View file

@ -27,9 +27,6 @@ namespace Server.Mobiles
public override bool CanCacheDisplay => false;
public override IEntity GetEntity()
{
return (IEntity)Activator.CreateInstance(Type, m_Content);
}
public override IEntity GetEntity() => (IEntity)Activator.CreateInstance(Type, m_Content);
}
}

View file

@ -101,36 +101,7 @@ namespace Server.Mobiles
}
//Attempt to restock with item, (return true if restock successful)
public bool Restock(Item item, int amount)
{
return false;
/*if ( item.GetType() == m_Type )
{
if ( item is BaseWeapon )
{
BaseWeapon weapon = (BaseWeapon)item;
if ( weapon.Quality == WeaponQuality.Low || weapon.Quality == WeaponQuality.Exceptional || (int)weapon.DurabilityLevel > 0 || (int)weapon.DamageLevel > 0 || (int)weapon.AccuracyLevel > 0 )
return false;
}
if ( item is BaseArmor )
{
BaseArmor armor = (BaseArmor)item;
if ( armor.Quality == ArmorQuality.Low || armor.Quality == ArmorQuality.Exceptional || (int)armor.Durability > 0 || (int)armor.ProtectionLevel > 0 )
return false;
}
m_Amount += amount;
return true;
}
else
{
return false;
}*/
}
public bool Restock(Item item, int amount) => false;
public void OnRestock()
{
@ -172,10 +143,7 @@ namespace Server.Mobiles
m_Amount = MaxAmount;
}
private bool IsDeleted(IEntity obj)
{
return obj.Deleted;
}
private bool IsDeleted(IEntity obj) => obj.Deleted;
public void DeleteDisplayEntity()
{

View file

@ -4,117 +4,111 @@ using Server.Items;
namespace Server.Mobiles
{
public class GenericSellInfo : IShopSellInfo
{
private Dictionary<Type, int> m_Table = new Dictionary<Type, int>();
private Type[] m_Types;
public class GenericSellInfo : IShopSellInfo
{
private Dictionary<Type, int> m_Table = new Dictionary<Type, int>();
private Type[] m_Types;
public void Add( Type type, int price )
{
m_Table[type] = price;
m_Types = null;
}
public void Add( Type type, int price )
{
m_Table[type] = price;
m_Types = null;
}
public int GetSellPriceFor( Item item )
{
m_Table.TryGetValue( item.GetType(), out int price );
public int GetSellPriceFor( Item item )
{
m_Table.TryGetValue( item.GetType(), out int price );
if ( item is BaseArmor armor ) {
if ( armor.Quality == ArmorQuality.Low )
price = (int)( price * 0.60 );
else if ( armor.Quality == ArmorQuality.Exceptional )
price = (int)( price * 1.25 );
if ( item is BaseArmor armor ) {
if ( armor.Quality == ArmorQuality.Low )
price = (int)( price * 0.60 );
else if ( armor.Quality == ArmorQuality.Exceptional )
price = (int)( price * 1.25 );
price += 100 * (int)armor.Durability;
price += 100 * (int)armor.Durability;
price += 100 * (int)armor.ProtectionLevel;
price += 100 * (int)armor.ProtectionLevel;
if ( price < 1 )
price = 1;
}
else if ( item is BaseWeapon weapon ) {
if ( weapon.Quality == WeaponQuality.Low )
price = (int)( price * 0.60 );
else if ( weapon.Quality == WeaponQuality.Exceptional )
price = (int)( price * 1.25 );
if ( price < 1 )
price = 1;
}
else if ( item is BaseWeapon weapon ) {
if ( weapon.Quality == WeaponQuality.Low )
price = (int)( price * 0.60 );
else if ( weapon.Quality == WeaponQuality.Exceptional )
price = (int)( price * 1.25 );
price += 100 * (int)weapon.DurabilityLevel;
price += 100 * (int)weapon.DurabilityLevel;
price += 100 * (int)weapon.DamageLevel;
price += 100 * (int)weapon.DamageLevel;
if ( price < 1 )
price = 1;
}
else if ( item is BaseBeverage bev ) {
int price1 = price, price2 = price;
if ( price < 1 )
price = 1;
}
else if ( item is BaseBeverage bev ) {
int price1 = price, price2 = price;
if ( bev is Pitcher )
{ price1 = 3; price2 = 5; }
else if ( bev is BeverageBottle )
{ price1 = 3; price2 = 3; }
else if ( bev is Jug )
{ price1 = 6; price2 = 6; }
if ( bev is Pitcher )
{ price1 = 3; price2 = 5; }
else if ( bev is BeverageBottle )
{ price1 = 3; price2 = 3; }
else if ( bev is Jug )
{ price1 = 6; price2 = 6; }
if ( bev.IsEmpty || bev.Content == BeverageType.Milk )
price = price1;
else
price = price2;
}
if ( bev.IsEmpty || bev.Content == BeverageType.Milk )
price = price1;
else
price = price2;
}
return price;
}
return price;
}
public int GetBuyPriceFor( Item item )
{
return (int)( 1.90 * GetSellPriceFor( item ) );
}
public int GetBuyPriceFor( Item item ) => (int)( 1.90 * GetSellPriceFor( item ) );
public Type[] Types
{
get
{
if ( m_Types == null )
{
m_Types = new Type[m_Table.Keys.Count];
m_Table.Keys.CopyTo( m_Types, 0 );
}
public Type[] Types
{
get
{
if ( m_Types == null )
{
m_Types = new Type[m_Table.Keys.Count];
m_Table.Keys.CopyTo( m_Types, 0 );
}
return m_Types;
}
}
return m_Types;
}
}
public string GetNameFor( Item item )
{
if ( item.Name != null )
return item.Name;
return item.LabelNumber.ToString();
}
public string GetNameFor( Item item )
{
if ( item.Name != null )
return item.Name;
return item.LabelNumber.ToString();
}
public bool IsSellable( Item item )
{
if ( item.Nontransferable )
return false;
public bool IsSellable( Item item )
{
if ( item.Nontransferable )
return false;
//if ( item.Hue != 0 )
//return false;
//if ( item.Hue != 0 )
//return false;
return IsInList( item.GetType() );
}
return IsInList( item.GetType() );
}
public bool IsResellable( Item item )
{
if ( item.Nontransferable )
return false;
public bool IsResellable( Item item )
{
if ( item.Nontransferable )
return false;
//if ( item.Hue != 0 )
//return false;
//if ( item.Hue != 0 )
//return false;
return IsInList( item.GetType() );
}
return IsInList( item.GetType() );
}
public bool IsInList( Type type )
{
return m_Table.ContainsKey( type );
}
}
public bool IsInList( Type type ) => m_Table.ContainsKey( type );
}
}

View file

@ -32,10 +32,7 @@ namespace Server.Mobiles
m_SBInfos.Add(new SBAnimalTrainer());
}
public override int GetShoeHue()
{
return 0;
}
public override int GetShoeHue() => 0;
public override void InitOutfit()
{
@ -301,10 +298,7 @@ namespace Server.Mobiles
BeginClaimList(from);
}
public bool CanClaim(Mobile from, BaseCreature pet)
{
return from.Followers + pet.ControlSlots <= from.FollowersMax;
}
public bool CanClaim(Mobile from, BaseCreature pet) => from.Followers + pet.ControlSlots <= from.FollowersMax;
private void DoClaim(Mobile from, BaseCreature pet)
{
@ -325,10 +319,7 @@ namespace Server.Mobiles
pet.Loyalty = MaxLoyalty; // Wonderfully Happy
}
public override bool HandlesOnSpeech(Mobile from)
{
return true;
}
public override bool HandlesOnSpeech(Mobile from) => true;
public override void OnSpeech(SpeechEventArgs e)
{
@ -452,10 +443,7 @@ namespace Server.Mobiles
{
private AnimalTrainer m_Trainer;
public StableTarget(AnimalTrainer trainer) : base(12, false, TargetFlags.None)
{
m_Trainer = trainer;
}
public StableTarget(AnimalTrainer trainer) : base(12, false, TargetFlags.None) => m_Trainer = trainer;
protected override void OnTarget(Mobile from, object targeted)
{

View file

@ -117,15 +117,9 @@ namespace Server.Mobiles
return null;
}
public override bool IsValidBulkOrder(Item item)
{
return item is SmallSmithBOD || item is LargeSmithBOD;
}
public override bool IsValidBulkOrder(Item item) => item is SmallSmithBOD || item is LargeSmithBOD;
public override bool SupportsBulkOrders(Mobile from)
{
return from is PlayerMobile && from.Skills.Blacksmith.Base > 0;
}
public override bool SupportsBulkOrders(Mobile from) => from is PlayerMobile && from.Skills.Blacksmith.Base > 0;
public override TimeSpan GetNextBulkOrder(Mobile from)
{

View file

@ -23,10 +23,7 @@ namespace Server.Mobiles
public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
public override int GetShoeHue()
{
return 0;
}
public override int GetShoeHue() => 0;
public override void InitOutfit()
{

View file

@ -50,20 +50,14 @@ namespace Server.Mobiles
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals;
public override bool OnBuyItems(Mobile buyer, List<BuyItemResponse> list)
{
return false;
}
public override bool OnBuyItems(Mobile buyer, List<BuyItemResponse> list) => false;
public override void VendorBuy(Mobile from)
{
from.SendGump(new HairstylistBuyGump(from, this, m_SellList));
}
public override int GetHairHue()
{
return Utility.RandomBrightHue();
}
public override int GetHairHue() => Utility.RandomBrightHue();
public override void InitOutfit()
{

View file

@ -28,10 +28,7 @@ namespace Server.Mobiles
m_SBInfos.Add(new SBFarmer());
}
public override int GetShoeHue()
{
return 0;
}
public override int GetShoeHue() => 0;
public override void InitOutfit()
{

View file

@ -7,10 +7,7 @@ namespace Server.Mobiles
{
public abstract class BaseGuildmaster : BaseVendor
{
public BaseGuildmaster(string title) : base(title)
{
Title = $"the {title} {(Female ? "guildmistress" : "guildmaster")}";
}
public BaseGuildmaster(string title) : base(title) => Title = $"the {title} {(Female ? "guildmistress" : "guildmaster")}";
public BaseGuildmaster(Serial serial) : base(serial)
{
@ -33,10 +30,7 @@ namespace Server.Mobiles
{
}
public virtual bool CheckCustomReqs(PlayerMobile pm)
{
return true;
}
public virtual bool CheckCustomReqs(PlayerMobile pm) => true;
public virtual void SayGuildTo(Mobile m)
{

View file

@ -17,10 +17,7 @@ namespace Server.Mobiles
public override VendorShoeType ShoeType => Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
public override int GetShoeHue()
{
return 0;
}
public override int GetShoeHue() => 0;
public override void InitOutfit()
{

View file

@ -5,10 +5,7 @@ namespace Server.Mobiles
public class GypsyBanker : Banker
{
[Constructible]
public GypsyBanker()
{
Title = "the gypsy banker";
}
public GypsyBanker() => Title = "the gypsy banker";
public GypsyBanker(Serial serial) : base(serial)
{

View file

@ -18,10 +18,7 @@ namespace Server.Mobiles
protected override List<SBInfo> SBInfos => m_SBInfos;
public override bool GetGender()
{
return true; // always female
}
public override bool GetGender() => true;
public override void InitSBInfo()
{

View file

@ -41,10 +41,7 @@ namespace Server.Mobiles
AddItem(new Robe(Utility.RandomNeutralHue()));
}
public override bool HandlesOnSpeech(Mobile from)
{
return from.Player;
}
public override bool HandlesOnSpeech(Mobile from) => from.Player;
public override void OnSpeech(SpeechEventArgs e)
{

View file

@ -67,15 +67,9 @@ namespace Server.Mobiles
return null;
}
public override bool IsValidBulkOrder(Item item)
{
return item is SmallTailorBOD || item is LargeTailorBOD;
}
public override bool IsValidBulkOrder(Item item) => item is SmallTailorBOD || item is LargeTailorBOD;
public override bool SupportsBulkOrders(Mobile from)
{
return from is PlayerMobile && from.Skills.Tailoring.Base > 0;
}
public override bool SupportsBulkOrders(Mobile from) => from is PlayerMobile && from.Skills.Tailoring.Base > 0;
public override TimeSpan GetNextBulkOrder(Mobile from)
{

View file

@ -36,10 +36,7 @@ namespace Server.Mobiles
m_SBInfos.Add(new SBSEWeapons());
}
public override int GetShoeHue()
{
return 0;
}
public override int GetShoeHue() => 0;
public override void InitOutfit()
{
@ -86,15 +83,9 @@ namespace Server.Mobiles
return null;
}
public override bool IsValidBulkOrder(Item item)
{
return item is SmallSmithBOD || item is LargeSmithBOD;
}
public override bool IsValidBulkOrder(Item item) => item is SmallSmithBOD || item is LargeSmithBOD;
public override bool SupportsBulkOrders(Mobile from)
{
return from is PlayerMobile && Core.AOS && from.Skills.Blacksmith.Base > 0;
}
public override bool SupportsBulkOrders(Mobile from) => from is PlayerMobile && Core.AOS && from.Skills.Blacksmith.Base > 0;
public override TimeSpan GetNextBulkOrder(Mobile from)
{

View file

@ -67,15 +67,9 @@ namespace Server.Mobiles
return null;
}
public override bool IsValidBulkOrder(Item item)
{
return item is SmallTailorBOD || item is LargeTailorBOD;
}
public override bool IsValidBulkOrder(Item item) => item is SmallTailorBOD || item is LargeTailorBOD;
public override bool SupportsBulkOrders(Mobile from)
{
return from is PlayerMobile && from.Skills.Tailoring.Base > 0;
}
public override bool SupportsBulkOrders(Mobile from) => from is PlayerMobile && from.Skills.Tailoring.Base > 0;
public override TimeSpan GetNextBulkOrder(Mobile from)
{

View file

@ -63,10 +63,7 @@ namespace Server.Mobiles
{
private PlayerBarkeeper m_Barkeeper;
public ChangeTipMessagePrompt(PlayerBarkeeper barkeeper)
{
m_Barkeeper = barkeeper;
}
public ChangeTipMessagePrompt(PlayerBarkeeper barkeeper) => m_Barkeeper = barkeeper;
public override void OnCancel(Mobile from)
{
@ -185,10 +182,7 @@ namespace Server.Mobiles
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
protected override List<SBInfo> SBInfos => m_SBInfos;
public override bool GetGender()
{
return false; // always starts as male
}
public override bool GetGender() => false;
public override void InitOutfit()
{
@ -215,10 +209,7 @@ namespace Server.Mobiles
pack?.Delete();
}
public override bool HandlesOnSpeech(Mobile from)
{
return InRange(from, 3) || base.HandlesOnSpeech(from);
}
public override bool HandlesOnSpeech(Mobile from) => InRange(from, 3) || base.HandlesOnSpeech(from);
private void ShoutNews_Callback(TownCrierEntry tce, int index)
{
@ -922,10 +913,7 @@ namespace Server.Mobiles
AddItem(580, 46, 4030);
}
private int GetButtonID(int type, int index)
{
return 1 + index * 6 + type;
}
private int GetButtonID(int type, int index) => 1 + index * 6 + type;
private void RenderMessageManagement_Tip_AddOrChange()
{

View file

@ -114,10 +114,7 @@ namespace Server.Mobiles
return true;
}
public override bool IsAccessibleTo(Mobile m)
{
return true;
}
public override bool IsAccessibleTo(Mobile m) => true;
public override bool CheckItemUse(Mobile from, Item item)
{
@ -131,12 +128,10 @@ namespace Server.Mobiles
return false;
}
public override bool CheckTarget(Mobile from, Target targ, object targeted)
{
return base.CheckTarget(from, targ, targeted) &&
(from.AccessLevel >= AccessLevel.GameMaster ||
targ.GetType().IsDefined(typeof(PlayerVendorTargetAttribute), false));
}
public override bool CheckTarget(Mobile from, Target targ, object targeted) =>
base.CheckTarget(from, targ, targeted) &&
(from.AccessLevel >= AccessLevel.GameMaster ||
targ.GetType().IsDefined(typeof(PlayerVendorTargetAttribute), false));
public override void GetChildContextMenuEntries(Mobile from, List<ContextMenuEntry> list, Item item)
{
@ -222,10 +217,7 @@ namespace Server.Mobiles
{
private Item m_Item;
public BuyEntry(Item item) : base(6103)
{
m_Item = item;
}
public BuyEntry(Item item) : base(6103) => m_Item = item;
public override bool NonLocalUse => true;
@ -682,10 +674,7 @@ namespace Server.Mobiles
Placeholder?.Delete();
}
public override bool IsSnoop(Mobile from)
{
return false;
}
public override bool IsSnoop(Mobile from) => false;
public override void GetProperties(ObjectPropertyList list)
{
@ -700,10 +689,7 @@ namespace Server.Mobiles
return v;
}
private VendorItem SetVendorItem(Item item, int price, string description)
{
return SetVendorItem(item, price, description, DateTime.UtcNow);
}
private VendorItem SetVendorItem(Item item, int price, string description) => SetVendorItem(item, price, description, DateTime.UtcNow);
private VendorItem SetVendorItem(Item item, int price, string description, DateTime created)
{
@ -1107,15 +1093,9 @@ namespace Server.Mobiles
base.GetContextMenuEntries(from, list);
}
public override bool HandlesOnSpeech(Mobile from)
{
return from.Alive && from.GetDistanceToSqrt(this) <= 3;
}
public override bool HandlesOnSpeech(Mobile from) => from.Alive && from.GetDistanceToSqrt(this) <= 3;
public bool WasNamed(string speech)
{
return Name != null && Insensitive.StartsWith(speech, Name);
}
public bool WasNamed(string speech) => Name != null && Insensitive.StartsWith(speech, Name);
public override void OnSpeech(SpeechEventArgs e)
{
@ -1206,19 +1186,13 @@ namespace Server.Mobiles
}
}
public override bool CanBeDamaged()
{
return false;
}
public override bool CanBeDamaged() => false;
private class ReturnVendorEntry : ContextMenuEntry
{
private PlayerVendor m_Vendor;
public ReturnVendorEntry(PlayerVendor vendor) : base(6214)
{
m_Vendor = vendor;
}
public ReturnVendorEntry(PlayerVendor vendor) : base(6214) => m_Vendor = vendor;
public override void OnClick()
{
@ -1292,10 +1266,7 @@ namespace Server.Mobiles
[PlayerVendorTarget]
private class PVBuyTarget : Target
{
public PVBuyTarget() : base(3, false, TargetFlags.None)
{
AllowNonlocal = true;
}
public PVBuyTarget() : base(3, false, TargetFlags.None) => AllowNonlocal = true;
protected override void OnTarget(Mobile from, object targeted)
{
@ -1405,10 +1376,7 @@ namespace Server.Mobiles
{
private PlayerVendor m_Vendor;
public CollectGoldPrompt(PlayerVendor vendor)
{
m_Vendor = vendor;
}
public CollectGoldPrompt(PlayerVendor vendor) => m_Vendor = vendor;
public override void OnResponse(Mobile from, string text)
{
@ -1444,10 +1412,7 @@ namespace Server.Mobiles
{
private PlayerVendor m_Vendor;
public VendorNamePrompt(PlayerVendor vendor)
{
m_Vendor = vendor;
}
public VendorNamePrompt(PlayerVendor vendor) => m_Vendor = vendor;
public override void OnResponse(Mobile from, string text)
{
@ -1474,10 +1439,7 @@ namespace Server.Mobiles
{
private PlayerVendor m_Vendor;
public ShopNamePrompt(PlayerVendor vendor)
{
m_Vendor = vendor;
}
public ShopNamePrompt(PlayerVendor vendor) => m_Vendor = vendor;
public override void OnResponse(Mobile from, string text)
{

View file

@ -7,16 +7,11 @@ namespace Server.Mobiles
private PresetMapEntry m_Entry;
public PresetMapBuyInfo(PresetMapEntry entry, int price, int amount) : base(entry.Name.ToString(), null, price,
amount, 0x14EC, 0)
{
amount, 0x14EC, 0) =>
m_Entry = entry;
}
public override bool CanCacheDisplay => false;
public override IEntity GetEntity()
{
return new PresetMap(m_Entry);
}
public override IEntity GetEntity() => new PresetMap(m_Entry);
}
}

View file

@ -90,15 +90,9 @@ namespace Server.Mobiles
[CommandProperty(AccessLevel.GameMaster)]
public Mobile Landlord => House?.Owner;
public override bool IsOwner(Mobile m)
{
return m == Owner || m.AccessLevel >= AccessLevel.GameMaster || Core.ML && AccountHandler.CheckAccount(m, Owner);
}
public override bool IsOwner(Mobile m) => m == Owner || m.AccessLevel >= AccessLevel.GameMaster || Core.ML && AccountHandler.CheckAccount(m, Owner);
public bool IsLandlord(Mobile m)
{
return House?.IsOwner(m) == true;
}
public bool IsLandlord(Mobile m) => House?.IsOwner(m) == true;
public void ComputeRentalExpireDelay(out int days, out int hours)
{
@ -215,10 +209,7 @@ namespace Server.Mobiles
{
private RentedVendor m_Vendor;
public ContractOptionsEntry(RentedVendor vendor) : base(6209)
{
m_Vendor = vendor;
}
public ContractOptionsEntry(RentedVendor vendor) : base(6209) => m_Vendor = vendor;
public override void OnClick()
{
@ -248,10 +239,7 @@ namespace Server.Mobiles
{
private RentedVendor m_Vendor;
public CollectRentEntry(RentedVendor vendor) : base(6212)
{
m_Vendor = vendor;
}
public CollectRentEntry(RentedVendor vendor) : base(6212) => m_Vendor = vendor;
public override void OnClick()
{
@ -279,10 +267,7 @@ namespace Server.Mobiles
{
private RentedVendor m_Vendor;
public TerminateContractEntry(RentedVendor vendor) : base(6218)
{
m_Vendor = vendor;
}
public TerminateContractEntry(RentedVendor vendor) : base(6218) => m_Vendor = vendor;
public override void OnClick()
{
@ -301,10 +286,7 @@ namespace Server.Mobiles
{
private RentedVendor m_Vendor;
public RefundOfferPrompt(RentedVendor vendor)
{
m_Vendor = vendor;
}
public RefundOfferPrompt(RentedVendor vendor) => m_Vendor = vendor;
public override void OnResponse(Mobile from, string text)
{