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