public bool Mine() { if (!Exists()) { return(false); } var uses = node.getUseSkills(); return(uses.Count > 0 && Host.UseDoodadSkill(uses.First().id, node)); }
public static Skill GetFirstDoodadSkill(DoodadObject dood) { if (dood != null) { return(dood.getUseSkills().FirstOrDefault()); } return(null); }
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)); } } }