Esempio n. 1
0
 def _formatRentPriceIcon(cls, item, useBigIco, forNormalCard=False):
     if hasattr(item, 'minRentPrice'):
         rentPrice = item.minRentPrice.toDict()
         if rentPrice[Currency.GOLD]:
             if forNormalCard:
                 return formatGoldPriceNormalCard(rentPrice[Currency.GOLD])
             if useBigIco:
                 return formatGoldPriceBig(rentPrice[Currency.GOLD])
             return formatGoldPrice(rentPrice[Currency.GOLD])
         if rentPrice[Currency.CREDITS]:
             if forNormalCard:
                 return formatCreditPriceNormalCard(rentPrice[Currency.CREDITS])
             if useBigIco:
                 return formatCreditPriceBig(rentPrice[Currency.CREDITS])
             return formatCreditPrice(rentPrice[Currency.CREDITS])
Esempio n. 2
0
 def _formatPriceIcon(cls, item, useBigIco, forNormalCard=False):
     if hasattr(item, 'buyPrices'):
         sellGold = item.buyPrices.itemPrice.price.gold
         sellCredits = item.buyPrices.itemPrice.price.credits
         if sellGold:
             if forNormalCard:
                 return formatGoldPriceNormalCard(sellGold)
             if useBigIco:
                 return formatGoldPriceBig(sellGold)
             return formatGoldPrice(sellGold)
         if sellCredits:
             if forNormalCard:
                 return formatCreditPriceNormalCard(sellCredits)
             if useBigIco:
                 return formatCreditPriceBig(sellCredits)
             return formatCreditPrice(sellCredits)