コード例 #1
0
 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);
 }