Exemple #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="Words"></param>
        /// <param name="Text"></param>
        /// <param name="Data"></param>
        /// <returns></returns>
        protected static ChatCommandSpellPower ParseSpellPower(string[] Words, string Text, DataController Data)
        {
            ChatCommandSpellPower command = null;

            if (Words == null || Words.Length < 2)
            {
                return(command);
            }

            string text = String.Join(DELIMITER.ToString(), Words, 1, Words.Length - 1);

            if (text != null)
            {
                text = text.Trim();
            }

            switch (text)
            {
            case ON:
                command = new ChatCommandSpellPower(true);
                break;

            case OFF:
                command = new ChatCommandSpellPower(false);
                break;
            }

            return(command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="Words"></param>
        /// <param name="Text"></param>
        /// <param name="Data"></param>
        /// <returns></returns>
        protected static ChatCommandSpellPower ParseSpellPower(string[] Words, string Text, DataController Data)
        {
           ChatCommandSpellPower command = null;

           if (Words == null || Words.Length < 2)
              return command;

           string text = String.Join(DELIMITER.ToString(), Words, 1, Words.Length - 1);

           if (text != null)
              text = text.Trim();

           switch (text)
           {
              case ON:
                 command = new ChatCommandSpellPower(true);
                 break;

              case OFF:
                 command = new ChatCommandSpellPower(false);
                 break;
           }

           return command;
        }