Exemplo n.º 1
0
        public bool Mine()
        {
            if (!Exists())
            {
                return(false);
            }

            var uses = node.getUseSkills();

            return(uses.Count > 0 && Host.UseDoodadSkill(uses.First().id, node));
        }
Exemplo n.º 2
0
 public static Skill GetFirstDoodadSkill(DoodadObject dood)
 {
     if (dood != null)
     {
         return(dood.getUseSkills().FirstOrDefault());
     }
     return(null);
 }
Exemplo n.º 3
0
        private void DebugNearestDoodadClick(Object sender, EventArgs e)
        {
            //find the nearest visible object
            DoodadObject d = GetNearestDoodad();

            foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(d))
            {
                string name  = descriptor.Name;
                object value = descriptor.GetValue(d);
                ArcheBuddyCore.Log(string.Format("Debug({2}) : {0} = {1}", name, value, d.name));
            }

            foreach (Skill k in d.getUseSkills())
            {
                foreach (PropertyDescriptor descriptor in TypeDescriptor.GetProperties(k))
                {
                    string name  = descriptor.Name;
                    object value = descriptor.GetValue(k);
                    ArcheBuddyCore.Log(string.Format("Debug({2}) : Skill({3}) : {0} = {1}", name, value, d.name, k.name));
                }
            }
        }