예제 #1
0
 def openClanStatistic(self):
     if self.lobbyContext.getServerSettings().clanProfile.isEnabled():
         clanID, clanInfo = self.itemsCache.items.getClanInfo(self._userID)
         if clanID != 0:
             clanInfo = ClanInfo(*clanInfo)
             shared_events.showClanProfileWindow(clanID,
                                                 clanInfo.getClanAbbrev())
예제 #2
0
 def onDossierReceived(databaseID, _):
     clanID, clanInfo = self.itemsCache.items.getClanInfo(databaseID)
     if clanID != 0:
         clanInfo = ClanInfo(*clanInfo)
         shared_events.showClanProfileWindow(clanID, clanInfo.getClanAbbrev())
     else:
         DialogsInterface.showI18nInfoDialog('clan_data_not_available', lambda result: None)
예제 #3
0
 def _requestClanInfo(self):
     if self.clansCtrl.isEnabled():
         isShowClanProfileBtnVisible = True
     else:
         isShowClanProfileBtnVisible = self.__isFortClanProfileAvailable()
     clanDBID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
     if clanInfo is not None:
         clanInfo = ClanInfo(*clanInfo)
         clanData = {
             'id':
             clanDBID,
             'header':
             clanInfo.getClanName(),
             'topLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_POST),
             'topValue':
             text_styles.main(getClanRoleString(
                 clanInfo.getMembersFlags())),
             'bottomLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_JOINDATE),
             'bottomValue':
             text_styles.main(
                 BigWorld.wg_getLongDateFormat(clanInfo.getJoiningTime()))
         }
         btnParams = self._getClanBtnParams(isShowClanProfileBtnVisible)
         clanData.update(btnParams)
         self.as_setClanDataS(clanData)
         self.requestClanEmblem32x32(clanDBID)
     return
예제 #4
0
 def _requestClanInfo(self):
     isShowClanProfileBtnVisible = False
     if self.lobbyContext.getServerSettings().clanProfile.isEnabled():
         isShowClanProfileBtnVisible = True
     clanDBID, clanInfo = self.itemsCache.items.getClanInfo(self._userID)
     if clanInfo is not None:
         clanInfo = ClanInfo(*clanInfo)
         clanData = {
             'id':
             clanDBID,
             'header':
             clanInfo.getClanName(),
             'topLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_POST),
             'topValue':
             text_styles.main(getClanRoleString(
                 clanInfo.getMembersFlags())),
             'bottomLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_JOINDATE),
             'bottomValue':
             text_styles.main(
                 backport.getLongDateFormat(clanInfo.getJoiningTime()))
         }
         btnParams = self._getClanBtnParams(isShowClanProfileBtnVisible)
         clanData.update(btnParams)
         self.as_setClanDataS(clanData)
         self.requestClanEmblem32x32(clanDBID)
     return
예제 #5
0
 def _requestClanInfo(self):
     isShowClanProfileBtnVisible = self._databaseID is None and isStartingScriptDone(
     )
     clanDBID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
     if clanInfo is not None:
         clanInfo = ClanInfo(*clanInfo)
         self.as_setClanDataS({
             'id':
             clanDBID,
             'header':
             clanInfo.getClanName(),
             'topLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_POST),
             'topValue':
             text_styles.main(getClanRoleString(
                 clanInfo.getMembersFlags())),
             'bottomLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_JOINDATE),
             'bottomValue':
             text_styles.main(
                 BigWorld.wg_getLongDateFormat(clanInfo.getJoiningTime())),
             'btnLabel':
             _ms(PROFILE.PROFILE_SUMMARY_CLAN_BTNLABEL),
             'btnEnabled':
             True,
             'btnVisible':
             isShowClanProfileBtnVisible
         })
         self.requestClanEmblem32x32(clanDBID)
예제 #6
0
 def onDossierReceived(databaseID, _):
     clanID, clanInfo = g_itemsCache.items.getClanInfo(databaseID)
     if clanID != 0:
         clanInfo = ClanInfo(*clanInfo)
         shared_events.showClanProfileWindow(clanID, clanInfo.getClanAbbrev())
     else:
         from gui import DialogsInterface
         key = 'clan data is not available'
         DialogsInterface.showI18nInfoDialog(key, lambda result: None, I18nInfoDialogMeta(key, messageCtx={'userName': key}))
