def Refresh(self): net.SendRefreshOfflineShop() 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.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 AcceptInputPrice(self): if (not self.priceInputBoard): return True text = self.priceInputBoard.GetText() if (not text): return True if (not text.isdigit()): return True if (int(text) <= 0): return True pos = self.priceInputBoard.pos price = int(self.priceInputBoard.GetText()) net.SendChangePriceOfflineShopItem(pos, price) net.SendRefreshOfflineShop() self.priceInputBoard = None return True