public void DisplayClothe(ref byte offset, ref byte clotheIndex) { AClothe <TModuleType> clothe = this.inventory.Clothes[clotheIndex]; if (GUI.Button(MultiResolutions.Rectangle(0, offset * 0.05f, 0.17f, 0.05f), StuffGUI <TModuleType> .GetEquippedStuffName(clothe))) { this.SelectAndMaybeEquipItem(clothe, clotheIndex); } if (inventory.Clothes[clotheIndex].Selected) { this.SelectThisItem(clotheIndex, ItemExtension.FiltreClothe); } ++clotheIndex; ++offset; }
public void Sell(int itemSelectedIndex, byte itemFiltre) { //this.itemManagerGUI.ResetItemSelected(); if (this.DoesItemExistInInventory(itemSelectedIndex, itemFiltre, "sell")) { if (itemFiltre == ItemExtension.FiltreWeapon) { AWeapon <TModuleType> item = this.inventory.Weapons[itemSelectedIndex]; this.inventory.Gold += item.Price; if (item.Filtre == ItemExtension.FiltreWeapon) { this.Unequip(item); } this.inventory.RemoveItem(item); } else if (itemFiltre == ItemExtension.FiltreClothe) { AClothe <TModuleType> item = this.inventory.Clothes[itemSelectedIndex]; this.inventory.Gold += item.Price; if (item.Filtre == ItemExtension.FiltreWeapon) { this.Unequip(item); } this.inventory.RemoveItem(item); } else if (itemFiltre == ItemExtension.FiltreConsommable) { AItem <TModuleType> item = this.inventory.Consommables[itemSelectedIndex]; this.inventory.Gold += item.Price; this.inventory.RemoveItem(item); } } }
public static string GetClotheCategory(AClothe <TModuleType> clothe) { return(clothe.equipmentQuality.ToString() + " " + clothe.ClotheCategory.ToString().Replace("_", " ")); }