コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
 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)
コード例 #4
0
 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)
コード例 #5
0
 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)
コード例 #6
0
 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)
コード例 #7
0
 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)
コード例 #8
0
 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)
コード例 #9
0
 def getItemFullName(itemTypeIdx, itemDescr):
     return getTypeInfoByIndex(itemTypeIdx)['userString'] + ' ' + itemDescr['userString']
コード例 #10
0
 def getItemFullName(itemTypeIdx, itemDescr):
     return getTypeInfoByIndex(itemTypeIdx)['userString'] + ' ' + itemDescr.userString