def __getExchangeRateBonusIco(self, useBigIco=False):
     credit = getEconomicalStatsDict().get('exchangeRate')
     if useBigIco:
         goldIcon = formatGoldPriceBig(1)
         creditsIcon = formatCreditPriceBig(credit)
     else:
         goldIcon = formatGoldPrice(1)
         creditsIcon = formatCreditPrice(credit)
     return i18n.makeString(QUESTS.ACTION_EXCHANGERATE_GOLD2CREDIT,
                            gold=goldIcon,
                            credits=creditsIcon)
Ejemplo n.º 2
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])
Ejemplo n.º 3
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)
Ejemplo n.º 4
0
 def _formatRentPriceIcon(cls, item, useBigIco):
     """Convert price to text with currency icon
     :param item: vehicle, camuflage, etc...
     :param useBigIco: show small or big icon format
     :return: formatted price
     """
     if hasattr(item, 'minRentPrice'):
         rentPrice = item.minRentPrice.toDict()
         if rentPrice[Currency.GOLD]:
             if useBigIco:
                 return formatGoldPriceBig(rentPrice[Currency.GOLD])
             else:
                 return formatGoldPrice(rentPrice[Currency.GOLD])
         if rentPrice[Currency.CREDITS]:
             if useBigIco:
                 return formatCreditPriceBig(rentPrice[Currency.CREDITS])
             else:
                 return formatCreditPrice(rentPrice[Currency.CREDITS])
     return ''
Ejemplo n.º 5
0
 def _formatPriceIcon(cls, item, useBigIco):
     """Convert price to text with currency icon
     :param item: vehicle, camuflage, etc...
     :param useBigIco: show small or big icon format
     :return: formatted price
     """
     if hasattr(item, 'buyPrices'):
         sellGold = item.buyPrices.itemPrice.price.gold
         sellCredits = item.buyPrices.itemPrice.price.credits
         if sellGold:
             if useBigIco:
                 return formatGoldPriceBig(sellGold)
             else:
                 return formatGoldPrice(sellGold)
         if sellCredits:
             if useBigIco:
                 return formatCreditPriceBig(sellCredits)
             else:
                 return formatCreditPrice(sellCredits)
     return ''