def __makeClanInfo(self):
     enemyClanDBID = g_clanCache.clanDBID
     tID = 'clanInfo%d' % enemyClanDBID
     self.__imageID = yield g_clanCache.getClanEmblemTextureID(
         enemyClanDBID, True, tID)
     creationDate = BigWorld.wg_getLongDateFormat(self.fortCtrl.getFort(
     ).getFortDossier().getGlobalStats().getCreationTime())
     clanTag = g_clanCache.clanTag
     clanTagLocal = i18n.makeString(
         FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_CLANTAG, clanTag=clanTag)
     clanTag = text_styles.highTitle(clanTagLocal)
     creationDateLocalize = i18n.makeString(
         FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_CREATIONDATE,
         creationDate=creationDate)
     creationDate = text_styles.neutral(creationDateLocalize)
     buildingsCount = len(self.fortCtrl.getFort().getBuildingsCompleted())
     buildingsCount = text_styles.neutral(buildingsCount)
     buildingsCountLocalize = i18n.makeString(
         FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_BUILDINGSCOUNT,
         buildingsCount=str(buildingsCount))
     buildingsCountLocalize = text_styles.standard(buildingsCountLocalize)
     FortSettingsClanInfoVO = {
         'clanTag': clanTag,
         'clanIcon': self.__imageID,
         'creationDate': creationDate,
         'buildingCount': buildingsCountLocalize
     }
     self.as_setFortClanInfoS(FortSettingsClanInfoVO)
예제 #2
0
 def __requestClanEmblem(self):
     if self.__item is not None:
         clanID = self.__item.getClanDBID()
         textureID = 'clanDescription%d' % clanID
         self.__clanEmblem = yield g_clanCache.getClanEmblemTextureID(clanID, False, textureID)
         self.__makeData()
     return
 def __requestClanEmblem(self):
     if self.__item is not None:
         clanID = self.__item.getClanDBID()
         textureID = 'clanDescription%d' % clanID
         self.__clanEmblem = yield g_clanCache.getClanEmblemTextureID(clanID, False, textureID)
         self.__makeData()
     return
 def __makeClanInfo(self):
     enemyClanDBID = g_clanCache.clanDBID
     tID = "clanInfo%d" % enemyClanDBID
     self.__imageID = yield g_clanCache.getClanEmblemTextureID(enemyClanDBID, True, tID)
     creationDate = BigWorld.wg_getLongDateFormat(
         self.fortCtrl.getFort().getFortDossier().getGlobalStats().getCreationTime()
     )
     clanTag = g_clanCache.clanTag
     clanTagLocal = i18n.makeString(FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_CLANTAG, clanTag=clanTag)
     clanTag = text_styles.highTitle(clanTagLocal)
     creationDateLocalize = i18n.makeString(
         FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_CREATIONDATE, creationDate=creationDate
     )
     creationDate = text_styles.neutral(creationDateLocalize)
     buildingsCount = len(self.fortCtrl.getFort().getBuildingsCompleted())
     buildingsCount = text_styles.neutral(buildingsCount)
     buildingsCountLocalize = i18n.makeString(
         FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_BUILDINGSCOUNT, buildingsCount=str(buildingsCount)
     )
     buildingsCountLocalize = text_styles.standard(buildingsCountLocalize)
     FortSettingsClanInfoVO = {
         "clanTag": clanTag,
         "clanIcon": self.__imageID,
         "creationDate": creationDate,
         "buildingCount": buildingsCountLocalize,
     }
     self.as_setFortClanInfoS(FortSettingsClanInfoVO)
예제 #5
0
 def __requestEnemyClanEmblem(self):
     if self.__battle is not None:
         enemyClanDBID, _, _ = self.__battle.getOpponentClanInfo()
         enemyClanEmblemID = "clanInfo%d" % enemyClanDBID
         enemyClanEmblem = yield g_clanCache.getClanEmblemTextureID(enemyClanDBID, False, enemyClanEmblemID)
         if self._isDAAPIInited():
             self.as_setEnemyClanIconS(enemyClanEmblem)
예제 #6
0
 def __requestEnemyClanEmblem(self):
     if self.__battle is not None:
         enemyClanDBID, _, _ = self.__battle.getOpponentClanInfo()
         enemyClanEmblemID = 'clanInfo%d' % enemyClanDBID
         enemyClanEmblem = yield g_clanCache.getClanEmblemTextureID(enemyClanDBID, False, enemyClanEmblemID)
         if self._isDAAPIInited():
             self.as_setEnemyClanIconS(enemyClanEmblem)
 def getClanEmblem(self):
     if 'enemyClanDBID' in self.__data:
         clanEmblem = yield g_clanCache.getClanEmblemTextureID(
             self.__data['enemyClanDBID'], False, str(uuid.uuid4()))
         if not self.isDisposed() and clanEmblem is not None:
             self.as_setClanEmblemS(
                 ' <IMG SRC="img://{0}" width="24" height="24" vspace="-10"/>'
                 .format(clanEmblem))
 def _updateClansInfo(self):
     myEmblem = yield g_clanCache.getClanEmblemID()
     enemyClanDBID = self.__item.getClanDBID()
     textureID = 'clanWar%d' % enemyClanDBID
     enemyEmblem = yield g_clanCache.getClanEmblemTextureID(enemyClanDBID, False, textureID)
     if self.isDisposed():
         return
     myClan = {'id': g_clanCache.clanDBID,
      'name': g_clanCache.clanTag,
      'emblem': myEmblem}
     enemyClan = {'id': enemyClanDBID,
      'name': '[%s]' % self.__item.getClanAbbrev(),
      'emblem': enemyEmblem}
     self.as_setupClansS(myClan, enemyClan)
