diff options
author | TrueDoctor <d-kobert@web.de> | 2018-09-30 02:06:02 +0200 |
---|---|---|
committer | TrueDoctor <d-kobert@web.de> | 2018-09-30 02:06:02 +0200 |
commit | 560f454c9beb2f691730b126fc6b3e23d68d6681 (patch) | |
tree | 944ac498da2d3d231ef928769c55bf29a39070d0 /DSACore/DSA_Game/Dsa.cs | |
parent | 7db0e121521733273a8ca3977e91e6f88756f38a (diff) |
added mot of the database infrastructure
Diffstat (limited to 'DSACore/DSA_Game/Dsa.cs')
-rw-r--r-- | DSACore/DSA_Game/Dsa.cs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/DSACore/DSA_Game/Dsa.cs b/DSACore/DSA_Game/Dsa.cs index d47c5b6..824872c 100644 --- a/DSACore/DSA_Game/Dsa.cs +++ b/DSACore/DSA_Game/Dsa.cs @@ -1,4 +1,5 @@ using System; +using DSACore.FireBase; using DSALib; using DSALib.Characters; using Microsoft.EntityFrameworkCore.Design; @@ -21,6 +22,8 @@ namespace DSACore.DSA_Game public static List<Talent> Talente { get; set; } = new List<Talent>(); + public static List<Zauber> Zauber { get; set; } = new List<Zauber>(); + public static Session Session { get @@ -51,12 +54,27 @@ namespace DSACore.DSA_Game Chars.Add(new Character(filename)); (Chars.Last() as Character)?.Talente.Select(x => new Talent(x.Name, x.Probe, 0)) .Where(c => !Talente.Exists(v => v.Name.Equals(c.Name))).ToList().ForEach(v => Talente.Add(v)); + (Chars.Last() as Character)?.Zauber.Select(x => new Zauber(x.Name, x.Probe, 0, x.Complexity)) + .Where(c => !Zauber.Exists(v => v.Name.Equals(c.Name))).ToList().ForEach(v => Zauber.Add(v)); } Properties.Deserialize(rootPath+"Properties"); Properties.Serialize(rootPath + "Properties"); Talente = Talente.OrderBy(x => x.Name).ToList(); + Zauber = Zauber.OrderBy(x => x.Name).ToList(); + + /*foreach (var talent in Talente) + { + Database.AddTalent(new Models.Database.Talent(talent.Name, talent.Probe)); + } + + foreach (var talent in Zauber) + { + Database.AddSpell(new Models.Database.GeneralSpell(talent.Name, talent.Probe, talent.Complexity)); + }*/ + + Session = new Session { Chars = Chars.Select(x => SaveChar.FromICharacter(x)).ToList() |