Changes properties to use automatic property initializers

This commit is contained in:
Kamron Batman 2018-09-14 15:23:29 -07:00
parent f0a48ad431
commit 06fa31a7bf
623 changed files with 13072 additions and 19304 deletions

View file

@ -7,14 +7,13 @@ namespace Server.Targets
public class AIControlMobileTarget : Target
{
private List<BaseAI> m_List;
private OrderType m_Order;
public OrderType Order => m_Order;
public OrderType Order { get; }
public AIControlMobileTarget( BaseAI ai, OrderType order ) : base( -1, false, ( order == OrderType.Attack ? TargetFlags.Harmful : TargetFlags.None ) )
{
m_List = new List<BaseAI>();
m_Order = order;
Order = order;
AddAI( ai );
}
@ -30,7 +29,7 @@ namespace Server.Targets
if ( o is Mobile m )
{
for ( int i = 0; i < m_List.Count; ++i )
m_List[i].EndPickTarget( from, m, m_Order );
m_List[i].EndPickTarget( from, m, Order );
}
}
}

View file

@ -1982,17 +1982,11 @@ namespace Server.Mobiles
return delay;
}
private long m_NextMove;
public long NextMove
{
get => m_NextMove;
set => m_NextMove = value;
}
public long NextMove { get; set; }
public virtual bool CheckMove()
{
return (Core.TickCount - m_NextMove >= 0);
return (Core.TickCount - NextMove >= 0);
}
public virtual bool DoMove(Direction d)
@ -2021,10 +2015,10 @@ namespace Server.Mobiles
int delay = (int)(TransformMoveDelay(m_Mobile.CurrentSpeed) * 1000);
m_NextMove += delay;
NextMove += delay;
if (Core.TickCount - m_NextMove > 0)
m_NextMove = Core.TickCount;
if (Core.TickCount - NextMove > 0)
NextMove = Core.TickCount;
m_Mobile.Pushing = false;

View file

@ -43,90 +43,84 @@ namespace Server
return -1;
}
private static OppositionGroup m_TerathansAndOphidians = new OppositionGroup( new[]
public static OppositionGroup TerathansAndOphidians { get; } = new OppositionGroup( new[]
{
new[]
{
typeof( TerathanAvenger ),
typeof( TerathanDrone ),
typeof( TerathanMatriarch ),
typeof( TerathanWarrior )
},
new[]
{
typeof( OphidianArchmage ),
typeof( OphidianKnight ),
typeof( OphidianMage ),
typeof( OphidianMatriarch ),
typeof( OphidianWarrior )
}
} );
new[]
{
typeof( TerathanAvenger ),
typeof( TerathanDrone ),
typeof( TerathanMatriarch ),
typeof( TerathanWarrior )
},
new[]
{
typeof( OphidianArchmage ),
typeof( OphidianKnight ),
typeof( OphidianMage ),
typeof( OphidianMatriarch ),
typeof( OphidianWarrior )
}
} );
public static OppositionGroup TerathansAndOphidians => m_TerathansAndOphidians;
private static OppositionGroup m_SavagesAndOrcs = new OppositionGroup( new[]
public static OppositionGroup SavagesAndOrcs { get; } = new OppositionGroup( new[]
{
new[]
{
typeof( Orc ),
typeof( OrcBomber ),
typeof( OrcBrute ),
typeof( OrcCaptain ),
typeof( OrcishLord ),
typeof( OrcishMage ),
typeof( SpawnedOrcishLord )
},
new[]
{
typeof( Savage ),
typeof( SavageRider ),
typeof( SavageRidgeback ),
typeof( SavageShaman )
}
} );
new[]
{
typeof( Orc ),
typeof( OrcBomber ),
typeof( OrcBrute ),
typeof( OrcCaptain ),
typeof( OrcishLord ),
typeof( OrcishMage ),
typeof( SpawnedOrcishLord )
},
new[]
{
typeof( Savage ),
typeof( SavageRider ),
typeof( SavageRidgeback ),
typeof( SavageShaman )
}
} );
public static OppositionGroup SavagesAndOrcs => m_SavagesAndOrcs;
private static OppositionGroup m_FeyAndUndead = new OppositionGroup( new[]
public static OppositionGroup FeyAndUndead { get; } = new OppositionGroup( new[]
{
new[]
{
typeof( Centaur ),
typeof( EtherealWarrior ),
typeof( Kirin ),
typeof( LordOaks ),
typeof( Pixie ),
typeof( Silvani ),
typeof( Unicorn ),
typeof( Wisp ),
typeof( Treefellow ),
typeof( MLDryad ),
typeof( Satyr )
},
new[]
{
typeof( AncientLich ),
typeof( Bogle ),
typeof( LichLord ),
typeof( Shade ),
typeof( Spectre ),
typeof( Wraith ),
typeof( BoneKnight ),
typeof( Ghoul ),
typeof( Mummy ),
typeof( SkeletalKnight ),
typeof( Skeleton ),
typeof( Zombie ),
typeof( ShadowKnight ),
typeof( DarknightCreeper ),
typeof( RevenantLion ),
typeof( LadyOfTheSnow ),
typeof( RottingCorpse ),
typeof( SkeletalDragon ),
typeof( Lich )
}
} );
public static OppositionGroup FeyAndUndead => m_FeyAndUndead;
new[]
{
typeof( Centaur ),
typeof( EtherealWarrior ),
typeof( Kirin ),
typeof( LordOaks ),
typeof( Pixie ),
typeof( Silvani ),
typeof( Unicorn ),
typeof( Wisp ),
typeof( Treefellow ),
typeof( MLDryad ),
typeof( Satyr )
},
new[]
{
typeof( AncientLich ),
typeof( Bogle ),
typeof( LichLord ),
typeof( Shade ),
typeof( Spectre ),
typeof( Wraith ),
typeof( BoneKnight ),
typeof( Ghoul ),
typeof( Mummy ),
typeof( SkeletalKnight ),
typeof( Skeleton ),
typeof( Zombie ),
typeof( ShadowKnight ),
typeof( DarknightCreeper ),
typeof( RevenantLion ),
typeof( LadyOfTheSnow ),
typeof( RottingCorpse ),
typeof( SkeletalDragon ),
typeof( Lich )
}
} );
}
}

View file

@ -10,33 +10,17 @@ namespace Server
// Should we use the new method of speeds?
private static bool Enabled = true;
private double m_ActiveSpeed;
private double m_PassiveSpeed;
private Type[] m_Types;
public double ActiveSpeed { get; set; }
public double ActiveSpeed
{
get => m_ActiveSpeed;
set => m_ActiveSpeed = value;
}
public double PassiveSpeed { get; set; }
public double PassiveSpeed
{
get => m_PassiveSpeed;
set => m_PassiveSpeed = value;
}
public Type[] Types
{
get => m_Types;
set => m_Types = value;
}
public Type[] Types { get; set; }
public SpeedInfo( double activeSpeed, double passiveSpeed, Type[] types )
{
m_ActiveSpeed = activeSpeed;
m_PassiveSpeed = passiveSpeed;
m_Types = types;
ActiveSpeed = activeSpeed;
PassiveSpeed = passiveSpeed;
Types = types;
}
public static bool Contains( object obj )

View file

@ -5,23 +5,12 @@ namespace Server.Mobiles
public class Cow : BaseCreature
{
public override string CorpseName => "a cow corpse";
private DateTime m_MilkedOn;
[CommandProperty( AccessLevel.GameMaster )]
public DateTime MilkedOn
{
get => m_MilkedOn;
set => m_MilkedOn = value;
}
private int m_Milk;
public DateTime MilkedOn { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public int Milk
{
get => m_Milk;
set => m_Milk = value;
}
public int Milk { get; set; }
public override string DefaultName => "a cow";
@ -93,15 +82,15 @@ namespace Server.Mobiles
from.SendLocalizedMessage( 1080400 ); // You can not milk the cow from this location.
if ( Controlled && ControlMaster != from )
from.SendLocalizedMessage( 1071182 ); // The cow nimbly escapes your attempts to milk it.
if ( m_Milk == 0 && m_MilkedOn + TimeSpan.FromDays( 1 ) > DateTime.UtcNow )
if ( Milk == 0 && MilkedOn + TimeSpan.FromDays( 1 ) > DateTime.UtcNow )
from.SendLocalizedMessage( 1080198 ); // This cow can not be milked now. Please wait for some time.
else
{
if ( m_Milk == 0 )
m_Milk = 4;
if ( Milk == 0 )
Milk = 4;
m_MilkedOn = DateTime.UtcNow;
m_Milk--;
MilkedOn = DateTime.UtcNow;
Milk--;
return true;
}
@ -119,8 +108,8 @@ namespace Server.Mobiles
writer.Write( (int) 1 );
writer.Write( (DateTime) m_MilkedOn );
writer.Write( (int) m_Milk );
writer.Write( (DateTime) MilkedOn );
writer.Write( (int) Milk );
}
public override void Deserialize( GenericReader reader )
@ -131,8 +120,8 @@ namespace Server.Mobiles
if ( version > 0 )
{
m_MilkedOn = reader.ReadDateTime();
m_Milk = reader.ReadInt();
MilkedOn = reader.ReadDateTime();
Milk = reader.ReadInt();
}
}
}

View file

