MosEne

Untitled

Jul 25th, 2025
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. #Find
  2. def SetShopItemBySecondaryCoin(self, slotIndex):
  3.  
  4. #Add
  5. if app.ENABLE_RENEWAL_SHOPEX:
  6. def SetShopItemByShopEx(self, slotIndex, type):
  7. itemVnum = shop.GetItemID(slotIndex)
  8. PriceVnum = shop.GetItemPriceVnum(slotIndex)
  9. if itemVnum == 0 or (PriceVnum == 0 and type == shop.SHOPEX_ITEM):
  10. return
  11. price = shop.GetItemPrice(slotIndex)
  12. self.ClearToolTip()
  13. self.isShopItem = True
  14. metinSlot = []
  15. for i in xrange(player.METIN_SOCKET_MAX_NUM):
  16. metinSlot.append(shop.GetItemMetinSocket(slotIndex, i))
  17. attrSlot = []
  18. for i in xrange(player.ATTRIBUTE_SLOT_MAX_NUM):
  19. attrSlot.append(shop.GetItemAttribute(slotIndex, i))
  20. self.AddItemData(itemVnum, metinSlot, attrSlot)
  21. self.AppendSpace(5)
  22. if type == shop.SHOPEX_ITEM:
  23. self.AddSHOPEXItem(PriceVnum, price)
  24. else:
  25. self.AppendTextLine(localeInfo.TOOLTIP_BUYPRICE % (localeInfo.NumberToShopEXP(price)), self.GetPriceColor(price))
  26.  
  27. def AddSHOPEXItem(self, itemVnum, price):
  28. self.AppendTextLine("Price:")
  29. item.SelectItem(itemVnum)
  30. name = "%s(%dx)" % (item.GetItemName(), price)
  31. self.AutoAppendTextLine(name, self.SPECIAL_TITLE_COLOR)
  32. itemImage = ui.ImageBox()
  33. itemImage.SetParent(self)
  34. itemImage.Show()
  35. itemImage.LoadImage(item.GetIconImageFileName())
  36. itemImage.SetPosition(75, self.toolTipHeight)
  37. self.toolTipHeight += itemImage.GetHeight() - 10
  38. self.childrenList.append(itemImage)
  39. self.ResizeToolTip()
Advertisement
Add Comment
Please, Sign In to add comment