コード例 #1
0
ファイル: statsrequester.py プロジェクト: webiumsk/WOT0.9.10
 def __accountDossierResponse(self, responseCode, dossierCompDescr = ''):
     if responseCode < 0:
         LOG_ERROR('Server return error for stat account dossier request: responseCode=%s' % responseCode)
         return
     if self.__callback:
         dossierDescr = dossiers2.getAccountDossierDescr(dossierCompDescr)
         self.__callback(dossierDescr)
コード例 #2
0
ファイル: dossierrequester.py プロジェクト: Infernux/Projects
 def proxyCallback(value):
     if value is not None and len(value) > 1:
         self.__cache['databaseID'] = value[0]
         self.__cache['account'] = dossiers2.getAccountDossierDescr(value[1])
         self.__cache['clan'] = value[2]
         self.__cache['rating'] = value[3]
     callback(self.__cache['account'])
コード例 #3
0
ファイル: triggers.py プロジェクト: webiumsk/WOT-0.9.12-CT
 def __cb_onGetDossier(self, resultID, dossierCompDescr):
     self._gui.hideWaiting('request-battle-count')
     if resultID < RES_SUCCESS:
         LOG_ERROR('Server return error on request dossier', resultID, dossierCompDescr)
         self.isRunning = False
         return
     dossierDescr = dossiers2.getAccountDossierDescr(dossierCompDescr)
     self.toggle(isOn=self.isOn(dossierDescr['a15x15']['battlesCount']))
コード例 #4
0
ファイル: dossierrequester.py プロジェクト: kblw/wot_client
        def proxyCallback(value):
            if value is not None and len(value) > 1:
                self.__cache['databaseID'] = value[0]
                self.__cache['account'] = dossiers2.getAccountDossierDescr(value[1])
                self.__cache['clan'] = value[2]
                self.__cache['rating'] = value[3]
                self.__cache['rated7x7Seasons'] = seasons = {}
                for sID, d in (value[4] or {}).iteritems():
                    seasons[sID] = dossiers2.getRated7x7DossierDescr(d)

            callback(self.__cache['account'])
コード例 #5
0
ファイル: context.py プロジェクト: wotmods/WOTDecompiled
 def __cb_onGetDossier(self, resultID, dossierCD):
     loader, ctx = self._flush()
     if resultID < RES_SUCCESS:
         LOG_ERROR('Server return error on request dossier', resultID, dossierCD)
         loader._clear()
         return
     dossierDescr = dossiers2.getAccountDossierDescr(dossierCD)
     if not dossierDescr['a15x15']['battlesCount']:
         loader._doRun(ctx)
     else:
         ctx.cache.setFinished(True).write()
         loader._clear()
コード例 #6
0
ファイル: context.py プロジェクト: wotmods/WOTDecompiled
 def __cb_onGetDossier(self, resultID, dossierCD):
     loader, ctx = self._flush()
     cache = ctx.cache
     tutorial = loader.tutorial
     if resultID < RES_SUCCESS:
         LOG_ERROR('Server return error on request dossier', resultID, dossierCD)
         loader._clear()
         return
     dossierDescr = dossiers2.getAccountDossierDescr(dossierCD)
     battlesCount = dossierDescr['a15x15']['battlesCount']
     threshold = BigWorld.player().serverSettings.get('newbieBattlesCount', 0)
     if battlesCount < threshold:
         descriptor = tutorial._descriptor
         chapter = descriptor.getChapter(descriptor.getInitialChapterID())
         if chapter is None or not chapter.isBonusReceived(ctx.bonusCompleted):
             loader._doRun(ctx)
         else:
             self._resolveTutorialState(loader, ctx)
     else:
         cache.setPlayerXPLevel(PLAYER_XP_LEVEL.NORMAL)
         self._resolveTutorialState(loader, ctx)
コード例 #7
0
ファイル: dossierrequester.py プロジェクト: kblw/wot_client
 def proxyCallback(dossier):
     self.__cache['account'] = dossiers2.getAccountDossierDescr(dossier)
     callback(self.__cache['account'])
コード例 #8
0
ファイル: __init__.py プロジェクト: krzcho/WOTDecompiled
 def unpack(dossierCD, playerDBID):
     return AccountDossier(dossiers2.getAccountDossierDescr(dossierCD), playerDBID)
コード例 #9
0
ファイル: itemsrequester.py プロジェクト: webiumsk/WOT-0.9.12
 def __getAccountDossierDescr(self):
     """
     @return: account descriptor
     """
     return dossiers2.getAccountDossierDescr(self.stats.accountDossier)
