public void SendMailMessage()
    {
        string prefString  = (isBugReport) ? "_alt_inpJoy" : "_defaults_ax";
        int    currentTime = DarkRef.GetSystemTime();

        int    lastTime = 0;
        string val      = DarkRef.DecryptString(PlayerPrefs.GetString(prefString, ""), 2, true);

        if (val == "dse-1")
        {
            PlayerPrefs.SetString(prefString, DarkRef.EncryptString((currentTime * ((isBugReport) ? 19 : 8)).ToString(), 2));
            StartCoroutine(ClearInputs());
            return;
        }

        if (int.TryParse(val, out lastTime))
        {
            if (!DarkRef.CheckAccess() && Mathf.Abs(currentTime - (lastTime / ((isBugReport) ? 19 : 8))) <= 30)
            {
                StartCoroutine(FadePanelMessage());
                return;
            }
        }
        else if (PlayerPrefs.HasKey(prefString) && PlayerPrefs.GetString(prefString) != "")
        {
            return;
        }

        StartCoroutine(SendMessageRoutine());
        PlayerPrefs.SetString(prefString, DarkRef.EncryptString((currentTime * ((isBugReport) ? 19 : 8)).ToString(), 2));
    }
Esempio n. 2
0
    private void OnGUI()
    {
        encryptInput     = EditorGUILayout.TextField("Encrypt: ", encryptInput);
        encryptIteration = EditorGUILayout.IntSlider("Encrypt Iterations:", encryptIteration, 1, 5);
        if (encryptInput != "")
        {
            EditorGUILayout.TextField("  RESULT:", DarkRef.EncryptString(encryptInput, encryptIteration));
        }

        GUILayout.Space(10f);

        decryptInput     = EditorGUILayout.TextField("Decrypt: ", decryptInput);
        decryptIteration = EditorGUILayout.IntSlider("Decrypt Iterations:", decryptIteration, 1, 5);
        if (decryptInput != "")
        {
            EditorGUILayout.TextField("  RESULT:", DarkRef.DecryptString(decryptInput, decryptIteration));
        }

        if (GUI.changed)
        {
            EditorPrefs.SetString("EncInput", encryptInput);
            EditorPrefs.SetString("DecInput", decryptInput);
            EditorPrefs.SetInt("EncIter", encryptIteration);
            EditorPrefs.SetInt("DecIter", decryptIteration);
        }
    }
Esempio n. 3
0
    void Start()
    {
        if (debugTargetXp)
        {
            string stringAppend = "array(";
            for (int i = 0; i < targetXP.Length; i++)
            {
                stringAppend += "@" + (i + 1).ToString() + "@ => @" + targetXP[i] + "@";

                if (i < targetXP.Length - 1)
                {
                    stringAppend += ", ";
                }
                else
                {
                    stringAppend += ");";
                }
            }

            stringAppend = stringAppend.Replace('@', '"');
            Debug.Log(stringAppend);
        }

        signInLoading.SetActive(false);
        rememberMeCheck.value = (PlayerPrefs.GetInt("RememberMe", 0) == 1);

        if (string.IsNullOrEmpty(defaultName))
        {
            defaultName = "Guest" + UnityEngine.Random.Range(100, 99999);
        }

        tabManager.SelectTab(1);
        profileData.username = defaultName;
        profileData.clan     = defaultClan;

        if (rememberMeCheck.value)
        {
            usernameInput.value = PlayerPrefs.GetString("Username", "");
            passwordInput.value = DarkRef.DecryptString(PlayerPrefs.GetString("Pwd", ""));
            ignoreSound         = ignoreWait = true;
            StartLogin();
        }

        StartCoroutine(UpdateProfileInfo(-1));
    }