summaryrefslogtreecommitdiff
path: root/DSACore/Models
diff options
context:
space:
mode:
authorTrueDoctor <d-kobert@web.de>2018-09-30 02:06:02 +0200
committerTrueDoctor <d-kobert@web.de>2018-09-30 02:06:02 +0200
commit560f454c9beb2f691730b126fc6b3e23d68d6681 (patch)
tree944ac498da2d3d231ef928769c55bf29a39070d0 /DSACore/Models
parent7db0e121521733273a8ca3977e91e6f88756f38a (diff)
added mot of the database infrastructure
Diffstat (limited to 'DSACore/Models')
-rw-r--r--DSACore/Models/Database/GeneralSpell.cs11
-rw-r--r--DSACore/Models/Database/Roll.cs12
-rw-r--r--DSACore/Models/Database/Talent.cs8
-rw-r--r--DSACore/Models/Network/User.cs1
4 files changed, 18 insertions, 14 deletions
diff --git a/DSACore/Models/Database/GeneralSpell.cs b/DSACore/Models/Database/GeneralSpell.cs
index 807a09b..6a6e94c 100644
--- a/DSACore/Models/Database/GeneralSpell.cs
+++ b/DSACore/Models/Database/GeneralSpell.cs
@@ -7,6 +7,15 @@ namespace DSACore.Models.Database
{
public class GeneralSpell : Talent
{
- public string Comlexity = "A";
+ public char Comlexity = 'A';
+
+ public GeneralSpell(string name, string roll, char comlexity = 'A') :base(name, roll)
+ {
+ Comlexity = comlexity;
+ }
+
+ public GeneralSpell(string name, string roll) : base(name, roll)
+ {
+ }
}
}
diff --git a/DSACore/Models/Database/Roll.cs b/DSACore/Models/Database/Roll.cs
deleted file mode 100644
index 547fde4..0000000
--- a/DSACore/Models/Database/Roll.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading.Tasks;
-
-namespace DSACore.Models.Database
-{
- public class Roll
- {
- public string[] Skills { get; set; } = new string[3];
- }
-}
diff --git a/DSACore/Models/Database/Talent.cs b/DSACore/Models/Database/Talent.cs
index 6bd8cba..117d0f7 100644
--- a/DSACore/Models/Database/Talent.cs
+++ b/DSACore/Models/Database/Talent.cs
@@ -7,8 +7,14 @@ namespace DSACore.Models.Database
{
public class Talent
{
+ public Talent(string name, String roll)
+ {
+ Name = name ?? throw new ArgumentNullException(nameof(name));
+ Roll = roll.Split('/');
+ }
+
public string Name { get; set; }
- public Roll Roll { get; set; } = new Roll();
+ public string[] Roll { get; set; } = new string[3];
}
}
diff --git a/DSACore/Models/Network/User.cs b/DSACore/Models/Network/User.cs
index b207a19..04ef0a9 100644
--- a/DSACore/Models/Network/User.cs
+++ b/DSACore/Models/Network/User.cs
@@ -9,5 +9,6 @@ namespace DSACore.Models.Network
{
public string Name { get; set; }
public string ConnectionId { get; set; }
+ public int Char { get; set; }
}
}