コード例 #1
0
	def Refresh(self):
		for i in xrange(shop.OFFLINE_SHOP_SLOT_COUNT):
			itemCount = shop.GetOfflineShopItemCount(i)
			if (itemCount <= 1):
				itemCount = 0
			self.itemSlotWindow.SetItemSlot(i, shop.GetOfflineShopItemID(i), itemCount)
			
		wndMgr.RefreshSlot(self.itemSlotWindow.GetWindowHandle())
コード例 #2
0
	def Refresh(self):
		for i in xrange(self.UI["slots"].GetSlotCount()):
			vnum=self.GetItemID(i)
			itemCount = self.GetItemCount(i)
			if vnum == 1 or itemCount==0:
				itemCount=0
			self.UI["slots"].SetItemSlot(i, vnum, itemCount)
		wndMgr.RefreshSlot(self.UI["slots"].GetWindowHandle())
		self.UI["slots"].RefreshSlot()
コード例 #3
0
    def Refresh(self):
        getItemID = shop.GetItemID
        getItemCount = shop.GetItemCount
        setItemID = self.itemSlotWindow.SetItemSlot
        for i in xrange(shop.SHOP_SLOT_COUNT):
            idx = self.__GetRealIndex(i)
            itemCount = getItemCount(idx)
            if itemCount <= 1:
                itemCount = 0
            setItemID(i, getItemID(idx), itemCount)

        wndMgr.RefreshSlot(self.itemSlotWindow.GetWindowHandle())
コード例 #4
0
    def Refresh(self):
        self.CancelInputPrice()
        self.__OnClosePopupDialog()
        self.Edit["Board"].Hide()
        setItemID = self.ItemSlot.SetItemSlot
        for i in xrange(shop.SHOP_SLOT_COUNT):
            vnum = self.GetItemID(i)
            itemCount = self.GetItemCount(i)

            setItemID(i, vnum, itemCount)
        wndMgr.RefreshSlot(self.ItemSlot.GetWindowHandle())
        self.ItemSlot.RefreshSlot()
コード例 #5
0
        def RegisterShopSold(self, pos):
            if pos < 0 or not shop.GetItemID(pos):
                return
            item.SelectItem(int(shop.GetItemID(pos)))
            (itemWidth, itemHeight) = item.GetItemSize()

            targetSlot = self.itemSlotList["ItemSlot_%d" % self.GridSize]
            imageName = "d:/ymir work/slot_disabled_%d.tga" % itemHeight

            targetSlot.SetCoverButton(
                pos, imageName, imageName, imageName,
                "d:/ymir work/ui/game/belt_inventory/slot_disabled.tga", False,
                False)
            targetSlot.EnableSlot(pos)
            wndMgr.RefreshSlot(targetSlot.GetWindowHandle())
コード例 #6
0
	def RefreshItemSlot(self):
		for i in xrange(self.GEM_SHOP_SLOT_MAX):
			itemCount = player.GetGemShopItemCount(i)
			itemStatus = player.GetGemShopItemStatus(i)
			itemPrice = player.GetGemShopItemPrice(i)
			if itemCount <= 1:
				itemCount = 0
			
			self.itemSlot.SetItemSlot(i, player.GetGemShopItemVnum(i), itemCount)
			
			self.priceDict["slot_%d_price" % i].SetText(str(itemPrice))
			
			if itemStatus == 1:
				self.itemSlot.DisableSlot(i)
			else:
				self.itemSlot.EnableSlot(i)

		wndMgr.RefreshSlot(self.itemSlot.GetWindowHandle())