예제 #9
0
 def _updateClansInfo(self):
     myEmblem = yield g_clanCache.getClanEmblemID()
     enemyClanDBID = self.__item.getClanDBID()
     textureID = 'clanWar%d' % enemyClanDBID
     enemyEmblem = yield g_clanCache.getClanEmblemTextureID(enemyClanDBID, False, textureID)
     if self.isDisposed():
         return
     myClan = {'id': g_clanCache.clanDBID,
      'name': g_clanCache.clanTag,
      'emblem': myEmblem}
     enemyClan = {'id': enemyClanDBID,
      'name': '[%s]' % self.__item.getClanAbbrev(),
      'emblem': enemyEmblem}
     self.as_setupClansS(myClan, enemyClan)
예제 #10
0
 def __updateUserInfo(self):
     dossier = g_itemsCache.items.getAccountDossier(self._userID)
     clanDBID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
     tID = 'clanInfo' + self._userName
     clanEmblem = yield g_clanCache.getClanEmblemTextureID(clanDBID, False, tID)
     if dossier is not None:
         info = getProfileCommonInfo(self._userName, dossier.getDossierDescr(), clanInfo, clanEmblem)
         info['name'] = makeString(PROFILE.PROFILE_TITLE, info['name'])
         info['clanLabel'] = makeString(PROFILE.SECTION_SUMMARY_BOTTOMBAR_CLANSROLELBL)
         info['clanJoinTime'] = info['clanJoinTime']
         registrationDate = makeString(MENU.PROFILE_HEADER_REGISTRATIONDATETITLE) + ' ' + info['registrationDate']
         info['registrationDate'] = registrationDate
         if info['lastBattleDate'] is not None:
             info['lastBattleDate'] = makeString(MENU.PROFILE_HEADER_LASTBATTLEDATETITLE) + ' ' + info['lastBattleDate']
         else:
             info['lastBattleDate'] = ''
         self.as_setUserDataS(info)
예제 #11
0
 def __makeClanInfo(self):
     enemyClanDBID = g_clanCache.clanDBID
     tID = 'clanInfo%d' % enemyClanDBID
     self.__imageID = yield g_clanCache.getClanEmblemTextureID(enemyClanDBID, True, tID)
     creationDate = BigWorld.wg_getLongDateFormat(self.fortCtrl.getFort().getFortDossier().getGlobalStats().getCreationTime())
     clanTag = g_clanCache.clanTag
     clanTagLocal = i18n.makeString(FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_CLANTAG, clanTag=clanTag)
     clanTag = self.app.utilsManager.textManager.getText(TextType.HIGH_TITLE, clanTagLocal)
     creationDateLocalize = i18n.makeString(FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_CREATIONDATE, creationDate=creationDate)
     creationDate = self.app.utilsManager.textManager.getText(TextType.NEUTRAL_TEXT, creationDateLocalize)
     buildingsCount = len(self.fortCtrl.getFort().getBuildingsCompleted())
     buildingsCount = self.app.utilsManager.textManager.getText(TextType.NEUTRAL_TEXT, buildingsCount)
     buildingsCountLocalize = i18n.makeString(FORTIFICATIONS.SETTINGSWINDOW_CLANINFO_BUILDINGSCOUNT, buildingsCount=str(buildingsCount))
     buildingsCountLocalize = self.app.utilsManager.textManager.getText(TextType.STANDARD_TEXT, buildingsCountLocalize)
     FortSettingsClanInfoVO = {'clanTag': clanTag,
      'clanIcon': self.__imageID,
      'creationDate': creationDate,
      'buildingCount': buildingsCountLocalize}
     self.as_setFortClanInfoS(FortSettingsClanInfoVO)
 def getClanEmblem(self):
     if 'enemyClanDBID' in self.__data:
         clanEmblem = yield g_clanCache.getClanEmblemTextureID(self.__data['enemyClanDBID'], False, str(uuid.uuid4()))
         if not self.isDisposed() and clanEmblem is not None:
             self.as_setClanEmblemS(' <IMG SRC="img://{0}" width="24" height="24" vspace="-10"/>'.format(clanEmblem))
     return
예제 #13
0
 def fetch(self, callback):
     self._url = yield g_clanCache.getClanEmblemTextureID(self._formationDBID, False, self._url)
     callback(self._url)
예제 #14
0
 def __setFormationEmblem(self):
     enemyClanDBID = g_clanCache.clanDBID
     tID = 'clanInfo%d' % enemyClanDBID
     imageID = yield g_clanCache.getClanEmblemTextureID(enemyClanDBID, True, tID)
     self.as_setFormationEmblemS(imageID)