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())
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)
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()
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()
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, _ = 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')
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 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' )
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())
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)
def showClanProfile(self): event_dispatcher.showClanProfileWindow(self.__clanDbID)
def handleOpenClanCard(command, ctx): showClanProfileWindow(command.clan_dbid, command.clan_abbrev)
def clanCardWindow(self, cmd): showClanProfileWindow(cmd.clan_dbid, cmd.clan_abbrev)
def openClanProfile(self): shared_events.showClanProfileWindow(self.__selectedClan.getClanDbID(), self.__selectedClan.getClanAbbrev())
def _openClanCard(command): """ Opens clan card window """ showClanProfileWindow(command.clan_dbid, command.clan_abbrev)
def handleAction(self, model, entityID, action): super(_ShowClanProfileHandler, self).handleAction(model, entityID, action) shared_events.showClanProfileWindow(model.getNotification(self.getNotType(), entityID).getClanID())
def openClanProfile(self): shared_events.showClanProfileWindow( self.__selectedClan.getClanDbID(), self.__selectedClan.getClanAbbrev())