Exemplo n.º 1
0
 def showItemTooltip(self, cmd):
     itemType = cmd.type
     itemId = getCDFromId(itemType=cmd.type, itemId=cmd.id)
     itemsCount = cmd.count
     rawItem = ItemPackEntry(type=itemType, id=itemId, count=itemsCount)
     item = lookupItem(rawItem, self.itemsCache, self.goodiesCache)
     showItemTooltip(self.__getTooltipMgr(), rawItem, item)
Exemplo n.º 2
0
 def showItemTooltip(self, cmd):
     itemType = cmd.type
     if itemType == ItemPackType.CREW_BOOK:
         itemId = makeIntCompactDescrByID('crewBook', CrewBookCacheType.CREW_BOOK, cmd.id)
     else:
         itemId = getCDFromId(itemType=cmd.type, itemId=cmd.id)
     rawItem = ItemPackEntry(type=itemType, id=itemId, count=cmd.count or 1, extra=cmd.extra or {})
     item = lookupItem(rawItem, self.itemsCache, self.goodiesCache)
     showItemTooltip(self.__getTooltipMgr(), rawItem, item)
Exemplo n.º 3
0
 def __getItemData(self, itemType, itemId):
     rawItem = ItemPackEntry(type=itemType, id=itemId)
     if itemType in ItemPackTypeGroup.CUSTOMIZATION:
         return self.__getCustomization(rawItem, itemId)
     elif itemType == ItemPackType.DEMOUNT_KIT:
         return self.__getDemountKit(itemId)
     item = lookupItem(rawItem, self.__itemsCache, self.__goodiesCache)
     if item is None:
         _logger.warning("Award '%r' not supported", itemType)
         return ('', '')
     else:
         return (item.icon, item.userName)
Exemplo n.º 4
0
    def showTooltip(self, intCD, itemType):
        toolTipMgr = self.__appLoader.getApp().getToolTipMgr()
        try:
            try:
                itemId = int(intCD)
            except ValueError:
                itemId = None

            rawItem = [
                item for item in self.__items
                if item.id == itemId and item.type == itemType
            ][0]
            item = lookupItem(rawItem, self.__itemsCache, self.__goodiesCache)
            showItemTooltip(toolTipMgr, rawItem, item)
        except IndexError:
            return

        return
Exemplo n.º 5
0
 def showTooltip(self, intCD, itemType):
     toolTipMgr = self.appLoader.getApp().getToolTipMgr()
     itemId = int(intCD)
     rawItem = [ item for item in self.__rawItems if item.id == itemId and item.type == itemType ][0]
     item = lookupItem(rawItem, self.itemsCache, self.goodiesCache)
     showItemTooltip(toolTipMgr, rawItem, item)