コード例 #7
0
    def Refresh(self):
        getItemID = shop.GetItemID
        getItemCount = shop.GetItemCount
        setItemID = self.itemSlotWindow.SetItemSlot
        for i in xrange(shop.SHOP_SLOT_COUNT):
            idx = self.__GetRealIndex(i)
            itemCount = getItemCount(idx)
            if itemCount <= 1:
                itemCount = 0
            setItemID(i, getItemID(idx), itemCount)
            if app.ENABLE_CHANGELOOK_SYSTEM:
                itemTransmutedVnum = shop.GetItemTransmutation(idx)
                if itemTransmutedVnum:
                    self.itemSlotWindow.DisableCoverButton(i)
                else:
                    self.itemSlotWindow.EnableCoverButton(i)

        wndMgr.RefreshSlot(self.itemSlotWindow.GetWindowHandle())
コード例 #8
0
ファイル: uiofflineshop.py プロジェクト: Reizonr1/metin2-adv
    def Refresh(self):
        net.SendRefreshOfflineShop()
        iCount = 0
        for i in xrange(shop.OFFLINE_SHOP_SLOT_COUNT):
            if (shop.GetOfflineShopItemID(i) == -842150451):
                iCount = iCount + 1

        if (iCount == shop.OFFLINE_SHOP_SLOT_COUNT):
            chat.AppendChat(chat.CHAT_TYPE_INFO, "Pazar'da suan birsey yok.")
            return

        for i in xrange(shop.OFFLINE_SHOP_SLOT_COUNT):
            itemCount = shop.GetOfflineShopItemCount(i)
            if (itemCount <= 1):
                itemCount = 0

            self.itemSlot.SetItemSlot(i, shop.GetOfflineShopItemID(i))

        wndMgr.RefreshSlot(self.itemSlot.GetWindowHandle())
コード例 #9
0
	def Refresh(self):
		net.SendRefreshUnsoldItems()
		iCount = 0
		for i in xrange(shop.OFFLINE_SHOP_SLOT_COUNT):
			if (shop.GetOfflineShopItemID(i) == -842150451):
				iCount = iCount + 1
				
		if (iCount == shop.OFFLINE_SHOP_SLOT_COUNT):
			chat.AppendChat(chat.CHAT_TYPE_INFO, "You have nothing in offline shop at the moment.")
			return
			
		for i in xrange(shop.OFFLINE_SHOP_SLOT_COUNT):
			itemCount = shop.GetOfflineShopItemCount(i)
			if (itemCount <= 1):
				itemCount = 0
					
			self.itemSlot.SetItemSlot(i, shop.GetOfflineShopItemID(i))
		
		wndMgr.RefreshSlot(self.itemSlot.GetWindowHandle())
コード例 #10
0
    def RefreshItemSlot(self):
        for i in xrange(15 * 5):
            self.wndItem.ClearSlot(i)

        if not self.chestDrop.has_key(self.currentChest):
            return

        if not self.chestDrop[self.currentChest].has_key(self.currentPage):
            return

        for key, value in self.chestDrop[self.currentChest][
                self.currentPage].iteritems():
            itemVnum = value[0]
            itemCount = value[1]

            if itemCount <= 1:
                itemCount = 0

            self.wndItem.SetItemSlot(key, itemVnum, itemCount)

        wndMgr.RefreshSlot(self.wndItem.GetWindowHandle())
コード例 #11
0
        def Refresh(self):
            getItemID = shop.GetItemID
            getItemCount = shop.GetItemCount
            setItemID = self.itemSlotList["ItemSlot_%d" %
                                          self.GridSize].SetItemSlot
            for i in xrange(self.GridSize):
                itemCount = getItemCount(i)

                if itemCount <= 1:
                    itemCount = 0
                setItemID(i, getItemID(i), itemCount)
                if shop.GetItemIsSold(i) == 1:
                    self.RegisterShopSold(i)
                else:
                    if self.itemSlotList["ItemSlot_%d" %
                                         self.GridSize].HasCoverButton(i):
                        self.itemSlotList["ItemSlot_%d" %
                                          self.GridSize].DeleteCoverButton(i)

            wndMgr.RefreshSlot(
                self.itemSlotList["ItemSlot_%d" %
                                  self.GridSize].GetWindowHandle())