def _showMessage4Item(self, scope, msg, itemCD, msgType = SystemMessages.SM_TYPE.Error, **kwargs): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) raise itemTypeID != _VEHICLE or AssertionError key = scope('item', msg) kwargs.update({'typeString': getTypeInfoByIndex(itemTypeID)['userString'], 'userString': vehicles.getDictDescr(itemCD)['userString']}) SystemMessages.pushMessage(i18n.makeString(key, **kwargs), type=msgType)
def _showMessage(self, scope, msg, itemCD, msgType = SystemMessages.SM_TYPE.Error, **kwargs): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) if itemTypeID == _VEHICLE: key = scope('vehicle', msg) kwargs['userString'] = vehicles.getVehicleType(itemCD).userString else: key = scope('item', msg) kwargs.update({'typeString': getTypeInfoByIndex(itemTypeID)['userString'], 'userString': vehicles.getDictDescr(itemCD)['userString']}) SystemMessages.pushMessage(i18n.makeString(key, **kwargs), type=msgType)
def _getBuyConfirmMeta(self, itemCD, price, conflictedEqs): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) conflictedEqs = self._getConflictedEqsMeta(conflictedEqs).getMessage() ctx = {'credits': BigWorld.wg_getIntegralFormat(price[0]), 'typeString': getTypeInfoByIndex(itemTypeID)['userString'], 'conflictedEqs': conflictedEqs if conflictedEqs else ''} if itemTypeID == _VEHICLE: ctx['userString'] = vehicles.getVehicleType(itemCD).userString else: ctx['userString'] = vehicles.getDictDescr(itemCD)['userString'] return HtmlMessageDialogMeta('html_templates:lobby/dialogs', 'confirmBuyAndInstall', ctx=ctx)
def _getUnlockConfirmMeta(self, itemCD, costCtx): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) ctx = {'xpCost': BigWorld.wg_getIntegralFormat(costCtx['xpCost']), 'freeXP': BigWorld.wg_getIntegralFormat(costCtx['freeXP']), 'typeString': getTypeInfoByIndex(itemTypeID)['userString']} if itemTypeID == _VEHICLE: key = 'confirmUnlockVehicle' ctx['userString'] = vehicles.getVehicleType(itemCD).userString else: key = 'confirmUnlockItem' ctx['userString'] = vehicles.getDictDescr(itemCD)['userString'] return HtmlMessageLocalDialogMeta('html_templates:lobby/dialogs', key, ctx=ctx)
def _getBuyConfirmMeta(self, itemCD, price, conflictedEqs): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) conflictedEqs = self._getConflictedEqsMeta(conflictedEqs).getMessage() ctx = { 'credits': BigWorld.wg_getIntegralFormat(price[0]), 'typeString': getTypeInfoByIndex(itemTypeID)['userString'], 'conflictedEqs': conflictedEqs if conflictedEqs else '' } if itemTypeID == _VEHICLE: ctx['userString'] = vehicles.getVehicleType(itemCD).userString else: ctx['userString'] = vehicles.getDictDescr(itemCD)['userString'] return HtmlMessageDialogMeta('html_templates:lobby/dialogs', 'confirmBuyAndInstall', ctx=ctx)
def _getUnlockConfirmMeta(self, itemCD, costCtx): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) ctx = { 'xpCost': BigWorld.wg_getIntegralFormat(costCtx['xpCost']), 'freeXP': BigWorld.wg_getIntegralFormat(costCtx['freeXP']), 'typeString': getTypeInfoByIndex(itemTypeID)['userString'] } if itemTypeID == _VEHICLE: key = 'confirmUnlockVehicle' ctx['userString'] = vehicles.getVehicleType(itemCD).userString else: key = 'confirmUnlockItem' ctx['userString'] = vehicles.getDictDescr(itemCD)['userString'] return HtmlMessageLocalDialogMeta('html_templates:lobby/dialogs', key, ctx=ctx)
def _showMessage4Item(self, scope, msg, itemCD, msgType=SystemMessages.SM_TYPE.Error, **kwargs): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) raise itemTypeID != _VEHICLE or AssertionError key = scope('item', msg) kwargs.update({ 'typeString': getTypeInfoByIndex(itemTypeID)['userString'], 'userString': vehicles.getDictDescr(itemCD)['userString'] }) SystemMessages.pushMessage(i18n.makeString(key, **kwargs), type=msgType)
def _showMessage(self, scope, msg, itemCD, msgType=SystemMessages.SM_TYPE.Error, **kwargs): itemTypeID, nationID, itemID = vehicles.parseIntCompactDescr(itemCD) if itemTypeID == _VEHICLE: key = scope('vehicle', msg) kwargs['userString'] = vehicles.getVehicleType(itemCD).userString else: key = scope('item', msg) kwargs.update({ 'typeString': getTypeInfoByIndex(itemTypeID)['userString'], 'userString': vehicles.getDictDescr(itemCD)['userString'] }) SystemMessages.pushMessage(i18n.makeString(key, **kwargs), type=msgType)
def getItemFullName(itemTypeIdx, itemDescr): return getTypeInfoByIndex(itemTypeIdx)['userString'] + ' ' + itemDescr['userString']
def getItemFullName(itemTypeIdx, itemDescr): return getTypeInfoByIndex(itemTypeIdx)['userString'] + ' ' + itemDescr.userString