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())
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()
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())
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()
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())
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())
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())
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())
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())
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())
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())