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