From b9abcb7ed618f08d7b2614843ab6c4feea5ff573 Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Fri, 22 Jun 2018 15:56:04 +0200 Subject: Character stats do now get updated, when a session is loaded or saved --- DiscoBot/DSA_Game/Characters/SaveChar.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'DiscoBot/DSA_Game/Characters') diff --git a/DiscoBot/DSA_Game/Characters/SaveChar.cs b/DiscoBot/DSA_Game/Characters/SaveChar.cs index 89ca98a..4c9a940 100644 --- a/DiscoBot/DSA_Game/Characters/SaveChar.cs +++ b/DiscoBot/DSA_Game/Characters/SaveChar.cs @@ -6,6 +6,8 @@ using System.Threading.Tasks; namespace DiscoBot.DSA_Game.Characters { + using Discord; + public class SaveChar { public string Name { get; set; } @@ -27,4 +29,16 @@ namespace DiscoBot.DSA_Game.Characters }; } } + + + public static class ICharExtension + { + public static void Update(this ICharacter c, SaveChar s) + { + c.Astralpunkte_Aktuell = s.Astralpunkte_Aktuell; + c.Ausdauer_Aktuell = s.Ausdauer_Aktuell; + c.Lebenspunkte_Aktuell = s.Lebenspunkte_Aktuell; + c.Name = s.Name; + } + } } -- cgit v1.3.1