From 7b5e8b573302ba7896be7227aeac9a787685963b Mon Sep 17 00:00:00 2001 From: TrueDoctor Date: Thu, 27 Sep 2018 02:09:32 +0200 Subject: set modifier value --- DSACore/Models/Command.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'DSACore/Models/Command.cs') diff --git a/DSACore/Models/Command.cs b/DSACore/Models/Command.cs index a1bd0b2..72c2a4c 100644 --- a/DSACore/Models/Command.cs +++ b/DSACore/Models/Command.cs @@ -14,7 +14,7 @@ namespace DSACore.Models public List CmdTexts { get; set; } public string CmdText => CmdTexts.Count != 0 ? CmdTexts.First() : ""; - public int Cmdmodifier { get; set; } = 0; + public int Cmdmodifier => CmdTexts.Count!=0&&int.TryParse(CmdTexts.Last(),out int mod)?mod:0; public bool IsDm { get; set; } = false; } } -- cgit v1.2.3-54-g00ecf