public int GetItemTotalPrice(InventoryItemObject item) { if (!IsShopActive()) { //Debug.Log ("shop is not active"); return(item.info.costInfo.timePrice); } Transform slot = item.GetSlot(); if (slot == null) { return(0); } WagonInventoryUI inventory = slot.parent.parent.GetComponent <WagonInventoryUI>(); if (inventory == shopInventory) { return(item.GetBuyPrice()); } else { if (vendorShopInfo.FindInfoByIndex(item.info.databaseIndex) != null) { return(item.GetSellPrice()); } else { //Debug.Log ("vendor is not interested"); return(0); } } }
bool HavePenaltyDurability(InventoryItemObject item) { if (PlayerSaveData.reference.trainData.bonusEquipmentDurability >= 0) return false; if (InventorySystem.reference.GetSlotInfo (item.GetSlot ()).type == InventorySystem.SlotType.Shop) return false; return true; }
bool HavePenaltyDurability(InventoryItemObject item) { if (PlayerSaveData.reference.trainData.bonusEquipmentDurability >= 0) { return(false); } if (InventorySystem.reference.GetSlotInfo(item.GetSlot()).type == InventorySystem.SlotType.Shop) { return(false); } return(true); }
public int GetItemTotalPrice(InventoryItemObject item) { if (!IsShopActive ()) { //Debug.Log ("shop is not active"); return item.info.costInfo.timePrice; } Transform slot = item.GetSlot(); if (slot == null) return 0; WagonInventoryUI inventory = slot.parent.parent.GetComponent<WagonInventoryUI>(); if (inventory == shopInventory) { return item.GetBuyPrice (); } else { if (vendorShopInfo.FindInfoByIndex (item.info.databaseIndex) != null) { return item.GetSellPrice (); } else { //Debug.Log ("vendor is not interested"); return 0; } } }