コード例 #10
0
ファイル: __init__.py プロジェクト: v3ss0n/WOTDecompiled
def getAccountDossierDescr(compDescr = ''):
    if compDescr == '':
        return dossiers1.getAccountDossierDescr()
    version = struct.unpack_from('<H', compDescr)[0]
    if version < 64:
        return dossiers1.getAccountDossierDescr(compDescr)
    d2 = dossiers2.getAccountDossierDescr(compDescr)
    d = dossiers1.getAccountDossierDescr()
    d.expand()
    total = d2.expand('total')
    for record in ['creationTime',
     'lastBattleTime',
     'battleLifeTime',
     'treesCut',
     'mileage']:
        d[record] = total[record]

    a15x15 = d2.expand('a15x15')
    for record in ['xp',
     'battlesCount',
     'wins',
     'winAndSurvived',
     'losses',
     'survivedBattles',
     'frags',
     'frags8p',
     'shots',
     'hits',
     'spotted',
     'damageDealt',
     'damageReceived',
     'capturePoints',
     'droppedCapturePoints',
     'xpBefore8_8',
     'battlesCountBefore8_8']:
        d[record] = a15x15[record]

    a15x15_2 = d2.expand('a15x15_2')
    for record in ['originalXP',
     'damageAssistedTrack',
     'damageAssistedRadio',
     'shotsReceived',
     'noDamageShotsReceived',
     'piercedReceived',
     'heHitsReceived',
     'he_hits',
     'pierced']:
        d[record] = a15x15_2[record]

    max15x15 = d2.expand('max15x15')
    for record in ['maxFrags',
     'maxXP',
     'maxXPVehicle',
     'maxFragsVehicle']:
        d[record] = max15x15[record]

    vehTypeFrags = d2.expand('vehTypeFrags')
    vehTypeFrags_copy = {}
    for vehTypeCompDescr, frags in vehTypeFrags.iteritems():
        vehTypeFrags_copy[vehTypeCompDescr] = frags

    d['vehTypeFrags'] = vehTypeFrags_copy
    achievements = d2.expand('achievements')
    for record in ['fragsBeast',
     'sniperSeries',
     'invincibleSeries',
     'diehardSeries',
     'killingSeries',
     'fragsSinai',
     'piercingSeries',
     'warrior',
     'invader',
     'sniper',
     'defender',
     'steelwall',
     'supporter',
     'scout',
     'evileye',
     'medalWittmann',
     'medalOrlik',
     'medalOskin',
     'medalHalonen',
     'medalBurda',
     'medalBillotte',
     'medalKolobanov',
     'medalFadin',
     'medalRadleyWalters',
     'medalBrunoPietro',
     'medalTarczay',
     'medalPascucci',
     'medalDumitru',
     'medalLehvaslaiho',
     'medalNikolas',
     'medalLafayettePool',
     'heroesOfRassenay',
     'tankExpertStrg',
     'raider',
     'kamikaze',
     'lumberjack',
     'medalBrothersInArms',
     'medalCrucialContribution',
     'medalDeLanglade',
     'medalTamadaYoshio',
     'bombardier',
     'huntsman',
     'alaric',
     'sturdy',
     'ironMan',
     'luckyDevil',
     'fragsPatton',
     'mechanicEngineerStrg']:
        d[record] = achievements[record]

    a15x15Cut = d2.expand('a15x15Cut')
    a15x15Cut_copy = {}
    for vehTypeCompDescr, cut in a15x15Cut.iteritems():
        a15x15Cut_copy[vehTypeCompDescr] = cut

    d['a15x15Cut'] = a15x15Cut_copy
    rareAchievements = d2.expand('rareAchievements')
    rareAchievements_copy = []
    for achievement in rareAchievements:
        rareAchievements_copy.append(achievement)

    d['rareAchievements'] = rareAchievements_copy
    return dossiers1.getAccountDossierDescr(d.makeCompDescr())
コード例 #11
0
 def __getAccountDossierDescr(self):
     return dossiers2.getAccountDossierDescr(self.__stats.accountDossier)
コード例 #12
0
 def __getAccountDossierDescr(self):
     """
     @return: account descriptor
     """
     return dossiers2.getAccountDossierDescr(self.stats.accountDossier)
コード例 #13
0
ファイル: __init__.py プロジェクト: kusaku/wot_scripts
 def unpack(dossierCD, playerDBID, seasons, rankedCurrentSeason):
     return AccountDossier(dossiers2.getAccountDossierDescr(dossierCD), playerDBID, seasons, rankedCurrentSeason)
コード例 #14
0
 def unpack(dossierCD, playerDBID, seasons):
     return AccountDossier(dossiers2.getAccountDossierDescr(dossierCD),
                           playerDBID, seasons)
コード例 #15
0
 def proxyCallback(dossier):
     self.__cache['account'] = dossiers2.getAccountDossierDescr(dossier)
     callback(self.__cache['account'])