예제 #7
0
 def onDossierReceived(databaseID, _):
     clanID, clanInfo = g_itemsCache.items.getClanInfo(databaseID)
     if clanID != 0:
         clanInfo = ClanInfo(*clanInfo)
         shared_events.showClanProfileWindow(clanID, clanInfo.getClanAbbrev())
     else:
         from gui import DialogsInterface
         key = 'clan data is not available'
         DialogsInterface.showI18nInfoDialog(key, lambda result: None, I18nInfoDialogMeta(key, messageCtx={'userName': key}))
 def openClanStatistic(self):
     if g_lobbyContext.getServerSettings().clanProfile.isEnabled():
         clanID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
         if clanID != 0:
             clanInfo = ClanInfo(*clanInfo)
             shared_events.showClanProfileWindow(clanID, clanInfo.getClanAbbrev())
     elif self.__isFortClanProfileAvailable():
         self.fireEvent(events.LoadViewEvent(FORTIFICATION_ALIASES.FORT_CLAN_STATISTICS_WINDOW_ALIAS), EVENT_BUS_SCOPE.LOBBY)
     else:
         LOG_ERROR('Fort Clan Profile Statistics is Unavailable for current user profile')
예제 #9
0
 def _requestClanInfo(self):
     isShowClanProfileBtnVisible = self._databaseID is None and isStartingScriptDone()
     clanDBID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
     if clanInfo is not None:
         clanInfo = ClanInfo(*clanInfo)
         self.as_setClanDataS({'id': clanDBID,
          'header': clanInfo.getClanName(),
          'topLabel': _ms(PROFILE.PROFILE_SUMMARY_CLAN_POST),
          'topValue': text_styles.main(getClanRoleString(clanInfo.getMembersFlags())),
          'bottomLabel': _ms(PROFILE.PROFILE_SUMMARY_CLAN_JOINDATE),
          'bottomValue': text_styles.main(BigWorld.wg_getLongDateFormat(clanInfo.getJoiningTime())),
          'btnLabel': _ms(PROFILE.PROFILE_SUMMARY_CLAN_BTNLABEL),
          'btnEnabled': True,
          'btnVisible': isShowClanProfileBtnVisible})
         self.requestClanEmblem32x32(clanDBID)
예제 #10
0
 def openClanStatistic(self):
     if g_lobbyContext.getServerSettings().clanProfile.isEnabled():
         clanID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
         if clanID != 0:
             clanInfo = ClanInfo(*clanInfo)
             shared_events.showClanProfileWindow(clanID,
                                                 clanInfo.getClanAbbrev())
     elif self.__isFortClanProfileAvailable():
         self.fireEvent(
             events.LoadViewEvent(
                 FORTIFICATION_ALIASES.FORT_CLAN_STATISTICS_WINDOW_ALIAS),
             EVENT_BUS_SCOPE.LOBBY)
     else:
         LOG_ERROR(
             'Fort Clan Profile Statistics is Unavailable for current user profile'
         )
예제 #11
0
 def _requestClanInfo(self):
     if self.clansCtrl.isEnabled():
         isShowClanProfileBtnVisible = True
     else:
         isShowClanProfileBtnVisible = self.__isFortClanProfileAvailable()
     clanDBID, clanInfo = g_itemsCache.items.getClanInfo(self._userID)
     if clanInfo is not None:
         clanInfo = ClanInfo(*clanInfo)
         clanData = {'id': clanDBID,
          'header': clanInfo.getClanName(),
          'topLabel': _ms(PROFILE.PROFILE_SUMMARY_CLAN_POST),
          'topValue': text_styles.main(getClanRoleString(clanInfo.getMembersFlags())),
          'bottomLabel': _ms(PROFILE.PROFILE_SUMMARY_CLAN_JOINDATE),
          'bottomValue': text_styles.main(BigWorld.wg_getLongDateFormat(clanInfo.getJoiningTime()))}
         btnParams = self._getClanBtnParams(isShowClanProfileBtnVisible)
         clanData.update(btnParams)
         self.as_setClanDataS(clanData)
         self.requestClanEmblem32x32(clanDBID)
     return