Adds assemblies config, fixes crash bugs. (#134)
This commit is contained in:
parent
0140eb73b4
commit
8ec166bcd0
3223 changed files with 191 additions and 191 deletions
|
|
@ -0,0 +1,89 @@
|
|||
namespace Server.Factions
|
||||
{
|
||||
public class FactionDefinition
|
||||
{
|
||||
public FactionDefinition(int sort, int huePrimary, int hueSecondary, int hueJoin, int hueBroadcast, int warHorseBody,
|
||||
int warHorseItem, string friendlyName, string keyword, string abbreviation, TextDefinition name,
|
||||
TextDefinition propName, TextDefinition header, TextDefinition about, TextDefinition cityControl,
|
||||
TextDefinition sigilControl, TextDefinition signupName, TextDefinition factionStoneName,
|
||||
TextDefinition ownerLabel, TextDefinition guardIgnore, TextDefinition guardWarn, TextDefinition guardAttack,
|
||||
StrongholdDefinition stronghold, RankDefinition[] ranks, GuardDefinition[] guards)
|
||||
{
|
||||
Sort = sort;
|
||||
HuePrimary = huePrimary;
|
||||
HueSecondary = hueSecondary;
|
||||
HueJoin = hueJoin;
|
||||
HueBroadcast = hueBroadcast;
|
||||
WarHorseBody = warHorseBody;
|
||||
WarHorseItem = warHorseItem;
|
||||
FriendlyName = friendlyName;
|
||||
Keyword = keyword;
|
||||
Abbreviation = abbreviation;
|
||||
Name = name;
|
||||
PropName = propName;
|
||||
Header = header;
|
||||
About = about;
|
||||
CityControl = cityControl;
|
||||
SigilControl = sigilControl;
|
||||
SignupName = signupName;
|
||||
FactionStoneName = factionStoneName;
|
||||
OwnerLabel = ownerLabel;
|
||||
GuardIgnore = guardIgnore;
|
||||
GuardWarn = guardWarn;
|
||||
GuardAttack = guardAttack;
|
||||
Stronghold = stronghold;
|
||||
Ranks = ranks;
|
||||
Guards = guards;
|
||||
}
|
||||
|
||||
public int Sort { get; }
|
||||
|
||||
public int HuePrimary { get; }
|
||||
|
||||
public int HueSecondary { get; }
|
||||
|
||||
public int HueJoin { get; }
|
||||
|
||||
public int HueBroadcast { get; }
|
||||
|
||||
public int WarHorseBody { get; }
|
||||
|
||||
public int WarHorseItem { get; }
|
||||
|
||||
public string FriendlyName { get; }
|
||||
|
||||
public string Keyword { get; }
|
||||
|
||||
public string Abbreviation { get; }
|
||||
|
||||
public TextDefinition Name { get; }
|
||||
|
||||
public TextDefinition PropName { get; }
|
||||
|
||||
public TextDefinition Header { get; }
|
||||
|
||||
public TextDefinition About { get; }
|
||||
|
||||
public TextDefinition CityControl { get; }
|
||||
|
||||
public TextDefinition SigilControl { get; }
|
||||
|
||||
public TextDefinition SignupName { get; }
|
||||
|
||||
public TextDefinition FactionStoneName { get; }
|
||||
|
||||
public TextDefinition OwnerLabel { get; }
|
||||
|
||||
public TextDefinition GuardIgnore { get; }
|
||||
|
||||
public TextDefinition GuardWarn { get; }
|
||||
|
||||
public TextDefinition GuardAttack { get; }
|
||||
|
||||
public StrongholdDefinition Stronghold { get; }
|
||||
|
||||
public RankDefinition[] Ranks { get; }
|
||||
|
||||
public GuardDefinition[] Guards { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Factions
|
||||
{
|
||||
public class FactionItemDefinition
|
||||
{
|
||||
private static readonly FactionItemDefinition m_MetalArmor = new FactionItemDefinition(1000, typeof(Blacksmith));
|
||||
private static readonly FactionItemDefinition m_Weapon = new FactionItemDefinition(1000, typeof(Blacksmith));
|
||||
private static readonly FactionItemDefinition m_RangedWeapon = new FactionItemDefinition(1000, typeof(Bowyer));
|
||||
private static readonly FactionItemDefinition m_LeatherArmor = new FactionItemDefinition(750, typeof(Tailor));
|
||||
private static readonly FactionItemDefinition m_Clothing = new FactionItemDefinition(200, typeof(Tailor));
|
||||
private static readonly FactionItemDefinition m_Scroll = new FactionItemDefinition(500, typeof(Mage));
|
||||
|
||||
public FactionItemDefinition(int silverCost, Type vendorType)
|
||||
{
|
||||
SilverCost = silverCost;
|
||||
VendorType = vendorType;
|
||||
}
|
||||
|
||||
public int SilverCost { get; }
|
||||
|
||||
public Type VendorType { get; }
|
||||
|
||||
public static FactionItemDefinition Identify(Item item)
|
||||
{
|
||||
if (item is BaseArmor armor)
|
||||
{
|
||||
if (CraftResources.GetType(armor.Resource) == CraftResourceType.Leather)
|
||||
return m_LeatherArmor;
|
||||
|
||||
return m_MetalArmor;
|
||||
}
|
||||
|
||||
if (item is BaseRanged)
|
||||
return m_RangedWeapon;
|
||||
if (item is BaseWeapon)
|
||||
return m_Weapon;
|
||||
if (item is BaseClothing)
|
||||
return m_Clothing;
|
||||
if (item is SpellScroll)
|
||||
return m_Scroll;
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Factions
|
||||
{
|
||||
public class GuardDefinition
|
||||
{
|
||||
public GuardDefinition(Type type, int itemID, int price, int upkeep, int maximum, TextDefinition header,
|
||||
TextDefinition label)
|
||||
{
|
||||
Type = type;
|
||||
|
||||
Price = price;
|
||||
Upkeep = upkeep;
|
||||
Maximum = maximum;
|
||||
ItemID = itemID;
|
||||
|
||||
Header = header;
|
||||
Label = label;
|
||||
}
|
||||
|
||||
public Type Type { get; }
|
||||
|
||||
public int Price { get; }
|
||||
|
||||
public int Upkeep { get; }
|
||||
|
||||
public int Maximum { get; }
|
||||
|
||||
public int ItemID { get; }
|
||||
|
||||
public TextDefinition Header { get; }
|
||||
|
||||
public TextDefinition Label { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
namespace Server.Factions
|
||||
{
|
||||
public class RankDefinition
|
||||
{
|
||||
public RankDefinition(int rank, int required, int maxWearables, TextDefinition title)
|
||||
{
|
||||
Rank = rank;
|
||||
Required = required;
|
||||
Title = title;
|
||||
MaxWearables = maxWearables;
|
||||
}
|
||||
|
||||
public int Rank { get; }
|
||||
|
||||
public int Required { get; }
|
||||
|
||||
public int MaxWearables { get; }
|
||||
|
||||
public TextDefinition Title { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
namespace Server.Factions
|
||||
{
|
||||
public class StrongholdDefinition
|
||||
{
|
||||
public StrongholdDefinition(Rectangle2D[] area, Point3D joinStone, Point3D factionStone, Point3D[] monoliths)
|
||||
{
|
||||
Area = area;
|
||||
JoinStone = joinStone;
|
||||
FactionStone = factionStone;
|
||||
Monoliths = monoliths;
|
||||
}
|
||||
|
||||
public Rectangle2D[] Area { get; }
|
||||
|
||||
public Point3D JoinStone { get; }
|
||||
|
||||
public Point3D FactionStone { get; }
|
||||
|
||||
public Point3D[] Monoliths { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
namespace Server.Factions
|
||||
{
|
||||
public class TownDefinition
|
||||
{
|
||||
public TownDefinition(int sort, int sigilID, string region, string friendlyName, TextDefinition townName,
|
||||
TextDefinition townStoneHeader, TextDefinition strongholdMonolithName, TextDefinition townMonolithName,
|
||||
TextDefinition townStoneName, TextDefinition sigilName, TextDefinition corruptedSigilName, Point3D monolith,
|
||||
Point3D townStone)
|
||||
{
|
||||
Sort = sort;
|
||||
SigilID = sigilID;
|
||||
Region = region;
|
||||
FriendlyName = friendlyName;
|
||||
TownName = townName;
|
||||
TownStoneHeader = townStoneHeader;
|
||||
StrongholdMonolithName = strongholdMonolithName;
|
||||
TownMonolithName = townMonolithName;
|
||||
TownStoneName = townStoneName;
|
||||
SigilName = sigilName;
|
||||
CorruptedSigilName = corruptedSigilName;
|
||||
Monolith = monolith;
|
||||
TownStone = townStone;
|
||||
}
|
||||
|
||||
public int Sort { get; }
|
||||
|
||||
public int SigilID { get; }
|
||||
|
||||
public string Region { get; }
|
||||
|
||||
public string FriendlyName { get; }
|
||||
|
||||
public TextDefinition TownName { get; }
|
||||
|
||||
public TextDefinition TownStoneHeader { get; }
|
||||
|
||||
public TextDefinition StrongholdMonolithName { get; }
|
||||
|
||||
public TextDefinition TownMonolithName { get; }
|
||||
|
||||
public TextDefinition TownStoneName { get; }
|
||||
|
||||
public TextDefinition SigilName { get; }
|
||||
|
||||
public TextDefinition CorruptedSigilName { get; }
|
||||
|
||||
public Point3D Monolith { get; }
|
||||
|
||||
public Point3D TownStone { get; }
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Factions
|
||||
{
|
||||
public class VendorDefinition
|
||||
{
|
||||
public VendorDefinition(Type type, int itemID, int price, int upkeep, int maximum, TextDefinition header,
|
||||
TextDefinition label)
|
||||
{
|
||||
Type = type;
|
||||
|
||||
Price = price;
|
||||
Upkeep = upkeep;
|
||||
Maximum = maximum;
|
||||
ItemID = itemID;
|
||||
|
||||
Header = header;
|
||||
Label = label;
|
||||
}
|
||||
|
||||
public Type Type { get; }
|
||||
|
||||
public int Price { get; }
|
||||
|
||||
public int Upkeep { get; }
|
||||
|
||||
public int Maximum { get; }
|
||||
|
||||
public int ItemID { get; }
|
||||
|
||||
public TextDefinition Header { get; }
|
||||
|
||||
public TextDefinition Label { get; }
|
||||
|
||||
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"))
|
||||
};
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue