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

@ -4,78 +4,70 @@ namespace Server.Factions
{
public class VendorDefinition
{
private Type m_Type;
public Type Type { get; }
private int m_Price;
private int m_Upkeep;
private int m_Maximum;
public int Price { get; }
private int m_ItemID;
public int Upkeep { get; }
private TextDefinition m_Header;
private TextDefinition m_Label;
public int Maximum { get; }
public Type Type => m_Type;
public int ItemID { get; }
public int Price => m_Price;
public int Upkeep => m_Upkeep;
public int Maximum => m_Maximum;
public int ItemID => m_ItemID;
public TextDefinition Header { get; }
public TextDefinition Header => m_Header;
public TextDefinition Label => m_Label;
public TextDefinition Label { get; }
public VendorDefinition( Type type, int itemID, int price, int upkeep, int maximum, TextDefinition header, TextDefinition label )
{
m_Type = type;
Type = type;
m_Price = price;
m_Upkeep = upkeep;
m_Maximum = maximum;
m_ItemID = itemID;
Price = price;
Upkeep = upkeep;
Maximum = maximum;
ItemID = itemID;
m_Header = header;
m_Label = label;
Header = header;
Label = label;
}
private static VendorDefinition[] m_Definitions = {
new VendorDefinition( typeof( FactionBottleVendor ), 0xF0E,
5000,
1000,
10,
new TextDefinition( 1011549, "POTION BOTTLE VENDOR" ),
new TextDefinition( 1011544, "Buy Potion Bottle Vendor" )
),
new VendorDefinition( typeof( FactionBoardVendor ), 0x1BD7,
3000,
500,
10,
new TextDefinition( 1011552, "WOOD VENDOR" ),
new TextDefinition( 1011545, "Buy Wooden Board Vendor" )
),
new VendorDefinition( typeof( FactionOreVendor ), 0x19B8,
3000,
500,
10,
new TextDefinition( 1011553, "IRON ORE VENDOR" ),
new TextDefinition( 1011546, "Buy Iron Ore Vendor" )
),
new VendorDefinition( typeof( FactionReagentVendor ), 0xF86,
5000,
1000,
10,
new TextDefinition( 1011554, "REAGENT VENDOR" ),
new TextDefinition( 1011547, "Buy Reagent Vendor" )
),
new VendorDefinition( typeof( FactionHorseVendor ), 0x20DD,
5000,
1000,
1,
new TextDefinition( 1011556, "HORSE BREEDER" ),
new TextDefinition( 1011555, "Buy Horse Breeder" )
)
};
public static VendorDefinition[] Definitions => m_Definitions;
public static VendorDefinition[] Definitions { get; } =
{
new VendorDefinition( typeof( FactionBottleVendor ), 0xF0E,
5000,
1000,
10,
new TextDefinition( 1011549, "POTION BOTTLE VENDOR" ),
new TextDefinition( 1011544, "Buy Potion Bottle Vendor" )
),
new VendorDefinition( typeof( FactionBoardVendor ), 0x1BD7,
3000,
500,
10,
new TextDefinition( 1011552, "WOOD VENDOR" ),
new TextDefinition( 1011545, "Buy Wooden Board Vendor" )
),
new VendorDefinition( typeof( FactionOreVendor ), 0x19B8,
3000,
500,
10,
new TextDefinition( 1011553, "IRON ORE VENDOR" ),
new TextDefinition( 1011546, "Buy Iron Ore Vendor" )
),
new VendorDefinition( typeof( FactionReagentVendor ), 0xF86,
5000,
1000,
10,
new TextDefinition( 1011554, "REAGENT VENDOR" ),
new TextDefinition( 1011547, "Buy Reagent Vendor" )
),
new VendorDefinition( typeof( FactionHorseVendor ), 0x20DD,
5000,
1000,
1,
new TextDefinition( 1011556, "HORSE BREEDER" ),
new TextDefinition( 1011555, "Buy Horse Breeder" )
)
};
}
}