Пример #1
0
def onAccountShowGUI(ctx):
    global onCenterIsLongDisconnected
    g_lobbyContext.onAccountShowGUI(ctx)
    yield g_itemsCache.update(CACHE_SYNC_REASON.SHOW_GUI)
    g_eventsCache.start()
    yield g_eventsCache.update()
    yield g_settingsCache.update()
    if not g_itemsCache.isSynced():
        return
    eula = EULADispatcher()
    yield eula.processLicense()
    eula.fini()
    g_playerEvents.onGuiCacheSyncCompleted(ctx)
    code = yield AccountValidator().validate()
    if code > 0:
        from gui import DialogsInterface

        DialogsInterface.showDisconnect("#menu:disconnect/codes/%d" % code)
        return
    g_settingsCore.serverSettings.applySettings()
    game_control.g_instance.onAccountShowGUI(g_lobbyContext.getGuiCtx())
    accDossier = g_itemsCache.items.getAccountDossier()
    g_rareAchievesCache.request(accDossier.getBlock("rareAchievements"))
    MusicController.g_musicController.setAccountAttrs(g_itemsCache.items.stats.attributes)
    MusicController.g_musicController.play(MusicController.MUSIC_EVENT_LOBBY)
    MusicController.g_musicController.play(MusicController.AMBIENT_EVENT_LOBBY)
    premium = isPremiumAccount(g_itemsCache.items.stats.attributes)
    if g_hangarSpace.inited:
        g_hangarSpace.refreshSpace(premium)
    else:
        g_hangarSpace.init(premium)
    g_currentVehicle.init()
    g_appLoader.showLobby()
    g_prbLoader.onAccountShowGUI(g_lobbyContext.getGuiCtx())
    g_clanCache.onAccountShowGUI()
    g_clubsCtrl.start()
    SoundGroups.g_instance.enableLobbySounds(True)
    onCenterIsLongDisconnected(True)
    guiModsSendEvent("onAccountShowGUI", ctx)
    Waiting.hide("enter")
Пример #2
0
 def showDisconnectDialog(self, appNS, description):
     if appNS == _SPACE.SF_LOBBY:
         DialogsInterface.showDisconnect(*description)
Пример #3
0
 def __onDisconnected():
     DialogsInterface.showDisconnect()
Пример #4
0
 def showDisconnectDialog(self, appNS, description):
     if appNS == _SPACE.SF_LOBBY:
         DialogsInterface.showDisconnect(*description)
Пример #5
0
 def onKickedFromServer(self, reason, isBan, expiryTime):
     self.__setConnectionStatus(CONNECTION_STATUS.kicked)
     from gui import DialogsInterface
     DialogsInterface.showDisconnect(reason, isBan, expiryTime)
Пример #6
0
 def __onDisconnected():
     DialogsInterface.showDisconnect()
Пример #7
0
 def doAction(self):
     DialogsInterface.showDisconnect(self.__reason, self.__isBan,
                                     self.__expiryTime)
Пример #8
0
 def onKickedFromServer(self, reason, isBan, expiryTime):
     LOG_MX('onKickedFromServer', reason, isBan, expiryTime)
     from gui import DialogsInterface
     DialogsInterface.showDisconnect(reason, isBan, expiryTime)
Пример #9
0
 def doAction(self):
     DialogsInterface.showDisconnect(self.__reason, self.__kickReasonType,
                                     self.__expiryTime)