def __getModifiedItemsData(self):
        itemData = {}
        purchaseItems = self.__ctx.mode.getPurchaseItems()
        purchaseItems = ifilter(lambda i: not i.isDismantling and i.group == self.__ctx.season, purchaseItems)
        modifiedOutfit = self.__ctx.mode.getModifiedOutfit()
        originalOutfit = self.__ctx.mode.getOriginalOutfit()
        for pItem in purchaseItems:
            if self.__isNonHistoric and pItem.item.isHistorical():
                continue
            slotId = C11nId(pItem.areaID, pItem.slotType, pItem.regionIdx)
            modifiedSlotData = getSlotDataFromSlot(modifiedOutfit, slotId)
            originalSlotData = getSlotDataFromSlot(originalOutfit, slotId)
            if modifiedSlotData is None or originalSlotData is None or modifiedSlotData.isEqual(originalSlotData):
                continue
            key = (pItem.item.intCD, pItem.isFromInventory)
            if key not in itemData:
                itemData[key] = C11nPopoverItemData(item=pItem.item, isFromInventory=pItem.isFromInventory)
            itemData[key].slotsIds.append(slotId._asdict())

        itemBlocks = sorted(itemData.values(), key=orderKey)
        return itemBlocks
Exemplo n.º 2
0
 def getSlotDataFromBaseOutfit(self, slotId, season=None):
     season = season or self.season
     baseOutfit = self.__baseOutfits[season]
     baseSlotData = shared.getSlotDataFromSlot(baseOutfit, slotId)
     return baseSlotData
Exemplo n.º 3
0
 def getSlotDataFromSlot(self, slotId, season=None):
     season = season or self.season
     slotId = correctSlot(slotId)
     outfit = self._modifiedOutfits[season]
     return shared.getSlotDataFromSlot(outfit, slotId)
Exemplo n.º 4
0
 def isBaseItem(self, slotId, season=None):
     season = season or self.season
     baseSlotData = self.getSlotDataFromBaseOutfit(slotId, season)
     outfit = self._modifiedOutfits[season]
     slotData = shared.getSlotDataFromSlot(outfit, slotId)
     return baseSlotData.intCD == slotData.intCD
Exemplo n.º 5
0
 def getSlotDataFromSlot(self, slotId, season=None):
     season = season or self.season
     outfit = self._modifiedOutfits[season]
     return getSlotDataFromSlot(outfit, slotId)