public void updateSubItems(GW2APIComponent.GW2Object obj) { foreach (ItemRecipe ir in requiredItems) { ir.updateItemCount(obj); } }
public void updateItemCount(GW2APIComponent.GW2Object obj) { current = obj.GetComponent <GW2APIComponent.GW2Components.V2.Account.AccountComponent>().getTotalItemCount(itemID); if (obj.GetComponent <GW2APIComponent.GW2Components.V2.Trading.ItemTradeComponent>().isItemTradable(itemID) && (current < totalCount)) { uint tmc = (totalCount - current); GW2APIComponent.GW2Components.V2.Trading.ItemTradePrice trade = obj.GetComponent <GW2APIComponent.GW2Components.V2.Trading.ItemTradeComponent>().getItemPrice(itemID); tpCost.costBuyNow = trade.sells.unitPrice; tpCost.costBuyNowStack = trade.sells.unitPrice * tmc; tpCost.costPlaceOrder = trade.buys.unitPrice; tpCost.costPlaceOrderStack = trade.buys.unitPrice * tmc; hideCost = false; } else { hideCost = true; } updateSubItems(obj); }
/// <summary> /// Updates the view with new information. /// </summary> /// <param name="obj">The object to use to fetch new information.</param> public void update(GW2APIComponent.GW2Object obj) { ir.updateItemCount(obj); update(); }