Пример #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 openClanStatistic(self):
     if self.clansCtrl.isEnabled():
         clan = self.clansCtrl.getAccountProfile()
         shared_events.showClanProfileWindow(clan.getClanDbID(), clan.getClanAbbrev())
     else:
         self.fireEvent(events.LoadViewEvent(FORTIFICATION_ALIASES.FORT_CLAN_STATISTICS_WINDOW_ALIAS), EVENT_BUS_SCOPE.LOBBY)
     self.destroy()
Пример #4
0
 def openClanStatistic(self):
     if self.clansCtrl.isEnabled():
         clan = self.clansCtrl.getAccountProfile()
         shared_events.showClanProfileWindow(clan.getClanDbID(), clan.getClanAbbrev())
     else:
         self.fireEvent(events.LoadViewEvent(FORTIFICATION_ALIASES.FORT_CLAN_STATISTICS_WINDOW_ALIAS), EVENT_BUS_SCOPE.LOBBY)
     self.destroy()
Пример #5
0
 def onDossierReceived(databaseID, _):
     clanID, _ = g_itemsCache.items.getClanInfo(databaseID)
     if clanID != 0:
         shared_events.showClanProfileWindow(clanID)
     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):
     isClanFeaturesEnabled = self.lobbyContext.getServerSettings().clanProfile.isEnabled()
     if isClanFeaturesEnabled:
         clan = self.webCtrl.getAccountProfile()
         shared_events.showClanProfileWindow(clan.getClanDbID(), clan.getClanAbbrev())
     else:
         self.fireEvent(events.LoadViewEvent(FORTIFICATION_ALIASES.FORT_CLAN_STATISTICS_WINDOW_ALIAS), EVENT_BUS_SCOPE.LOBBY)
     self.destroy()
Пример #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}))
Пример #8
0
 def openClanStatistic(self):
     if g_lobbyContext.getServerSettings().clanProfile.isEnabled():
         clanID, _ = g_itemsCache.items.getClanInfo(self._userID)
         if clanID != 0:
             shared_events.showClanProfileWindow(clanID)
     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 onClanProfileClick(self):
     if self.clansCtrl.isEnabled():
         clan = g_clanCtrl.getAccountProfile()
         shared_events.showClanProfileWindow(clan.getClanDbID(),
                                             clan.getClanAbbrev())
     else:
         LOG_ERROR(
             "Couldn't invoke Clan Profile Window. Functionality is Unavailable!"
         )
Пример #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 handleAction(self, model, entityID, action):
     super(_ShowClanProfileHandler,
           self).handleAction(model, entityID, action)
     clan = model.getNotification(self.getNotType(), entityID)
     shared_events.showClanProfileWindow(clan.getClanID(),
                                         clan.getClanAbbrev())
Пример #12
0
 def showClanProfile(self):
     event_dispatcher.showClanProfileWindow(self.__clanDbID, self.__clanAbbrev)
 def onClanProfileClick(self):
     if self.clansCtrl.isEnabled():
         clan = g_clanCtrl.getAccountProfile()
         shared_events.showClanProfileWindow(clan.getClanDbID(), clan.getClanAbbrev())
     else:
         LOG_ERROR("Couldn't invoke Clan Profile Window. Functionality is Unavailable!")
 def handleBodyButton(self):
     shared_events.showClanProfileWindow(self.clanDbID, self.clanAbbrev)
Пример #15
0
 def showClanProfile(self):
     event_dispatcher.showClanProfileWindow(self.__clanDbID)
def handleOpenClanCard(command, ctx):
    showClanProfileWindow(command.clan_dbid, command.clan_abbrev)
Пример #17
0
 def clanCardWindow(self, cmd):
     showClanProfileWindow(cmd.clan_dbid, cmd.clan_abbrev)
Пример #18
0
 def openClanProfile(self):
     shared_events.showClanProfileWindow(self.__selectedClan.getClanDbID(), self.__selectedClan.getClanAbbrev())
Пример #19
0
def _openClanCard(command):
    """
    Opens clan card window
    """
    showClanProfileWindow(command.clan_dbid, command.clan_abbrev)
Пример #20
0
 def handleAction(self, model, entityID, action):
     super(_ShowClanProfileHandler, self).handleAction(model, entityID, action)
     shared_events.showClanProfileWindow(model.getNotification(self.getNotType(), entityID).getClanID())
 def handleBodyButton(self):
     shared_events.showClanProfileWindow(self.clanDbID, self.clanAbbrev)
Пример #22
0
 def openClanProfile(self):
     shared_events.showClanProfileWindow(
         self.__selectedClan.getClanDbID(),
         self.__selectedClan.getClanAbbrev())