Пример #1
0
        private void ItemDecideProc(
            int count,
            int sel,
            ShopViewer.ItemListController sender,
            ShopViewer.ItemListController receiver)
        {
            ItemNodeUI node      = sender.itemListUI.GetNode(sel);
            StuffItem  stuffItem = new StuffItem(node.Item);

            stuffItem.Count = count;
            receiver.AddItem(stuffItem, new ShopViewer.ExtraPadding(node.Item, sender));
            if (ShopUI.RemoveItem(count, sel, stuffItem, sender, this._inventoryUI))
            {
                this.SetFocusLevel(sender.itemListUI.FocusLevel);
            }
            bool flag1 = Object.op_Equality((Object)this._inventoryUI.itemListUI, (Object)receiver.itemListUI);

            if (!flag1)
            {
                receiver.itemListUI.Refresh();
            }
            bool flag2 = Object.op_Equality((Object)this._inventoryUI.itemListUI, (Object)sender.itemListUI);

            if (!flag2)
            {
                sender.itemListUI.Refresh();
            }
            if (flag1 || flag2)
            {
                this._inventoryUI.Refresh();
            }
            this._shopInfoPanelUI.Refresh();
            this.SendCheck();
        }
Пример #2
0
        private void ItemDecideProc(
            int count,
            int sel,
            ShopViewer.ItemListController sender,
            ShopViewer.ItemListController receiver)
        {
            ItemNodeUI node = sender.itemListUI.GetNode(sel);

            MerchantData.VendorItem source = node.Item as MerchantData.VendorItem;
            StuffItem stuffItem            = this._shopInfoPanelUI.mode != ShopInfoPanelUI.Mode.Shop ? new StuffItem(node.Item) : (StuffItem) new MerchantData.VendorItem(source);

            stuffItem.Count = count;
            receiver.AddItem(stuffItem, new ShopViewer.ExtraPadding(node.Item, sender));
            if (ShopUI.RemoveItem(count, sel, stuffItem, sender, this._inventoryUI))
            {
                this.SetFocusLevel(sender.itemListUI.FocusLevel);
            }
            bool flag1 = Object.op_Equality((Object)this._inventoryUI.itemListUI, (Object)receiver.itemListUI);

            if (!flag1)
            {
                receiver.itemListUI.Refresh();
            }
            bool flag2 = Object.op_Equality((Object)this._inventoryUI.itemListUI, (Object)sender.itemListUI);

            if (!flag2)
            {
                sender.itemListUI.Refresh();
            }
            if (flag1 || flag2)
            {
                this._inventoryUI.Refresh();
            }
            this._shopInfoPanelUI.Refresh();
            int num = node.Rate * count;

            if (receiver == this._shopSendViewer.controller)
            {
                this._shopRateViewer.rateCounter.x += num;
            }
            else
            {
                if (receiver != this._shopRateViewer.controller)
                {
                    return;
                }
                this._shopRateViewer.rateCounter.y += num;
            }
        }