summaryrefslogtreecommitdiff
path: root/DSACore/Models/Network/Command.cs
blob: dcfc692880f2d0855ce3bbac6f6795c62ade9693 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DSACore.Models.Network
{
    public class Command
    {
        public ulong GroupId { get; set; } = 0;
        public ulong CharId { get; set; } 
        public string Name { get; set; }
        public string CmdIdentifier { get; set; }
        public List<string> CmdTexts { get; set; }
        public string CmdText => CmdTexts.Count != 0 ? CmdTexts.First() : "";

        public int Cmdmodifier => CmdTexts.Count!=0&&int.TryParse(CmdTexts.Last(),out int mod)?mod:0;
        public bool IsDm { get; set; } = false;
    }
}