Exemplo n.º 1
0
 public bool Search(string str)
 {
     if (LifeType.ToString().Contains(str) || NPCID.Value.ToString().Contains(str) || NPCIDType.ToString().Contains(str) ||
         Range.ToString().Contains(str) || Life.ToString().Contains(str) || PathID.ToString().Contains(str) ||
         PathIDType.ToString().Contains(str) || NPCNum.ToString().Contains(str) || NPCNumType.ToString().Contains(str))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
        public Property AddLife(LifeType type, Direction direction, string value = null, string initial = null, string limit = null, string warning = null)
        {
            Property item = new Property("ToolLife", (string[])null, null)
            {
                Value = value
            };

            item.AddAttribute(new Property.Attribute("type", type.ToString()));
            item.AddAttribute(new Property.Attribute("countDirection", direction.ToString()));
            if (initial != null)
            {
                item.AddAttribute(new Property.Attribute("initial", initial));
            }
            if (limit != null)
            {
                item.AddAttribute(new Property.Attribute("limit", limit));
            }
            if (warning != null)
            {
                item.AddAttribute(new Property.Attribute("warning", warning));
            }
            this.mProperties.Add(item);
            return(item);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Add the tool life
        /// </summary>
        /// <param name="type">MINUTES, PART_COUNT, or WEAR</param>
        /// <param name="direction">UP or DOWN</param>
        /// <param name="value">The current value</param>
        /// <param name="initial">The initial value for the range</param>
        /// <param name="limit">The limit</param>
        /// <param name="warning">A point where there will be a warning</param>
        /// <returns>The life property</returns>
        public Property AddLife(LifeType type, Direction direction, string value = null,
                                string initial = null,
                                string limit   = null, string warning = null)
        {
            Property life = new Property("ToolLife");

            life.Value = value;
            life.AddAttribute(new Property.Attribute("type", type.ToString()));
            life.AddAttribute(new Property.Attribute("countDirection", direction.ToString()));
            if (initial != null)
            {
                life.AddAttribute(new Property.Attribute("initial", initial));
            }
            if (limit != null)
            {
                life.AddAttribute(new Property.Attribute("limit", limit));
            }
            if (warning != null)
            {
                life.AddAttribute(new Property.Attribute("warning", warning));
            }
            mProperties.Add(life);
            return(life);
        }
Exemplo n.º 4
0
 public Property AddLife(LifeType type, Direction direction, string value = null,
     string initial = null,
     string limit = null, string warning = null)
 {
     Property life = new Property("ItemLife");
     life.Value = value;
     life.AddAttribute(new Property.Attribute("type", type.ToString()));
     life.AddAttribute(new Property.Attribute("countDirection", direction.ToString()));
     if (initial != null)
         life.AddAttribute(new Property.Attribute("initial", initial));
     if (limit != null)
         life.AddAttribute(new Property.Attribute("limit", limit));
     if (warning != null)
         life.AddAttribute(new Property.Attribute("warning", warning));
     mProperties.Add(life);
     return life;
 }