summaryrefslogtreecommitdiff
path: root/dsa/DSALib/Models/Network/Command.cs
blob: 5a97e88d34978ff6519cb86dd15d43b6acc62e8c (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 DSALib.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;
    }
}