// ------------------------------------------------------------------------------- // SetFilterAllEquipment // ------------------------------------------------------------------------------- public void SetFilterAllEquipment() { equipmentType = null; show_items = false; show_equipment = true; Refresh(); }
// ============================= FILTER FUNCTIONS ================================ // ------------------------------------------------------------------------------- // SetFilterEquipment // ------------------------------------------------------------------------------- public void SetFilterEquipment(string filter) { equipmentType = DictionaryEquipmentSlot.Get(filter); show_equipment = true; show_items = false; Refresh(); }
// ------------------------------------------------------------------------------- // SetFilterAll // ------------------------------------------------------------------------------- public void SetFilterAll() { itemType = ItemType.None; equipmentType = null; show_items = true; show_equipment = true; Refresh(); }
// ------------------------------------------------------------------------------- // GetEquipped // ------------------------------------------------------------------------------- public TemplateEquipment GetEquipped(TemplateMetaEquipmentSlot t, CharacterBase target) { InstanceEquipment tmp = Equipment.FirstOrDefault(x => x.IsEquipped && x.template.equipmentType == t && x.character == target); if (tmp == null) { return(null); } return(tmp.template); }
// ------------------------------------------------------------------------------- // UnEquipType // ------------------------------------------------------------------------------- public void UnEquipType(TemplateMetaEquipmentSlot t) { Equipment.Where(x => x.template.equipmentType == t) .ToList() .ForEach(x => x.character = null); }