예제 #1
0
 private bool onAccountBanned(SessionErrorEvents.AccountBannedEvent evt)
 {
     if (dataEntityCollection.TryGetComponent <RememberMeData>(dataEntityCollection.LocalPlayerHandle, out var component))
     {
         component.OnAccountBanned(evt.Category, evt.ExpirationDate);
     }
     return(false);
 }
예제 #2
0
        private bool onAccountBannedEvent(SessionErrorEvents.AccountBannedEvent evt)
        {
            Service.Get <ICPSwrveService>().Error("error_prompt", "AccountBannedEvent", SceneManager.GetActiveScene().name);
            PromptDefinition promptDefinition = Service.Get <PromptManager>().GetPromptDefinition("ModerationCriticalPrompt");
            PromptLoaderCMD  promptLoaderCMD  = new PromptLoaderCMD(this, promptDefinition, delegate(PromptLoaderCMD loader)
            {
                showAccountBannedPrompt(loader, evt);
            });

            promptLoaderCMD.Execute();
            return(true);
        }
예제 #3
0
        private void showAccountBannedPrompt(PromptLoaderCMD promptLoader, SessionErrorEvents.AccountBannedEvent evt)
        {
            showingError = true;
            CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

            if (cPDataEntityCollection.TryGetComponent <DisplayNameData>(cPDataEntityCollection.LocalPlayerHandle, out var component))
            {
                promptLoader.PromptData.SetText(DPrompt.PROMPT_TEXT_TITLE, component.DisplayName, isTranslated: true);
            }
            else
            {
                promptLoader.PromptData.SetText(DPrompt.PROMPT_TEXT_TITLE, "GlobalUI.ErrorMessages.AccountBanned.Title");
            }
            SessionErrorEvents.AccountBannedPromptSetup(promptLoader.PromptData, evt.Category, evt.ExpirationDate);
            Service.Get <PromptManager>().ShowPrompt(promptLoader.PromptData, clearShowingError, promptLoader.Prefab);
            gameStateController.ExitAfterBan();
        }