diff options
author | TrueDoctor <d-kobert@web.de> | 2018-10-01 02:28:42 +0200 |
---|---|---|
committer | TrueDoctor <d-kobert@web.de> | 2018-10-01 02:28:42 +0200 |
commit | 6285967d1cf6e9322f584de761eea31ade32b3e5 (patch) | |
tree | 2f2227e85c18011d5122924e56ecde00e2f47ec8 /DSACore/Models/Database/Weapon.cs | |
parent | 560f454c9beb2f691730b126fc6b3e23d68d6681 (diff) |
Completed Weapon import function to automagically load data from an dsa website into the database
Diffstat (limited to 'DSACore/Models/Database/Weapon.cs')
-rw-r--r-- | DSACore/Models/Database/Weapon.cs | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/DSACore/Models/Database/Weapon.cs b/DSACore/Models/Database/Weapon.cs index 9c75b30..b2f8a1e 100644 --- a/DSACore/Models/Database/Weapon.cs +++ b/DSACore/Models/Database/Weapon.cs @@ -7,9 +7,47 @@ namespace DSACore.Models.Database { public class Weapon { + public Weapon() + { + } + + public Weapon(string name, string damage, int weight, string weaponTalent, string price) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Damage = damage ?? throw new ArgumentNullException(nameof(damage)); + Weight = weight; + WeaponTalent = weaponTalent ?? throw new ArgumentNullException(nameof(weaponTalent)); + Price = price; + } + public string Name { get; set; } public string Damage { get; set; } + public int Weight { get; set; } public string WeaponTalent { get; set; } - public string Modifier { get; set; } + public string Price { get; set; } + } + + public class MeleeWeapon : Weapon + { + public string TpKK { get; set; } + public int INI { get; set; } + public string MW { get; set; } + + public MeleeWeapon(string name, string damage, int weight, string weaponTalent, string price) : base(name, damage, weight, weaponTalent, price) + { + } + } + + public class RangedWeapon : Weapon + { + public int AtMod { get; set; } + public int KKMod { get; set; } + public string AtReach { get; set; } + public string TpReach { get; set; } + public int LoadTime { get; set; } + + public RangedWeapon(string name, string damage, int weight, string weaponTalent, string price) : base(name, damage, weight, weaponTalent, price) + { + } } } |