Esempio n. 1
0
        public CPlayerSubset(List<string> lstWordSubset)
        {
            this.m_enPlayerSubset = PlayerSubsetType.None;

            if (lstWordSubset.Count == 1)
            { // All, Server
                if (String.Compare(lstWordSubset[0], "all", true) == 0)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.All;
                }
                else if (String.Compare(lstWordSubset[0], "server", true) == 0)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.Server;
                }
            }
            else if (lstWordSubset.Count == 2)
            { // Team, Player
                if (String.Compare(lstWordSubset[0], "team", true) == 0 && int.TryParse(lstWordSubset[1], out this.m_iTeamID) == true)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.Team;
                }
                else if (String.Compare(lstWordSubset[0], "player", true) == 0)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.Player;
                    this.m_strSoldierName = lstWordSubset[1];
                }
            }
            else if (lstWordSubset.Count >= 3)
            { // Squad
                if (String.Compare(lstWordSubset[0], "squad", true) == 0 && int.TryParse(lstWordSubset[1], out this.m_iTeamID) == true && int.TryParse(lstWordSubset[2], out this.m_iSquadID) == true)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.Squad;
                }
            }
        }
Esempio n. 2
0
        public CPlayerSubset(List <string> lstWordSubset)
        {
            this.m_enPlayerSubset = PlayerSubsetType.None;

            if (lstWordSubset.Count == 1)
            { // All, Server
                if (String.Compare(lstWordSubset[0], "all", true) == 0)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.All;
                }
                else if (String.Compare(lstWordSubset[0], "server", true) == 0)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.Server;
                }
            }
            else if (lstWordSubset.Count == 2)
            { // Team, Player
                if (String.Compare(lstWordSubset[0], "team", true) == 0 && int.TryParse(lstWordSubset[1], out this.m_iTeamID) == true)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.Team;
                }
                else if (String.Compare(lstWordSubset[0], "player", true) == 0)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.Player;
                    this.m_strSoldierName = lstWordSubset[1];
                }
            }
            else if (lstWordSubset.Count >= 3)
            { // Squad
                if (String.Compare(lstWordSubset[0], "squad", true) == 0 && int.TryParse(lstWordSubset[1], out this.m_iTeamID) == true && int.TryParse(lstWordSubset[2], out this.m_iSquadID) == true)
                {
                    this.m_enPlayerSubset = PlayerSubsetType.Squad;
                }
            }
        }
Esempio n. 3
0
 public CPlayerSubset(PlayerSubsetType enSubset, int iTeamID, int iSquadID)
 {
     this.m_enPlayerSubset = enSubset;
     this.m_iTeamID = iTeamID;
     this.m_iSquadID = iSquadID;
 }
Esempio n. 4
0
 public CPlayerSubset(PlayerSubsetType enSubset, string strSoldierName)
 {
     this.m_enPlayerSubset = enSubset;
     this.m_strSoldierName = strSoldierName;
 }
Esempio n. 5
0
 public CPlayerSubset(PlayerSubsetType enSubset)
 {
     this.m_enPlayerSubset = enSubset;
 }
Esempio n. 6
0
 public CPlayerSubset(PlayerSubsetType enSubset, int iTeamID, int iSquadID)
 {
     this.m_enPlayerSubset = enSubset;
     this.m_iTeamID        = iTeamID;
     this.m_iSquadID       = iSquadID;
 }
Esempio n. 7
0
 public CPlayerSubset(PlayerSubsetType enSubset, string strSoldierName)
 {
     this.m_enPlayerSubset = enSubset;
     this.m_strSoldierName = strSoldierName;
 }
Esempio n. 8
0
 public CPlayerSubset(PlayerSubsetType enSubset)
 {
     this.m_enPlayerSubset = enSubset;
 }