def __getPremiumSquadCreditsFactor(results, targetPremiumType, lobbyContext=None): premiumType = PREMIUM_TYPE.activePremium( results.get('premMask', PREMIUM_TYPE.NONE)) if targetPremiumType > premiumType: return lobbyContext.getServerSettings( ).squadPremiumBonus.ownCredits * 100 return 0 if targetPremiumType < premiumType else results.get( 'premSquadCreditsFactor100', 0)
def isPremiumVIP(self): return bool( PREMIUM_TYPE.activePremium(self.__premiumMask) & PREMIUM_TYPE.VIP)
def isPremiumPlus(self): return bool( PREMIUM_TYPE.activePremium(self.__premiumMask) & PREMIUM_TYPE.PLUS)
def activePremiumType(self): return PREMIUM_TYPE.activePremium(self._rawPremiumInfo['premMask'])