Esempio n. 1
0
 def isInCollection(self):
     toyCollection = self._itemsCache.items.festivity.getToyCollection()
     toyID = self.getID()
     bytePos = YEARS_INFO.getToyCollectionOffsetForYear(self.COLLECTION_NAME) + toyID / 8
     mask = 1 << toyID % 8
     return True if toyCollection[bytePos] & mask else False
Esempio n. 2
0
def getToyMask(toyID, year):
    offset = YEARS_INFO.getToyCollectionOffsetForYear(year)
    bytePos = offset + toyID / 8
    mask = 1 << toyID % 8
    return (bytePos, mask)