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

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 var mod) ? mod : 0;
        public bool IsDm { get; set; } = false;
    }
}