コード例 #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)
コード例 #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)
コード例 #3
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
コード例 #4
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)