@ -7,19 +7,13 @@ namespace Server.Mobiles
public abstract class BaseMount : BaseCreature, IMount
{
private Mobile m_Rider;
private Item m_InternalItem;
private DateTime m_NextMountAbility;
public virtual TimeSpan MountAbilityDelay => TimeSpan.Zero;
[CommandProperty( AccessLevel.GameMaster )]
public DateTime NextMountAbility
{
get => m_NextMountAbility;
set => m_NextMountAbility = value;
}
public DateTime NextMountAbility { get; set; }
protected Item InternalItem => m_InternalItem;
protected Item InternalItem { get; private set; }
public virtual bool AllowMaleRider => true;
public virtual bool AllowFemaleRider => true;
@ -29,7 +23,7 @@ namespace Server.Mobiles
Name = name;
Body = bodyID;
m_InternalItem = new MountItem( this, itemID );
InternalItem = new MountItem( this, itemID );
}
[Hue, CommandProperty( AccessLevel.GameMaster )]
@ -40,8 +34,8 @@ namespace Server.Mobiles
{
base.Hue = value;
if ( m_InternalItem != null )
m_InternalItem.Hue = value;
if ( InternalItem != null )
InternalItem.Hue = value;
}
}
@ -54,8 +48,8 @@ namespace Server.Mobiles
public override void OnAfterDelete()
{
m_InternalItem?.Delete();
m_InternalItem = null;
InternalItem?.Delete();
InternalItem = null;
base.OnAfterDelete();
}
@ -78,10 +72,10 @@ namespace Server.Mobiles
writer.Write( ( int )1 ); // version
writer.Write( m_NextMountAbility );
writer.Write( NextMountAbility );
writer.Write( m_Rider );
writer.Write( m_InternalItem );
writer.Write( InternalItem );
}
public override void Deserialize( GenericReader reader )
@ -94,15 +88,15 @@ namespace Server.Mobiles
{
case 1:
{
m_NextMountAbility = reader.ReadDateTime();
NextMountAbility = reader.ReadDateTime();
goto case 0;
}
case 0:
{
m_Rider = reader.ReadMobile();
m_InternalItem = reader.ReadItem();
InternalItem = reader.ReadItem();
if ( m_InternalItem == null )
if ( InternalItem == null )
Delete();
break;
@ -187,11 +181,11 @@ namespace Server.Mobiles
[CommandProperty( AccessLevel.GameMaster )]
public int ItemID
{
get => m_InternalItem?.ItemID ?? 0;
get => InternalItem?.ItemID ?? 0;
set
{
if ( m_InternalItem != null )
m_InternalItem.ItemID = value;
if ( InternalItem != null )
InternalItem.ItemID = value;
}
}
@ -226,7 +220,7 @@ namespace Server.Mobiles
Location = loc;
Map = map;
m_InternalItem?.Internalize();
InternalItem?.Internalize();
}
else
{
@ -237,8 +231,8 @@ namespace Server.Mobiles
Dismount( value );
if ( m_InternalItem != null )
value.AddItem( m_InternalItem );
if ( InternalItem != null )
value.AddItem( InternalItem );
value.Direction = Direction;
@ -281,10 +275,10 @@ namespace Server.Mobiles
if ( attacker == null )
attacker = m_Rider.FindMostRecentDamager( true );
if ( !(attacker == this || attacker == m_Rider || willKill || DateTime.UtcNow < m_NextMountAbility) )
if ( !(attacker == this || attacker == m_Rider || willKill || DateTime.UtcNow < NextMountAbility) )
{
if ( DoMountAbility( amount, from ) )
m_NextMountAbility = DateTime.UtcNow + MountAbilityDelay;
NextMountAbility = DateTime.UtcNow + MountAbilityDelay;
}
}

View file

@ -10,15 +10,10 @@ namespace Server.Mobiles
private int m_MountedID;
private int m_RegularID;
private Mobile m_Rider;
private bool m_IsRewardItem;
private bool m_IsDonationItem;
[CommandProperty( AccessLevel.GameMaster )]
public bool IsRewardItem
{
get => m_IsRewardItem;
set => m_IsRewardItem = value;
}
public bool IsRewardItem { get; set; }
public override double DefaultWeight => 1.0;
@ -51,7 +46,7 @@ namespace Server.Mobiles
list.Add( "Donation Ethereal" );
list.Add( "7.5 sec slower cast time if not a 9mo. Veteran" );
}
if ( Core.ML && m_IsRewardItem )
if ( Core.ML && IsRewardItem )
list.Add( RewardSystem.GetRewardYearLabel( this, new object[] { } ) ); // X Year Veteran Reward
}
@ -119,7 +114,7 @@ namespace Server.Mobiles
return false;
}
if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
if ( IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
{
// CheckIsUsableBy sends the message
return false;
@ -181,7 +176,7 @@ namespace Server.Mobiles
writer.Write( (int)3 ); // version
writer.Write( m_IsDonationItem );
writer.Write( m_IsRewardItem );
writer.Write( IsRewardItem );
writer.Write( (int)m_MountedID );
writer.Write( (int)m_RegularID );
@ -204,7 +199,7 @@ namespace Server.Mobiles
}
case 2:
{
m_IsRewardItem = reader.ReadBool();
IsRewardItem = reader.ReadBool();
goto case 0;
}
case 1: reader.ReadInt(); goto case 0;

File diff suppressed because it is too large Load diff

View file

@ -7,8 +7,7 @@ namespace Server.Mobiles
{
public abstract class BaseHealer : BaseVendor
{
private List<SBInfo> m_SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos => m_SBInfos;
protected override List<SBInfo> SBInfos { get; } = new List<SBInfo>();
public override bool IsActiveVendor => false;
public override bool IsInvulnerable => false;

View file

@ -4,14 +4,8 @@ namespace Server.Mobiles
{
public class PricedHealer : BaseHealer
{
private int m_Price;
[CommandProperty( AccessLevel.GameMaster )]
public int Price
{
get => m_Price;
set => m_Price = value;
}
public int Price { get; set; }
[Constructible]
public PricedHealer() : this( 5000 )
@ -21,7 +15,7 @@ namespace Server.Mobiles
[Constructible]
public PricedHealer( int price )
{
m_Price = price;
Price = price;
if ( !Core.AOS )
NameHue = 0x35;
@ -43,7 +37,7 @@ namespace Server.Mobiles
m.FixedEffect( 0x376A, 10, 16 );
m.CloseGump( typeof( ResurrectGump ) );
m.SendGump( new ResurrectGump( m, this, m_Price ) );
m.SendGump( new ResurrectGump( m, this, Price ) );
}
public override bool CheckResurrect( Mobile m )
@ -61,7 +55,7 @@ namespace Server.Mobiles
writer.Write( (int) 0 ); // version
writer.Write( (int) m_Price );
writer.Write( (int) Price );
}
public override void Deserialize( GenericReader reader )
@ -74,7 +68,7 @@ namespace Server.Mobiles
{
case 0:
{
m_Price = reader.ReadInt();
Price = reader.ReadInt();
break;
}
}

View file

@ -9,16 +9,13 @@ namespace Server.Mobiles
public override string CorpseName => "a demon knight corpse";
public override bool IgnoreYoungProtection => Core.ML;
public static Type[] ArtifactRarity10 => m_ArtifactRarity10;
public static Type[] ArtifactRarity11 => m_ArtifactRarity11;
private static Type[] m_ArtifactRarity10 =
public static Type[] ArtifactRarity10 { get; } =
{
typeof( LegacyOfTheDreadLord ),
typeof( TheTaskmaster )
};
private static Type[] m_ArtifactRarity11 =
public static Type[] ArtifactRarity11 { get; } =
{
typeof( TheDragonSlayer ),
typeof( ArmorOfFortune ),
@ -58,18 +55,18 @@ namespace Server.Mobiles
if ( !Core.AOS )
return null;
int count = ( m_ArtifactRarity10.Length * 5 ) + ( m_ArtifactRarity11.Length * 4 );
int count = ( ArtifactRarity10.Length * 5 ) + ( ArtifactRarity11.Length * 4 );
int random = Utility.Random( count );
Type type;
if ( random < ( m_ArtifactRarity10.Length * 5 ) )
if ( random < ( ArtifactRarity10.Length * 5 ) )
{
type = m_ArtifactRarity10[random / 5];
type = ArtifactRarity10[random / 5];
}
else
{
random -= m_ArtifactRarity10.Length * 5;
type = m_ArtifactRarity11[random / 4];
random -= ArtifactRarity10.Length * 5;
type = ArtifactRarity11[random / 4];
}
return Loot.Construct( type );

View file

@ -6,8 +6,7 @@ namespace Server.Mobiles
public class BlackSolenQueen : BaseCreature
{
public override string CorpseName => "a solen queen corpse";
private bool m_BurstSac;
public bool BurstSac => m_BurstSac;
public bool BurstSac { get; private set; }
public override string DefaultName => "a black solen queen";
@ -100,7 +99,7 @@ namespace Server.Mobiles
if ( Hits < 50 )
{
PublicOverheadMessage( MessageType.Regular, 0x3B2, true, "* The solen's acid sac is burst open! *" );
m_BurstSac = true;
BurstSac = true;
}
}
else if ( from != null && from != this && InRange( from, 1 ) )
@ -127,7 +126,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 1 );
writer.Write( m_BurstSac );
writer.Write( BurstSac );
}
public override void Deserialize( GenericReader reader )
@ -139,7 +138,7 @@ namespace Server.Mobiles
{
case 1:
{
m_BurstSac = reader.ReadBool();
BurstSac = reader.ReadBool();
break;
}
}

View file

@ -6,8 +6,7 @@ namespace Server.Mobiles
public class BlackSolenWarrior : BaseCreature
{
public override string CorpseName => "a solen warrior corpse";
private bool m_BurstSac;
public bool BurstSac => m_BurstSac;
public bool BurstSac { get; private set; }
public override string DefaultName => "a black solen warrior";
@ -101,7 +100,7 @@ namespace Server.Mobiles
if ( Hits < 50 )
{
PublicOverheadMessage( MessageType.Regular, 0x3B2, true, "* The solen's acid sac is burst open! *" );
m_BurstSac = true;
BurstSac = true;
}
}
else if ( from != null && from != this && InRange( from, 1 ) )
@ -128,7 +127,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 1 );
writer.Write( m_BurstSac );
writer.Write( BurstSac );
}
public override void Deserialize( GenericReader reader )
@ -140,7 +139,7 @@ namespace Server.Mobiles
{
case 1:
{
m_BurstSac = reader.ReadBool();
BurstSac = reader.ReadBool();
break;
}
}

View file

@ -6,8 +6,7 @@ namespace Server.Mobiles
public class RedSolenQueen : BaseCreature
{
public override string CorpseName => "a solen queen corpse";
private bool m_BurstSac;
public bool BurstSac => m_BurstSac;
public bool BurstSac { get; private set; }
public override string DefaultName => "a red solen queen";
@ -100,7 +99,7 @@ namespace Server.Mobiles
if ( Hits < 50 )
{
PublicOverheadMessage( MessageType.Regular, 0x3B2, true, "* The solen's acid sac is burst open! *" );
m_BurstSac = true;
BurstSac = true;
}
}
else if ( from != null && from != this && InRange( from, 1 ) )
@ -127,7 +126,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 1 );
writer.Write( m_BurstSac );
writer.Write( BurstSac );
}
public override void Deserialize( GenericReader reader )
@ -139,7 +138,7 @@ namespace Server.Mobiles
{
case 1:
{
m_BurstSac = reader.ReadBool();
BurstSac = reader.ReadBool();
break;
}
}

View file

@ -6,8 +6,7 @@ namespace Server.Mobiles
public class RedSolenWarrior : BaseCreature
{
public override string CorpseName => "a solen warrior corpse";
private bool m_BurstSac;
public bool BurstSac => m_BurstSac;
public bool BurstSac { get; private set; }
public override string DefaultName => "a red solen warrior";
@ -100,7 +99,7 @@ namespace Server.Mobiles
if ( Hits < 50 )
{
PublicOverheadMessage( MessageType.Regular, 0x3B2, true, "* The solen's acid sac is burst open! *" );
m_BurstSac = true;
BurstSac = true;
}
}
else if ( from != null && from != this && InRange( from, 1 ) )
@ -127,7 +126,7 @@ namespace Server.Mobiles
{
base.Serialize( writer );
writer.Write( (int) 1 );
writer.Write( m_BurstSac );
writer.Write( BurstSac );
}
public override void Deserialize( GenericReader reader )
@ -139,7 +138,7 @@ namespace Server.Mobiles
{
case 1:
{
m_BurstSac = reader.ReadBool();
BurstSac = reader.ReadBool();
break;
}
}

View file

@ -5,8 +5,8 @@ namespace Server.Mobiles
public class ExodusMinion : BaseCreature
{
public override string CorpseName => "a minion's corpse";
private bool m_FieldActive;
public bool FieldActive => m_FieldActive;
public bool FieldActive { get; private set; }
public bool CanUseField // TODO: an OSI bug prevents to verify this
=> Hits >= HitsMax * 9 / 10;
@ -53,7 +53,7 @@ namespace Server.Mobiles
case 2: PackItem( new ClockworkAssembly() ); break;
}
m_FieldActive = CanUseField;
FieldActive = CanUseField;
}
public override void GenerateLoot()
@ -93,13 +93,13 @@ namespace Server.Mobiles
public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
{
if ( m_FieldActive )
if ( FieldActive )
damage = 0; // no melee damage when the field is up
}
public override void AlterSpellDamageFrom( Mobile from, ref int damage )
{
if ( !m_FieldActive )
if ( !FieldActive )
damage = 0; // no spell damage when the field is down
}
@ -110,14 +110,14 @@ namespace Server.Mobiles
SendEBolt( from );
}
if ( !m_FieldActive )
if ( !FieldActive )
{
// should there be an effect when spells nullifying is on?
FixedParticles( 0, 10, 0, 0x2522, EffectLayer.Waist );
}
else if ( m_FieldActive && !CanUseField )
else if ( FieldActive && !CanUseField )
{
m_FieldActive = false;
FieldActive = false;
// TODO: message and effect when field turns down; cannot be verified on OSI due to a bug
FixedParticles( 0x3735, 1, 30, 0x251F, EffectLayer.Waist );
@ -128,7 +128,7 @@ namespace Server.Mobiles
{
base.OnGotMeleeAttack( attacker );
if ( m_FieldActive )
if ( FieldActive )
{
FixedParticles( 0x376A, 20, 10, 0x2530, EffectLayer.Waist );
@ -148,15 +148,15 @@ namespace Server.Mobiles
base.OnThink();
// TODO: an OSI bug prevents to verify if the field can regenerate or not
if ( !m_FieldActive && !IsHurt() )
m_FieldActive = true;
if ( !FieldActive && !IsHurt() )
FieldActive = true;
}
public override bool Move( Direction d )
{
bool move = base.Move( d );
if ( move && m_FieldActive && Combatant != null )
if ( move && FieldActive && Combatant != null )
FixedParticles( 0, 10, 0, 0x2530, EffectLayer.Waist );
return move;
@ -185,7 +185,7 @@ namespace Server.Mobiles
base.Deserialize( reader );
int version = reader.ReadInt();
m_FieldActive = CanUseField;
FieldActive = CanUseField;
if ( Name == "Exodus Minion" )
Name = null;

View file

@ -5,8 +5,8 @@ namespace Server.Mobiles
public class ExodusOverseer : BaseCreature
{
public override string CorpseName => "an overseer's corpse";
private bool m_FieldActive;
public bool FieldActive => m_FieldActive;
public bool FieldActive { get; private set; }
public bool CanUseField // TODO: an OSI bug prevents to verify this
=> Hits >= HitsMax * 9 / 10;
@ -50,7 +50,7 @@ namespace Server.Mobiles
else
PackItem( new ArcaneGem() );
m_FieldActive = CanUseField;
FieldActive = CanUseField;
}
public override void GenerateLoot()
@ -89,13 +89,13 @@ namespace Server.Mobiles
public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
{
if ( m_FieldActive )
if ( FieldActive )
damage = 0; // no melee damage when the field is up
}
public override void AlterSpellDamageFrom( Mobile caster, ref int damage )
{
if ( !m_FieldActive )
if ( !FieldActive )
damage = 0; // no spell damage when the field is down
}
@ -106,14 +106,14 @@ namespace Server.Mobiles
SendEBolt( from );
}
if ( !m_FieldActive )
if ( !FieldActive )
{
// should there be an effect when spells nullifying is on?
FixedParticles( 0, 10, 0, 0x2522, EffectLayer.Waist );
}
else if ( m_FieldActive && !CanUseField )
else if ( FieldActive && !CanUseField )
{
m_FieldActive = false;
FieldActive = false;
// TODO: message and effect when field turns down; cannot be verified on OSI due to a bug
FixedParticles( 0x3735, 1, 30, 0x251F, EffectLayer.Waist );
@ -124,7 +124,7 @@ namespace Server.Mobiles
{
base.OnGotMeleeAttack( attacker );
if ( m_FieldActive )
if ( FieldActive )
{
FixedParticles( 0x376A, 20, 10, 0x2530, EffectLayer.Waist );
@ -144,15 +144,15 @@ namespace Server.Mobiles
base.OnThink();
// TODO: an OSI bug prevents to verify if the field can regenerate or not
if ( !m_FieldActive && !IsHurt() )
m_FieldActive = true;
if ( !FieldActive && !IsHurt() )
FieldActive = true;
}
public override bool Move( Direction d )
{
bool move = base.Move( d );
if ( move && m_FieldActive && Combatant != null )
if ( move && FieldActive && Combatant != null )
FixedParticles( 0, 10, 0, 0x2530, EffectLayer.Waist );
return move;
@ -181,7 +181,7 @@ namespace Server.Mobiles
base.Deserialize( reader );
int version = reader.ReadInt();
m_FieldActive = CanUseField;
FieldActive = CanUseField;
if ( Name == "Exodus Overseer" )
Name = null;

View file

@ -316,16 +316,11 @@ namespace Server.Mobiles
public class StainedOoze : Item
{
private bool m_Corrosive;
private Timer m_Timer;
private int m_Ticks;
[CommandProperty( AccessLevel.GameMaster )]
public bool Corrosive
{
get => m_Corrosive;
set => m_Corrosive = value;
}
public bool Corrosive { get; set; }
[Constructible]
public StainedOoze()
@ -340,7 +335,7 @@ namespace Server.Mobiles
Movable = false;
Hue = 0x95;
m_Corrosive = corrosive;
Corrosive = corrosive;
m_Timer = Timer.DelayCall( TimeSpan.Zero, TimeSpan.FromSeconds( 1 ), OnTick );
m_Ticks = 0;
}
@ -387,7 +382,7 @@ namespace Server.Mobiles
public void Damage( Mobile m )
{
if ( m_Corrosive )
if ( Corrosive )
{
List<Item> items = m.Items;
bool damaged = false;
@ -422,7 +417,7 @@ namespace Server.Mobiles
writer.Write( (int) 0 ); // version
writer.Write( m_Corrosive );
writer.Write( Corrosive );
}
public override void Deserialize( GenericReader reader )
@ -431,7 +426,7 @@ namespace Server.Mobiles
int version = reader.ReadInt();
m_Corrosive = reader.ReadBool();
Corrosive = reader.ReadBool();
m_Timer = Timer.DelayCall( TimeSpan.Zero, TimeSpan.FromSeconds( 1 ), OnTick );
m_Ticks = ( ItemID == 0x122A ) ? 0 : 30;

View file

@ -7,16 +7,10 @@ namespace Server.Mobiles
public class PlagueBeast : BaseCreature, IDevourer
{
public override string CorpseName => "a plague beast corpse";
private int m_DevourTotal;
private int m_DevourGoal;
private bool m_HasMetalChest;
[CommandProperty( AccessLevel.GameMaster )]
public int TotalDevoured
{
get => m_DevourTotal;
set => m_DevourTotal = value;
}
public int TotalDevoured { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public int DevourGoal
@ -26,7 +20,7 @@ namespace Server.Mobiles
}
[CommandProperty( AccessLevel.GameMaster )]
public bool HasMetalChest => m_HasMetalChest;
public bool HasMetalChest { get; private set; }
public override string DefaultName => "a plague beast";
@ -67,7 +61,7 @@ namespace Server.Mobiles
if ( Core.ML && Utility.RandomDouble() < 0.33 )
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(4) );
m_DevourTotal = 0;
TotalDevoured = 0;
m_DevourGoal = Utility.RandomMinMax( 15, 25 ); // How many corpses must be devoured before a metal chest is awarded
}
@ -151,8 +145,8 @@ namespace Server.Mobiles
base.Serialize( writer );
writer.Write( (int) 1 );
writer.Write( m_HasMetalChest );
writer.Write( m_DevourTotal );
writer.Write( HasMetalChest );
writer.Write( TotalDevoured );
writer.Write( m_DevourGoal );
}
@ -165,8 +159,8 @@ namespace Server.Mobiles
{
case 1:
{
m_HasMetalChest = reader.ReadBool();
m_DevourTotal = reader.ReadInt();
HasMetalChest = reader.ReadBool();
TotalDevoured = reader.ReadInt();
m_DevourGoal = reader.ReadInt();
break;
}
@ -203,14 +197,14 @@ namespace Server.Mobiles
corpse.TurnToBones(); // Not bones yet, and we are a human body therefore we turn to bones.
IncreaseHits( (int)Math.Ceiling( (double)corpse.Owner.HitsMax * 0.75 ) );
m_DevourTotal++;
TotalDevoured++;
PublicOverheadMessage( MessageType.Emote, 0x3B2, 1053033 ); // * The plague beast absorbs the fleshy remains of the corpse *
if ( !m_HasMetalChest && m_DevourTotal >= DevourGoal )
if ( !HasMetalChest && TotalDevoured >= DevourGoal )
{
PackItem( new MetalChest() );
m_HasMetalChest = true;
HasMetalChest = true;
}
return true;

View file

@ -9,14 +9,8 @@ namespace Server.Mobiles
public override string CorpseName => "a plague beast lord corpse";
public override Poison PoisonImmune => Poison.Lethal;
private Mobile m_OpenedBy;
[CommandProperty( AccessLevel.GameMaster )]
public Mobile OpenedBy
{
get => m_OpenedBy;
set => m_OpenedBy = value;
}
public Mobile OpenedBy { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool IsBleeding
@ -80,7 +74,7 @@ namespace Server.Mobiles
{
if ( IsAccessibleTo( from ) )
{
if ( m_OpenedBy != null && Backpack != null )
if ( OpenedBy != null && Backpack != null )
Backpack.DisplayTo( from );
else
PrivateOverheadMessage( MessageType.Regular, 0x3B2, 1071917, from.NetState ); // * You attempt to tear open the amorphous flesh, but it resists *
@ -105,8 +99,8 @@ namespace Server.Mobiles
public override void OnDelete()
{
if ( m_OpenedBy?.Holding is PlagueBeastInnard )
m_OpenedBy.Holding.Delete();
if ( OpenedBy?.Holding is PlagueBeastInnard )
OpenedBy.Holding.Delete();
if ( Backpack != null )
{
@ -190,7 +184,7 @@ namespace Server.Mobiles
if ( !InRange( check, 2 ) )
PrivateOverheadMessage( MessageType.Label, 0x3B2, 500446, check.NetState ); // That is too far away.
else if ( m_OpenedBy != null && m_OpenedBy != check )
else if ( OpenedBy != null && OpenedBy != check )
PrivateOverheadMessage( MessageType.Label, 0x3B2, 500365, check.NetState ); // That is being used by someone else
else if ( Frozen )
return true;
@ -200,9 +194,9 @@ namespace Server.Mobiles
public virtual void Carve( Mobile from, Item item )
{
if ( m_OpenedBy == null && IsAccessibleTo( from ) )
if ( OpenedBy == null && IsAccessibleTo( from ) )
{
m_OpenedBy = from;
OpenedBy = from;
if ( m_Timer == null )
m_Timer = new DecayTimer( this );
@ -243,7 +237,7 @@ namespace Server.Mobiles
Frozen = false;
Blessed = false;
if ( m_OpenedBy == null )
if ( OpenedBy == null )
Hue = 0;
}
@ -257,7 +251,7 @@ namespace Server.Mobiles
writer.WriteEncodedInt( 0 ); // version
writer.Write( m_OpenedBy );
writer.Write( OpenedBy );
if ( m_Timer != null )
{
@ -275,7 +269,7 @@ namespace Server.Mobiles
int version = reader.ReadEncodedInt();
m_OpenedBy = reader.ReadMobile();
OpenedBy = reader.ReadMobile();
if ( reader.ReadBool() )
{
@ -293,12 +287,10 @@ namespace Server.Mobiles
private class DecayTimer : Timer
{
private PlagueBeastLord m_Lord;
private int m_Count;
private int m_Deadline;
public int Count => m_Count;
public int Count { get; private set; }
public int Deadline => m_Deadline;
public int Deadline { get; private set; }
public DecayTimer( PlagueBeastLord lord ) : this( lord, 0, 120 )
{
@ -307,8 +299,8 @@ namespace Server.Mobiles
public DecayTimer( PlagueBeastLord lord, int count, int deadline ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 1 ) )
{
m_Lord = lord;
m_Count = count;
m_Deadline = deadline;
Count = count;
Deadline = deadline;
}
protected override void OnTick()
@ -319,22 +311,22 @@ namespace Server.Mobiles
return;
}
if ( m_Count + 15 == m_Deadline )
if ( Count + 15 == Deadline )
{
if ( m_Lord.OpenedBy != null )
m_Lord.PublicOverheadMessage( MessageType.Regular, 0x3B2, 1071921 ); // * The plague beast begins to bubble and dissolve! *
m_Lord.PlaySound( 0x103 );
}
else if ( m_Count + 10 == m_Deadline )
else if ( Count + 10 == Deadline )
{
m_Lord.PlaySound( 0x21 );
}
else if ( m_Count + 5 == m_Deadline )
else if ( Count + 5 == Deadline )
{
m_Lord.PlaySound( 0x1C2 );
}
else if ( m_Count == m_Deadline )
else if ( Count == Deadline )
{
m_Lord.Unfreeze();
@ -343,15 +335,15 @@ namespace Server.Mobiles
Stop();
}
else if ( m_Count % 15 == 0 )
else if ( Count % 15 == 0 )
m_Lord.PlaySound( 0x1BF );
m_Count++;
Count++;
}
public void StartDissolving()
{
m_Deadline = Math.Min( m_Count + 60, m_Deadline );
Deadline = Math.Min( Count + 60, Deadline );
}
}
}

View file

@ -7,22 +7,12 @@ namespace Server.Mobiles
public class PlagueSpawn : BaseCreature
{
public override string CorpseName => "a plague spawn corpse";
private Mobile m_Owner;
private DateTime m_ExpireTime;
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Owner
{
get => m_Owner;
set => m_Owner = value;
}
public Mobile Owner { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public DateTime ExpireTime
{
get => m_ExpireTime;
set => m_ExpireTime = value;
}
public DateTime ExpireTime { get; set; }
[Constructible]
public PlagueSpawn() : this( null )
@ -48,7 +38,7 @@ namespace Server.Mobiles
public override void OnThink()
{
if ( m_Owner != null && ( DateTime.UtcNow >= m_ExpireTime || m_Owner.Deleted || Map != m_Owner.Map || !InRange( m_Owner, 16 ) ) )
if ( Owner != null && ( DateTime.UtcNow >= ExpireTime || Owner.Deleted || Map != Owner.Map || !InRange( Owner, 16 ) ) )
{
PlaySound( GetIdleSound() );
Delete();
@ -63,8 +53,8 @@ namespace Server.Mobiles
public PlagueSpawn( Mobile owner ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
m_Owner = owner;
m_ExpireTime = DateTime.UtcNow + TimeSpan.FromMinutes( 1.0 );
Owner = owner;
ExpireTime = DateTime.UtcNow + TimeSpan.FromMinutes( 1.0 );
Hue = Utility.Random( 0x11, 15 );

View file

@ -6,13 +6,8 @@ namespace Server.Mobiles
public class Leviathan : BaseCreature
{
public override string CorpseName => "a leviathan corpse";
private Mobile m_Fisher;
public Mobile Fisher
{
get => m_Fisher;
set => m_Fisher = value;
}
public Mobile Fisher { get; set; }
public override string DefaultName => "a leviathan";
@ -24,7 +19,7 @@ namespace Server.Mobiles
[Constructible]
public Leviathan( Mobile fisher ) : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
m_Fisher = fisher;
Fisher = fisher;
// May not be OSI accurate; mostly copied from krakens
Body = 77;
@ -110,9 +105,8 @@ namespace Server.Mobiles
int version = reader.ReadInt();
}
public static Type[] Artifacts => m_Artifacts;
private static Type[] m_Artifacts = {
public static Type[] Artifacts { get; } =
{
// Decorations
typeof( CandelabraOfSouls ),
typeof( GhostShipAnchor ),
@ -142,7 +136,7 @@ namespace Server.Mobiles
public static void GiveArtifactTo( Mobile m )
{
Item item = Loot.Construct( m_Artifacts );
Item item = Loot.Construct( Artifacts );
if ( item == null )
return;
@ -162,8 +156,8 @@ namespace Server.Mobiles
{
GiveArtifactTo( mob );
if ( mob == m_Fisher )
m_Fisher = null;
if ( mob == Fisher )
Fisher = null;
}
}
@ -171,10 +165,10 @@ namespace Server.Mobiles
{
base.OnDeath( c );
if ( m_Fisher != null && 25 > Utility.Random( 100 ) )
GiveArtifactTo( m_Fisher );
if ( Fisher != null && 25 > Utility.Random( 100 ) )
GiveArtifactTo( Fisher );
m_Fisher = null;
Fisher = null;
}
}
}

File diff suppressed because it is too large Load diff

View file

@ -46,13 +46,11 @@ namespace Server.Mobiles
new SpawnEntry( new Point3D( 5579, 1858, 0 ), new Point3D( 2499, 919, 0 ) ) // Covetous
};
private static ArrayList m_Instances = new ArrayList();
public static ArrayList Instances => m_Instances;
public static ArrayList Instances { get; } = new ArrayList();
public static Harrower Spawn( Point3D platLoc, Map platMap )
{
if ( m_Instances.Count > 0 )
if ( Instances.Count > 0 )
return null;
SpawnEntry entry = m_Entries[Utility.Random( m_Entries.Length )];
@ -66,14 +64,14 @@ namespace Server.Mobiles
return harrower;
}
public static bool CanSpawn => ( m_Instances.Count == 0 );
public static bool CanSpawn => ( Instances.Count == 0 );
public override string DefaultName => "the harrower";
[Constructible]
public Harrower() : base( AIType.AI_Mage, FightMode.Closest, 18, 1, 0.2, 0.4 )
{
m_Instances.Add( this );
Instances.Add( this );
BodyValue = 146;
SetStr( 900, 1000 );
@ -200,12 +198,12 @@ namespace Server.Mobiles
public Harrower( Serial serial ) : base( serial )
{
m_Instances.Add( this );
Instances.Add( this );
}
public override void OnAfterDelete()
{
m_Instances.Remove( this );
Instances.Remove( this );
base.OnAfterDelete();
}

View file

@ -6,16 +6,11 @@ namespace Server.Mobiles
public class HarrowerTentacles : BaseCreature
{
public override string CorpseName => "a tentacles corpse";
private Mobile m_Harrower;
private DrainTimer m_Timer;
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Harrower
{
get => m_Harrower;
set => m_Harrower = value;
}
public Mobile Harrower { get; set; }
public override string DefaultName => "tentacles of the harrower";
@ -26,7 +21,7 @@ namespace Server.Mobiles
public HarrowerTentacles( Mobile harrower ) : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
m_Harrower = harrower;
Harrower = harrower;
Body = 129;
SetStr( 901, 1000 );
@ -119,7 +114,7 @@ namespace Server.Mobiles
writer.Write( (int) 0 ); // version
writer.Write( m_Harrower );
writer.Write( Harrower );
}
public override void Deserialize( GenericReader reader )
@ -132,7 +127,7 @@ namespace Server.Mobiles
{
case 0:
{
m_Harrower = reader.ReadMobile();
Harrower = reader.ReadMobile();
m_Timer = new DrainTimer( this );
m_Timer.Start();

View file

@ -143,10 +143,9 @@ namespace Server.Mobiles
private class VirtualMountItem : Item, IMountItem
{
private Mobile m_Rider;
private VirtualMount m_Mount;
public Mobile Rider => m_Rider;
public Mobile Rider { get; private set; }
public VirtualMountItem( Mobile mob )
: base( 0x3EBB )
@ -155,7 +154,7 @@ namespace Server.Mobiles
Movable = false;
m_Rider = mob;
Rider = mob;
m_Mount = new VirtualMount( this );
}
@ -173,7 +172,7 @@ namespace Server.Mobiles
writer.Write( (int)0 ); // version
writer.Write( (Mobile)m_Rider );
writer.Write( (Mobile)Rider );
}
public override void Deserialize( GenericReader reader )
@ -182,9 +181,9 @@ namespace Server.Mobiles
int version = reader.ReadInt();
m_Rider = reader.ReadMobile();
Rider = reader.ReadMobile();
if ( m_Rider == null )
if ( Rider == null )
Delete();
}
}

View file

@ -229,9 +229,7 @@ namespace Server.Mobiles
return false;
}
private static Hashtable m_EscortTable = new Hashtable();
public static Hashtable EscortTable => m_EscortTable;
public static Hashtable EscortTable { get; } = new Hashtable();
public virtual bool AcceptEscorter(Mobile m)
{
@ -245,7 +243,7 @@ namespace Server.Mobiles
if (escorter != null || !m.Alive)
return false;
BaseEscortable escortable = (BaseEscortable)m_EscortTable[m];
BaseEscortable escortable = (BaseEscortable)EscortTable[m];
if (escortable != null && !escortable.Deleted && escortable.GetEscorter() == m)
{
@ -268,7 +266,7 @@ namespace Server.Mobiles
((PlayerMobile)m).LastEscortTime = DateTime.UtcNow;
Say("Lead on! Payment will be made when we arrive in {0}.", (dest.Name == "Ocllo" && m.Map == Map.Trammel) ? "Haven" : dest.Name);
m_EscortTable[m] = this;
EscortTable[m] = this;
StartFollow();
return true;
}
@ -387,7 +385,7 @@ namespace Server.Mobiles
Say(1005653); // Hmmm. I seem to have lost my master.
SetControlMaster(null);
m_EscortTable.Remove(master);
EscortTable.Remove(master);
Timer.DelayCall(TimeSpan.FromSeconds(5.0), Delete);
return null;
@ -449,7 +447,7 @@ namespace Server.Mobiles
StopFollow();
SetControlMaster(null);
m_EscortTable.Remove(escorter);
EscortTable.Remove(escorter);
BeginDelete();
Misc.Titles.AwardFame(escorter, 10, true);
@ -645,13 +643,11 @@ namespace Server.Mobiles
public class EscortDestinationInfo
{
private string m_Name;
private Region m_Region;
//private Rectangle2D[] m_Bounds;
public string Name => m_Name;
public string Name { get; }
public Region Region => m_Region;
public Region Region { get; }
/*public Rectangle2D[] Bounds
{
@ -660,13 +656,13 @@ namespace Server.Mobiles
public bool Contains(Point3D p)
{
return m_Region.Contains(p);
return Region.Contains(p);
}
public EscortDestinationInfo(string name, Region region)
{
m_Name = name;
m_Region = region;
Name = name;
Region = region;
}
private static Hashtable m_Table;

View file

@ -44,46 +44,44 @@ namespace Server.Mobiles
}
}
public bool IsEmpty => ( m_Entries == null || m_Entries.Count == 0 );
public bool IsEmpty => ( Entries == null || Entries.Count == 0 );
public GlobalTownCrierEntryList()
{
}
private List<TownCrierEntry> m_Entries;
public List<TownCrierEntry> Entries => m_Entries;
public List<TownCrierEntry> Entries { get; private set; }
public TownCrierEntry GetRandomEntry()
{
if ( m_Entries == null || m_Entries.Count == 0 )
if ( Entries == null || Entries.Count == 0 )
return null;
for ( int i = m_Entries.Count - 1; m_Entries != null && i >= 0; --i )
for ( int i = Entries.Count - 1; Entries != null && i >= 0; --i )
{
if ( i >= m_Entries.Count )
if ( i >= Entries.Count )
continue;
TownCrierEntry tce = m_Entries[i];
TownCrierEntry tce = Entries[i];
if ( tce.Expired )
RemoveEntry( tce );
}
if ( m_Entries == null || m_Entries.Count == 0 )
if ( Entries == null || Entries.Count == 0 )
return null;
return m_Entries[Utility.Random( m_Entries.Count )];
return Entries[Utility.Random( Entries.Count )];
}
public TownCrierEntry AddEntry( string[] lines, TimeSpan duration )
{
if ( m_Entries == null )
m_Entries = new List<TownCrierEntry>();
if ( Entries == null )
Entries = new List<TownCrierEntry>();
TownCrierEntry tce = new TownCrierEntry( lines, duration );
m_Entries.Add( tce );
Entries.Add( tce );
List<TownCrier> instances = TownCrier.Instances;
@ -95,35 +93,34 @@ namespace Server.Mobiles
public void RemoveEntry( TownCrierEntry tce )
{
if ( m_Entries == null )
if ( Entries == null )
return;
m_Entries.Remove( tce );
Entries.Remove( tce );
if ( m_Entries.Count == 0 )
m_Entries = null;
if ( Entries.Count == 0 )
Entries = null;
}
}
public class TownCrierEntry
{
private string[] m_Lines;
private DateTime m_ExpireTime;
public string[] Lines { get; }
public string[] Lines => m_Lines;
public DateTime ExpireTime => m_ExpireTime;
public bool Expired => ( DateTime.UtcNow >= m_ExpireTime );
public DateTime ExpireTime { get; }
public bool Expired => ( DateTime.UtcNow >= ExpireTime );
public TownCrierEntry( string[] lines, TimeSpan duration )
{
m_Lines = lines;
Lines = lines;
if ( duration < TimeSpan.Zero )
duration = TimeSpan.Zero;
else if ( duration > TimeSpan.FromDays( 365.0 ) )
duration = TimeSpan.FromDays( 365.0 );
m_ExpireTime = DateTime.UtcNow + duration;
ExpireTime = DateTime.UtcNow + duration;
}
}
@ -318,35 +315,34 @@ namespace Server.Mobiles
public class TownCrier : Mobile, ITownCrierEntryList
{
private List<TownCrierEntry> m_Entries;
private Timer m_NewsTimer;
private Timer m_AutoShoutTimer;
public List<TownCrierEntry> Entries => m_Entries;
public List<TownCrierEntry> Entries { get; private set; }
public TownCrierEntry GetRandomEntry()
{
if ( m_Entries == null || m_Entries.Count == 0 )
if ( Entries == null || Entries.Count == 0 )
return GlobalTownCrierEntryList.Instance.GetRandomEntry();
for ( int i = m_Entries.Count - 1; m_Entries != null && i >= 0; --i )
for ( int i = Entries.Count - 1; Entries != null && i >= 0; --i )
{
if ( i >= m_Entries.Count )
if ( i >= Entries.Count )
continue;
TownCrierEntry tce = m_Entries[i];
TownCrierEntry tce = Entries[i];
if ( tce.Expired )
RemoveEntry( tce );
}
if ( m_Entries == null || m_Entries.Count == 0 )
if ( Entries == null || Entries.Count == 0 )
return GlobalTownCrierEntryList.Instance.GetRandomEntry();
TownCrierEntry entry = GlobalTownCrierEntryList.Instance.GetRandomEntry();
if ( entry == null || Utility.RandomBool() )
entry = m_Entries[Utility.Random( m_Entries.Count )];
entry = Entries[Utility.Random( Entries.Count )];
return entry;
}
@ -359,12 +355,12 @@ namespace Server.Mobiles
public TownCrierEntry AddEntry( string[] lines, TimeSpan duration )
{
if ( m_Entries == null )
m_Entries = new List<TownCrierEntry>();
if ( Entries == null )
Entries = new List<TownCrierEntry>();
TownCrierEntry tce = new TownCrierEntry( lines, duration );
m_Entries.Add( tce );
Entries.Add( tce );
if ( m_AutoShoutTimer == null )
m_AutoShoutTimer = Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), TimeSpan.FromMinutes( 1.0 ), AutoShout_Callback );
@ -374,15 +370,15 @@ namespace Server.Mobiles
public void RemoveEntry( TownCrierEntry tce )
{
if ( m_Entries == null )
if ( Entries == null )
return;
m_Entries.Remove( tce );
Entries.Remove( tce );
if ( m_Entries.Count == 0 )
m_Entries = null;
if ( Entries.Count == 0 )
Entries = null;
if ( m_Entries == null && GlobalTownCrierEntryList.Instance.IsEmpty )
if ( Entries == null && GlobalTownCrierEntryList.Instance.IsEmpty )
{
m_AutoShoutTimer?.Stop();
@ -461,14 +457,12 @@ namespace Server.Mobiles
}
}
private static List<TownCrier> m_Instances = new List<TownCrier>();
public static List<TownCrier> Instances => m_Instances;
public static List<TownCrier> Instances { get; } = new List<TownCrier>();
[Constructible]
public TownCrier()
{
m_Instances.Add( this );
Instances.Add( this );
InitStats( 100, 100, 25 );
@ -525,13 +519,13 @@ namespace Server.Mobiles
public override void OnDelete()
{
m_Instances.Remove( this );
Instances.Remove( this );
base.OnDelete();
}
public TownCrier( Serial serial ) : base( serial )
{
m_Instances.Add( this );
Instances.Add( this );
}
public override void Serialize( GenericWriter writer )

View file

@ -4,17 +4,15 @@ namespace Server.Mobiles
{
public class AnimalBuyInfo : GenericBuyInfo
{
private int m_ControlSlots;
public AnimalBuyInfo( int controlSlots, Type type, int price, int amount, int itemID, int hue ) : this( controlSlots, null, type, price, amount, itemID, hue )
{
}
public AnimalBuyInfo( int controlSlots, string name, Type type, int price, int amount, int itemID, int hue ) : base( name, type, price, amount, itemID, hue )
{
m_ControlSlots = controlSlots;
ControlSlots = controlSlots;
}
public override int ControlSlots => m_ControlSlots;
public override int ControlSlots { get; }
}
}

View file

@ -30,10 +30,6 @@ namespace Server.Mobiles
private ArrayList m_ArmorBuyInfo = new ArrayList();
private ArrayList m_ArmorSellInfo = new ArrayList();
private DateTime m_LastRestock;
private DateTime m_NextTrickOrTreat;
public override bool CanTeach => true;
public override bool BardImmune => true;
@ -48,9 +44,7 @@ namespace Server.Mobiles
public override bool IsInvulnerable => true;
public virtual DateTime NextTrickOrTreat { get => m_NextTrickOrTreat;
set => m_NextTrickOrTreat = value;
}
public virtual DateTime NextTrickOrTreat { get; set; }
public override bool ShowFameTitle => false;
@ -178,7 +172,7 @@ namespace Server.Mobiles
pack.Visible = false;
AddItem( pack );
m_LastRestock = DateTime.UtcNow;
LastRestock = DateTime.UtcNow;
}
public BaseVendor( Serial serial )
@ -186,11 +180,7 @@ namespace Server.Mobiles
{
}
public DateTime LastRestock
{
get => m_LastRestock;
set => m_LastRestock = value;
}
public DateTime LastRestock { get; set; }
public virtual TimeSpan RestockDelay => TimeSpan.FromHours( 1 );
@ -214,7 +204,7 @@ namespace Server.Mobiles
protected void LoadSBInfo()
{
m_LastRestock = DateTime.UtcNow;
LastRestock = DateTime.UtcNow;
for ( int i = 0; i < m_ArmorBuyInfo.Count; ++i )
{
@ -491,7 +481,7 @@ namespace Server.Mobiles
public virtual void Restock()
{
m_LastRestock = DateTime.UtcNow;
LastRestock = DateTime.UtcNow;
IBuyItemInfo[] buyInfo = GetBuyInfo();
@ -515,7 +505,7 @@ namespace Server.Mobiles
return;
}
if ( DateTime.UtcNow - m_LastRestock > RestockDelay )
if ( DateTime.UtcNow - LastRestock > RestockDelay )
Restock();
UpdateBuyInfo();

View file

@ -101,13 +101,8 @@ namespace Server.Mobiles
}
}
private Type m_Type;
private string m_Name;
private int m_Price;
private int m_MaxAmount, m_Amount;
private int m_ItemID;
private int m_Hue;
private object[] m_Args;
private int m_Amount;
private IEntity m_DisplayEntity;
public virtual int ControlSlots => 0;
@ -137,49 +132,39 @@ namespace Server.Mobiles
bool canCache = CanCacheDisplay;
if ( canCache )
m_DisplayEntity = DisplayCache.Cache.Lookup( m_Type );
m_DisplayEntity = DisplayCache.Cache.Lookup( Type );
if ( m_DisplayEntity == null || IsDeleted( m_DisplayEntity ) )
m_DisplayEntity = GetEntity();
DisplayCache.Cache.Store( m_Type, m_DisplayEntity, canCache );
DisplayCache.Cache.Store( Type, m_DisplayEntity, canCache );
return m_DisplayEntity;
}
public Type Type
{
get => m_Type;
set => m_Type = value;
}
public Type Type { get; set; }
public string Name
{
get => m_Name;
set => m_Name = value;
}
public string Name { get; set; }
public int DefaultPrice => m_PriceScalar;
private int m_PriceScalar;
public int DefaultPrice { get; private set; }
public int PriceScalar
{
get => m_PriceScalar;
set => m_PriceScalar = value;
get => DefaultPrice;
set => DefaultPrice = value;
}
public int Price
{
get
{
if ( m_PriceScalar != 0 )
if ( DefaultPrice != 0 )
{
if ( m_Price > 5000000 )
{
long price = m_Price;
price *= m_PriceScalar;
price *= DefaultPrice;
price += 50;
price /= 100;
@ -189,7 +174,7 @@ namespace Server.Mobiles
return (int)price;
}
return ( ((m_Price * m_PriceScalar) + 50) / 100 );
return ( ((m_Price * DefaultPrice) + 50) / 100 );
}
return m_Price;
@ -197,17 +182,9 @@ namespace Server.Mobiles
set => m_Price = value;
}
public int ItemID
{
get => m_ItemID;
set => m_ItemID = value;
}
public int ItemID { get; set; }
public int Hue
{
get => m_Hue;
set => m_Hue = value;
}
public int Hue { get; set; }
public int Amount
{
@ -215,17 +192,9 @@ namespace Server.Mobiles
set{ if ( value < 0 ) value = 0; m_Amount = value; }
}
public int MaxAmount
{
get => m_MaxAmount;
set => m_MaxAmount = value;
}
public int MaxAmount { get; set; }
public object[] Args
{
get => m_Args;
set => m_Args = value;
}
public object[] Args { get; set; }
public GenericBuyInfo( Type type, int price, int amount, int itemID, int hue ) : this( null, type, price, amount, itemID, hue, null )
{
@ -241,26 +210,26 @@ namespace Server.Mobiles
public GenericBuyInfo( string name, Type type, int price, int amount, int itemID, int hue, object[] args )
{
m_Type = type;
Type = type;
m_Price = price;
m_MaxAmount = m_Amount = amount;
m_ItemID = itemID;
m_Hue = hue;
m_Args = args;
MaxAmount = m_Amount = amount;
ItemID = itemID;
Hue = hue;
Args = args;
if ( name == null )
m_Name = itemID < 0x4000 ? (1020000 + itemID).ToString() : (1078872 + itemID).ToString();
Name = itemID < 0x4000 ? (1020000 + itemID).ToString() : (1078872 + itemID).ToString();
else
m_Name = name;
Name = name;
}
//get a new instance of an object (we just bought it)
public virtual IEntity GetEntity()
{
if ( m_Args == null || m_Args.Length == 0 )
return (IEntity)Activator.CreateInstance( m_Type );
if ( Args == null || Args.Length == 0 )
return (IEntity)Activator.CreateInstance( Type );
return (IEntity)Activator.CreateInstance( m_Type, m_Args );
return (IEntity)Activator.CreateInstance( Type, Args );
//return (Item)Activator.CreateInstance( m_Type );
}
@ -311,11 +280,11 @@ namespace Server.Mobiles
if ( Core.ML && Obj_Disp is Item && !( Obj_Disp as Item ).Stackable )
{
m_MaxAmount = Math.Min( 20, m_MaxAmount );
MaxAmount = Math.Min( 20, MaxAmount );
}
else
{
m_MaxAmount = Math.Min( 999, m_MaxAmount * 2 );
MaxAmount = Math.Min( 999, MaxAmount * 2 );
}
}
else
@ -326,7 +295,7 @@ namespace Server.Mobiles
* there's clearly a demand and we should not cut down on the stock.
*/
int halfQuantity = m_MaxAmount;
int halfQuantity = MaxAmount;
if ( halfQuantity >= 999 )
halfQuantity = 640;
@ -334,10 +303,10 @@ namespace Server.Mobiles
halfQuantity /= 2;
if ( m_Amount >= halfQuantity )
m_MaxAmount = halfQuantity;
MaxAmount = halfQuantity;
}
m_Amount = m_MaxAmount;
m_Amount = MaxAmount;
}
}
}

View file

@ -7,8 +7,7 @@ namespace Server.Mobiles
{
public class CustomHairstylist : BaseVendor
{
private List<SBInfo> m_SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos => m_SBInfos;
protected override List<SBInfo> SBInfos { get; } = new List<SBInfo>();
public override bool ClickTitle => false;
@ -92,36 +91,34 @@ namespace Server.Mobiles
public class HairstylistBuyInfo
{
private int m_Title;
private string m_TitleString;
private int m_Price;
private bool m_FacialHair;
private Type m_GumpType;
private object[] m_GumpArgs;
public int Title { get; }
public int Title => m_Title;
public string TitleString => m_TitleString;
public int Price => m_Price;
public bool FacialHair => m_FacialHair;
public Type GumpType => m_GumpType;
public object[] GumpArgs => m_GumpArgs;
public string TitleString { get; }
public int Price { get; }
public bool FacialHair { get; }
public Type GumpType { get; }
public object[] GumpArgs { get; }
public HairstylistBuyInfo( int title, int price, bool facialHair, Type gumpType, object[] args )
{
m_Title = title;
m_Price = price;
m_FacialHair = facialHair;
m_GumpType = gumpType;
m_GumpArgs = args;
Title = title;
Price = price;
FacialHair = facialHair;
GumpType = gumpType;
GumpArgs = args;
}
public HairstylistBuyInfo( string title, int price, bool facialHair, Type gumpType, object[] args )
{
m_TitleString = title;
m_Price = price;
m_FacialHair = facialHair;
m_GumpType = gumpType;
m_GumpArgs = args;
TitleString = title;
Price = price;
FacialHair = facialHair;
GumpType = gumpType;
GumpArgs = args;
}
}
@ -229,26 +226,24 @@ namespace Server.Mobiles
public class ChangeHairHueEntry
{
private string m_Name;
private int[] m_Hues;
public string Name { get; }
public string Name => m_Name;
public int[] Hues => m_Hues;
public int[] Hues { get; }
public ChangeHairHueEntry( string name, int[] hues )
{
m_Name = name;
m_Hues = hues;
Name = name;
Hues = hues;
}
public ChangeHairHueEntry( string name, int start, int count )
{
m_Name = name;
Name = name;
m_Hues = new int[count];
Hues = new int[count];
for ( int i = 0; i < count; ++i )
m_Hues[i] = start + i;
Hues[i] = start + i;
}
public static readonly ChangeHairHueEntry[] BrightEntries = {
@ -386,21 +381,20 @@ namespace Server.Mobiles
public class ChangeHairstyleEntry
{
private int m_ItemID;
private int m_GumpID;
private int m_X, m_Y;
public int ItemID { get; }
public int ItemID => m_ItemID;
public int GumpID => m_GumpID;
public int X => m_X;
public int Y => m_Y;
public int GumpID { get; }
public int X { get; }
public int Y { get; }
public ChangeHairstyleEntry( int gumpID, int x, int y, int itemID )
{
m_GumpID = gumpID;
m_X = x;
m_Y = y;
m_ItemID = itemID;
GumpID = gumpID;
X = x;
Y = y;
ItemID = itemID;
}
public static readonly ChangeHairstyleEntry[] HairEntries = {

View file

@ -7,8 +7,7 @@ namespace Server.Mobiles
{
public abstract class BaseGuildmaster : BaseVendor
{
private List<SBInfo> m_SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos => m_SBInfos;
protected override List<SBInfo> SBInfos { get; } = new List<SBInfo>();
public override bool IsActiveVendor => false;

View file

@ -84,20 +84,14 @@ namespace Server.Mobiles
public class BarkeeperRumor
{
private string m_Message;
private string m_Keyword;
public string Message { get; set; }
public string Message{ get => m_Message;
set => m_Message = value;
}
public string Keyword{ get => m_Keyword;
set => m_Keyword = value;
}
public string Keyword { get; set; }
public BarkeeperRumor( string message, string keyword )
{
m_Message = message;
m_Keyword = keyword;
Message = message;
Keyword = keyword;
}
public static BarkeeperRumor Deserialize( GenericReader reader )
@ -117,8 +111,8 @@ namespace Server.Mobiles
else
{
writer.Write( true );
writer.Write( rumor.m_Message );
writer.Write( rumor.m_Keyword );
writer.Write( rumor.Message );
writer.Write( rumor.Keyword );
}
}
}
@ -142,18 +136,10 @@ namespace Server.Mobiles
public class PlayerBarkeeper : BaseVendor
{
private Mobile m_Owner;
private BaseHouse m_House;
private string m_TipMessage;
private BarkeeperRumor[] m_Rumors;
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Owner
{
get => m_Owner;
set => m_Owner = value;
}
public Mobile Owner { get; set; }
public BaseHouse House
{
@ -169,11 +155,7 @@ namespace Server.Mobiles
}
[CommandProperty( AccessLevel.GameMaster )]
public string TipMessage
{
get => m_TipMessage;
set => m_TipMessage = value;
}
public string TipMessage { get; set; }
public override bool IsActiveBuyer => false;
public override bool IsActiveSeller => ( m_SBInfos.Count > 0 );
@ -181,7 +163,7 @@ namespace Server.Mobiles
public override bool DisallowAllMoves => true;
public override bool NoHouseRestrictions => true;
public BarkeeperRumor[] Rumors => m_Rumors;
public BarkeeperRumor[] Rumors { get; private set; }
public override VendorShoeType ShoeType => Utility.RandomBool() ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
@ -217,9 +199,9 @@ namespace Server.Mobiles
public PlayerBarkeeper( Mobile owner, BaseHouse house ) : base( "the barkeeper" )
{
m_Owner = owner;
Owner = owner;
House = house;
m_Rumors = new BarkeeperRumor[3];
Rumors = new BarkeeperRumor[3];
LoadSBInfo();
}
@ -295,9 +277,9 @@ namespace Server.Mobiles
}
}
for ( int i = 0; i < m_Rumors.Length; ++i )
for ( int i = 0; i < Rumors.Length; ++i )
{
BarkeeperRumor rumor = m_Rumors[i];
BarkeeperRumor rumor = Rumors[i];
string keyword = rumor?.Keyword;
@ -329,7 +311,7 @@ namespace Server.Mobiles
}
else
{
string tip = m_TipMessage;
string tip = TipMessage;
if ( tip == null || (tip = tip.Trim()).Length == 0 )
{
@ -357,7 +339,7 @@ namespace Server.Mobiles
if ( from.AccessLevel > AccessLevel.GameMaster )
return true;
return ( m_Owner == from );
return ( Owner == from );
}
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
@ -383,7 +365,7 @@ namespace Server.Mobiles
public void BeginChangeRumor( Mobile from, int index )
{
if ( index < 0 || index >= m_Rumors.Length )
if ( index < 0 || index >= Rumors.Length )
return;
from.Prompt = new ChangeRumorMessagePrompt( this, index );
@ -392,13 +374,13 @@ namespace Server.Mobiles
public void EndChangeRumor( Mobile from, int index, string text )
{
if ( index < 0 || index >= m_Rumors.Length )
if ( index < 0 || index >= Rumors.Length )
return;
if ( m_Rumors[index] == null )
m_Rumors[index] = new BarkeeperRumor( text, null );
if ( Rumors[index] == null )
Rumors[index] = new BarkeeperRumor( text, null );
else
m_Rumors[index].Message = text;
Rumors[index].Message = text;
from.Prompt = new ChangeRumorKeywordPrompt( this, index );
PrivateOverheadMessage( MessageType.Regular, 0x3B2, false, "What keyword should a guest say to me to get this news?", from.NetState );
@ -406,23 +388,23 @@ namespace Server.Mobiles
public void EndChangeKeyword( Mobile from, int index, string text )
{
if ( index < 0 || index >= m_Rumors.Length )
if ( index < 0 || index >= Rumors.Length )
return;
if ( m_Rumors[index] == null )
m_Rumors[index] = new BarkeeperRumor( null, text );
if ( Rumors[index] == null )
Rumors[index] = new BarkeeperRumor( null, text );
else
m_Rumors[index].Keyword = text;
Rumors[index].Keyword = text;
PrivateOverheadMessage( MessageType.Regular, 0x3B2, false, "I'll pass on the message.", from.NetState );
}
public void RemoveRumor( Mobile from, int index )
{
if ( index < 0 || index >= m_Rumors.Length )
if ( index < 0 || index >= Rumors.Length )
return;
m_Rumors[index] = null;
Rumors[index] = null;
}
public void BeginChangeTip( Mobile from )
@ -433,13 +415,13 @@ namespace Server.Mobiles
public void EndChangeTip( Mobile from, string text )
{
m_TipMessage = text;
TipMessage = text;
PrivateOverheadMessage( MessageType.Regular, 0x3B2, false, "I'll say that to anyone who gives me a good tip.", from.NetState );
}
public void RemoveTip( Mobile from )
{
m_TipMessage = null;
TipMessage = null;
}
public void BeginChangeTitle( Mobile from )
@ -511,14 +493,14 @@ namespace Server.Mobiles
writer.Write( (Item) m_House );
writer.Write( (Mobile) m_Owner );
writer.Write( (Mobile) Owner );
writer.WriteEncodedInt( (int) m_Rumors.Length );
writer.WriteEncodedInt( (int) Rumors.Length );
for ( int i = 0; i < m_Rumors.Length; ++i )
BarkeeperRumor.Serialize( writer, m_Rumors[i] );
for ( int i = 0; i < Rumors.Length; ++i )
BarkeeperRumor.Serialize( writer, Rumors[i] );
writer.Write( (string) m_TipMessage );
writer.Write( (string) TipMessage );
}
public override void Deserialize( GenericReader reader )
@ -537,14 +519,14 @@ namespace Server.Mobiles
}
case 0:
{
m_Owner = reader.ReadMobile();
Owner = reader.ReadMobile();
m_Rumors = new BarkeeperRumor[reader.ReadEncodedInt()];
Rumors = new BarkeeperRumor[reader.ReadEncodedInt()];
for ( int i = 0; i < m_Rumors.Length; ++i )
m_Rumors[i] = BarkeeperRumor.Deserialize( reader );
for ( int i = 0; i < Rumors.Length; ++i )
Rumors[i] = BarkeeperRumor.Deserialize( reader );
m_TipMessage = reader.ReadString();
TipMessage = reader.ReadString();
break;
}

View file

@ -21,24 +21,20 @@ namespace Server.Mobiles
public class VendorItem
{
private Item m_Item;
private int m_Price;
private string m_Description;
private DateTime m_Created;
private bool m_Valid;
public Item Item { get; }
public Item Item => m_Item;
public int Price => m_Price;
public int Price { get; }
public string FormattedPrice
{
get
{
if ( Core.ML )
return m_Price.ToString( "N0", CultureInfo.GetCultureInfo( "en-US" ) );
return Price.ToString( "N0", CultureInfo.GetCultureInfo( "en-US" ) );
return m_Price.ToString();
return Price.ToString();
}
}
@ -57,31 +53,31 @@ namespace Server.Mobiles
}
}
public DateTime Created => m_Created;
public DateTime Created { get; }
public bool IsForSale => Price >= 0;
public bool IsForFree => Price == 0;
public bool Valid => m_Valid;
public bool Valid { get; private set; }
public VendorItem( Item item, int price, string description, DateTime created )
{
m_Item = item;
m_Price = price;
Item = item;
Price = price;
if ( description != null )
m_Description = description;
else
m_Description = "";
m_Created = created;
Created = created;
m_Valid = true;
Valid = true;
}
public void Invalidate()
{
m_Valid = false;
Valid = false;
}
}
@ -269,18 +265,11 @@ namespace Server.Mobiles
{
private Dictionary<Item, VendorItem> m_SellItems;
private Mobile m_Owner;
private BaseHouse m_House;
private int m_BankAccount;
private int m_HoldGold;
private string m_ShopName;
private Timer m_PayTimer;
private DateTime m_NextPayTime;
private PlayerVendorPlaceholder m_Placeholder;
public PlayerVendor( Mobile owner, BaseHouse house )
{
@ -289,13 +278,13 @@ namespace Server.Mobiles
if ( BaseHouse.NewVendorSystem )
{
m_BankAccount = 0;
m_HoldGold = 4;
BankAccount = 0;
HoldGold = 4;
}
else
{
m_BankAccount = 1000;
m_HoldGold = 0;
BankAccount = 1000;
HoldGold = 0;
}
ShopName = "Shop Not Yet Named";
@ -316,7 +305,7 @@ namespace Server.Mobiles
m_PayTimer = new PayTimer( this, delay );
m_PayTimer.Start();
m_NextPayTime = DateTime.UtcNow + delay;
NextPayTime = DateTime.UtcNow + delay;
}
public PlayerVendor( Serial serial ) : base( serial )
@ -331,12 +320,12 @@ namespace Server.Mobiles
writer.Write( (bool) BaseHouse.NewVendorSystem );
writer.Write( (string) m_ShopName );
writer.WriteDeltaTime( (DateTime) m_NextPayTime );
writer.WriteDeltaTime( (DateTime) NextPayTime );
writer.Write( (Item) House );
writer.Write( (Mobile) m_Owner );
writer.Write( (int) m_BankAccount );
writer.Write( (int) m_HoldGold );
writer.Write( (Mobile) Owner );
writer.Write( (int) BankAccount );
writer.Write( (int) HoldGold );
writer.Write( (int) m_SellItems.Count );
foreach ( VendorItem vi in m_SellItems.Values )
@ -364,16 +353,16 @@ namespace Server.Mobiles
{
newVendorSystem = reader.ReadBool();
m_ShopName = reader.ReadString();
m_NextPayTime = reader.ReadDeltaTime();
NextPayTime = reader.ReadDeltaTime();
House = (BaseHouse) reader.ReadItem();
goto case 0;
}
case 0:
{
m_Owner = reader.ReadMobile();
m_BankAccount = reader.ReadInt();
m_HoldGold = reader.ReadInt();
Owner = reader.ReadMobile();
BankAccount = reader.ReadInt();
HoldGold = reader.ReadInt();
int count = reader.ReadInt();
@ -415,19 +404,19 @@ namespace Server.Mobiles
Timer.DelayCall( TimeSpan.Zero, FixDresswear );
}
m_NextPayTime = DateTime.UtcNow + PayTimer.GetInterval();
NextPayTime = DateTime.UtcNow + PayTimer.GetInterval();
if ( newVendorSystemActivated )
{
m_HoldGold += m_BankAccount;
m_BankAccount = 0;
HoldGold += BankAccount;
BankAccount = 0;
}
}
if ( version < 2 && RawStr == 75 && RawDex == 75 && RawInt == 75 )
InitStats( 100, 100, 25 );
TimeSpan delay = m_NextPayTime - DateTime.UtcNow;
TimeSpan delay = NextPayTime - DateTime.UtcNow;
m_PayTimer = new PayTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
m_PayTimer.Start();
@ -503,25 +492,13 @@ namespace Server.Mobiles
}
[CommandProperty( AccessLevel.GameMaster )]
public Mobile Owner
{
get => m_Owner;
set => m_Owner = value;
}
public Mobile Owner { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public int BankAccount
{
get => m_BankAccount;
set => m_BankAccount = value;
}
public int BankAccount { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public int HoldGold
{
get => m_HoldGold;
set => m_HoldGold = value;
}
public int HoldGold { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public string ShopName
@ -539,13 +516,9 @@ namespace Server.Mobiles
}
[CommandProperty( AccessLevel.GameMaster )]
public DateTime NextPayTime => m_NextPayTime;
public DateTime NextPayTime { get; private set; }
public PlayerVendorPlaceholder Placeholder
{
get => m_Placeholder;
set => m_Placeholder = value;
}
public PlayerVendorPlaceholder Placeholder { get; set; }
public BaseHouse House
{
@ -1354,7 +1327,7 @@ namespace Server.Mobiles
protected override void OnTick()
{
m_Vendor.m_NextPayTime = DateTime.UtcNow + Interval;
m_Vendor.NextPayTime = DateTime.UtcNow + Interval;
int pay;
int totalGold;
@ -1624,18 +1597,17 @@ namespace Server.Mobiles
public class PlayerVendorPlaceholder : Item
{
private PlayerVendor m_Vendor;
private ExpireTimer m_Timer;
[CommandProperty( AccessLevel.GameMaster )]
public PlayerVendor Vendor => m_Vendor;
public PlayerVendor Vendor { get; private set; }
public PlayerVendorPlaceholder( PlayerVendor vendor ) : base( 0x1F28 )
{
Hue = 0x672;
Movable = false;
m_Vendor = vendor;
Vendor = vendor;
m_Timer = new ExpireTimer( this );
m_Timer.Start();
@ -1649,8 +1621,8 @@ namespace Server.Mobiles
{
base.GetProperties( list );
if ( m_Vendor != null )
list.Add( 1062498, m_Vendor.Name ); // reserved for vendor ~1_NAME~
if ( Vendor != null )
list.Add( 1062498, Vendor.Name ); // reserved for vendor ~1_NAME~
}
public void RestartTimer()
@ -1678,10 +1650,10 @@ namespace Server.Mobiles
public override void OnDelete()
{
if ( m_Vendor != null && !m_Vendor.Deleted )
if ( Vendor != null && !Vendor.Deleted )
{
m_Vendor.MoveToWorld( Location, Map );
m_Vendor.Placeholder = null;
Vendor.MoveToWorld( Location, Map );
Vendor.Placeholder = null;
}
}
@ -1691,7 +1663,7 @@ namespace Server.Mobiles
writer.WriteEncodedInt( (int) 0 );
writer.Write( (Mobile) m_Vendor );
writer.Write( (Mobile) Vendor );
}
public override void Deserialize( GenericReader reader )
@ -1700,7 +1672,7 @@ namespace Server.Mobiles
int version = reader.ReadEncodedInt();
m_Vendor = (PlayerVendor) reader.ReadMobile();
Vendor = (PlayerVendor) reader.ReadMobile();
Timer.DelayCall( TimeSpan.Zero, Delete );
}

View file

@ -17,11 +17,9 @@ namespace Server.Mobiles
new VendorRentalDuration( TimeSpan.FromDays( 28.0 ), 1062364 ) // 1 Month
};
private TimeSpan m_Duration;
private int m_Name;
public TimeSpan Duration { get; }
public TimeSpan Duration => m_Duration;
public int Name => m_Name;
public int Name { get; }
public int ID
{
@ -39,34 +37,25 @@ namespace Server.Mobiles
private VendorRentalDuration( TimeSpan duration, int name )
{
m_Duration = duration;
m_Name = name;
Duration = duration;
Name = name;
}
}
public class RentedVendor : PlayerVendor
{
private VendorRentalDuration m_RentalDuration;
private int m_RentalPrice;
private bool m_LandlordRenew;
private bool m_RenterRenew;
private int m_RenewalPrice;
private int m_RentalGold;
private DateTime m_RentalExpireTime;
private Timer m_RentalExpireTimer;
public RentedVendor( Mobile owner, BaseHouse house, VendorRentalDuration duration, int rentalPrice, bool landlordRenew, int rentalGold ) : base( owner, house )
{
m_RentalDuration = duration;
m_RentalPrice = m_RenewalPrice = rentalPrice;
m_LandlordRenew = landlordRenew;
m_RenterRenew = false;
RentalDuration = duration;
RentalPrice = RenewalPrice = rentalPrice;
LandlordRenew = landlordRenew;
RenterRenew = false;
m_RentalGold = rentalGold;
RentalGold = rentalGold;
m_RentalExpireTime = DateTime.UtcNow + duration.Duration;
RentalExpireTime = DateTime.UtcNow + duration.Duration;
m_RentalExpireTimer = new RentalExpireTimer( this, duration.Duration );
m_RentalExpireTimer.Start();
}
@ -75,48 +64,28 @@ namespace Server.Mobiles
{
}
public VendorRentalDuration RentalDuration => m_RentalDuration;
public VendorRentalDuration RentalDuration { get; private set; }
[CommandProperty( AccessLevel.GameMaster )]
public int RentalPrice
{
get => m_RentalPrice;
set => m_RentalPrice = value;
}
public int RentalPrice { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool LandlordRenew
{
get => m_LandlordRenew;
set => m_LandlordRenew = value;
}
public bool LandlordRenew { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool RenterRenew
{
get => m_RenterRenew;
set => m_RenterRenew = value;
}
public bool RenterRenew { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public bool Renew => LandlordRenew && RenterRenew && House != null && House.DecayType != DecayType.Condemned;
[CommandProperty( AccessLevel.GameMaster )]
public int RenewalPrice
{
get => m_RenewalPrice;
set => m_RenewalPrice = value;
}
public int RenewalPrice { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public int RentalGold
{
get => m_RentalGold;
set => m_RentalGold = value;
}
public int RentalGold { get; set; }
[CommandProperty( AccessLevel.GameMaster )]
public DateTime RentalExpireTime => m_RentalExpireTime;
public DateTime RentalExpireTime { get; private set; }
public override bool IsOwner( Mobile m )
{
@ -340,16 +309,16 @@ namespace Server.Mobiles
writer.WriteEncodedInt( 0 ); // version
writer.WriteEncodedInt( m_RentalDuration.ID );
writer.WriteEncodedInt( RentalDuration.ID );
writer.Write( (int) m_RentalPrice );
writer.Write( (bool) m_LandlordRenew );
writer.Write( (bool) m_RenterRenew );
writer.Write( (int) m_RenewalPrice );
writer.Write( (int) RentalPrice );
writer.Write( (bool) LandlordRenew );
writer.Write( (bool) RenterRenew );
writer.Write( (int) RenewalPrice );
writer.Write( (int) m_RentalGold );
writer.Write( (int) RentalGold );
writer.WriteDeltaTime( (DateTime) m_RentalExpireTime );
writer.WriteDeltaTime( (DateTime) RentalExpireTime );
}
public override void Deserialize( GenericReader reader )
@ -360,20 +329,20 @@ namespace Server.Mobiles
int durationID = reader.ReadEncodedInt();
if ( durationID < VendorRentalDuration.Instances.Length )
m_RentalDuration = VendorRentalDuration.Instances[durationID];
RentalDuration = VendorRentalDuration.Instances[durationID];
else
m_RentalDuration = VendorRentalDuration.Instances[0];
RentalDuration = VendorRentalDuration.Instances[0];
m_RentalPrice = reader.ReadInt();
m_LandlordRenew = reader.ReadBool();
m_RenterRenew = reader.ReadBool();
m_RenewalPrice = reader.ReadInt();
RentalPrice = reader.ReadInt();
LandlordRenew = reader.ReadBool();
RenterRenew = reader.ReadBool();
RenewalPrice = reader.ReadInt();
m_RentalGold = reader.ReadInt();
RentalGold = reader.ReadInt();
m_RentalExpireTime = reader.ReadDeltaTime();
RentalExpireTime = reader.ReadDeltaTime();
TimeSpan delay = m_RentalExpireTime - DateTime.UtcNow;
TimeSpan delay = RentalExpireTime - DateTime.UtcNow;
m_RentalExpireTimer = new RentalExpireTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
m_RentalExpireTimer.Start();
}
@ -400,7 +369,7 @@ namespace Server.Mobiles
m_Vendor.RentalPrice = renewalPrice;
m_Vendor.m_RentalExpireTime = DateTime.UtcNow + m_Vendor.RentalDuration.Duration;
m_Vendor.RentalExpireTime = DateTime.UtcNow + m_Vendor.RentalDuration.Duration;
}
else
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBChainmailArmor: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBChainmailArmor()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBHelmetArmor: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBHelmetArmor()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBLeatherArmor: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBLeatherArmor()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBMetalShields : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBMetalShields()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBPlateArmor: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBPlateArmor()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBRingmailArmor: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBRingmailArmor()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBStuddedArmor: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBStuddedArmor()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBWoodenShields: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBWoodenShields()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBAlchemist : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBAlchemist()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -4,15 +4,13 @@ namespace Server.Mobiles
{
public class SBAnimalTrainer : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBAnimalTrainer()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBArchitect : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBArchitect()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBBaker : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBaker()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBBanker : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBanker()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBBard: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBard()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBBarkeeper : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBarkeeper()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBBeekeeper : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBeekeeper()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBBlacksmith : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBlacksmith()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBBowyer : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBBowyer()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBButcher : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBButcher()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBCarpenter: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBCarpenter()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBCobbler : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBCobbler()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBCook : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBCook()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBFarmer : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBFarmer()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBFisherman : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBFisherman()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBFortuneTeller : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBFortuneTeller()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBFurtrader : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBFurtrader()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBGlassblower : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBGlassblower()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBHairStylist : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBHairStylist()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBHealer : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBHealer()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBHerbalist : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBHerbalist()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -6,15 +6,13 @@ namespace Server.Mobiles
{
public class SBHolyMage : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBHolyMage()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBHouseDeed: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBHouseDeed()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBInnKeeper : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBInnKeeper()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBJewel: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBJewel()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBKeeperOfChivalry : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBKeeperOfChivalry()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBLeatherWorker: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBLeatherWorker()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -6,15 +6,13 @@ namespace Server.Mobiles
{
public class SBMage : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBMage()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBMapmaker : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBMapmaker()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBMiller : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBMiller()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBMiner: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBMiner()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBMonk : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBMonk()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBNinja : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBNinja()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBPlayerBarkeeper : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBPlayerBarkeeper()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -6,15 +6,13 @@ namespace Server.Mobiles
{
public class SBProvisioner : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBProvisioner()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -4,15 +4,13 @@ namespace Server.Mobiles
{
public class SBRancher : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBRancher()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBRanger : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBRanger()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBRealEstateBroker : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBRealEstateBroker()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBSECook: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBSECook()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBSEHats: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBSEHats()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBSamurai : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBSamurai()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBScribe: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBScribe()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBShipwright : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBShipwright()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBSmithTools: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBSmithTools()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBStoneCrafter : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBStoneCrafter()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBTailor: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBTailor()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBTanner : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBTanner()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBTavernKeeper : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBTavernKeeper()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBThief : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBThief()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBTinker: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBTinker()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBVagabond : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBVagabond()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -6,15 +6,13 @@ namespace Server.Mobiles
{
public class SBVarietyDealer : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBVarietyDealer()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBVeterinarian : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBVeterinarian()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBWaiter : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBWaiter()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

View file

@ -5,15 +5,13 @@ namespace Server.Mobiles
{
public class SBWeaponSmith: SBInfo
{
private List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public SBWeaponSmith()
{
}
public override IShopSellInfo SellInfo => m_SellInfo;
public override List<GenericBuyInfo> BuyInfo => m_BuyInfo;
public override IShopSellInfo SellInfo { get; } = new InternalSellInfo();
public override List<GenericBuyInfo> BuyInfo { get; } = new InternalBuyInfo();
public class InternalBuyInfo : List<GenericBuyInfo>
{

Some files were not shown because too many files have changed in this diff Show more