Ejemplo n.º 1
0
    internal static void Init()
    {
        StringBuilder sb = new StringBuilder(256);

        if (CenterHubApi.GetConfig("DataStoreFlag", sb, 256))
        {
            string dsflag = sb.ToString();
            s_Instance.m_DataStoreFlag = (int.Parse(dsflag) != 0 ? true : false);
        }

        if (CenterHubApi.GetConfig("GMServerFlag", sb, 256))
        {
            string gsflag = sb.ToString();
            s_Instance.m_GMServerFlag = (int.Parse(gsflag) != 0 ? true : false);
        }

        if (CenterHubApi.GetConfig("Debug", sb, 256))
        {
            string debug = sb.ToString();
            s_Instance.m_Debug = (int.Parse(debug) != 0 ? true : false);

            if (s_Instance.m_Debug)
            {
                GameFramework.GlobalVariables.Instance.IsDebug = true;
            }
        }

        if (CenterHubApi.GetConfig("EnableDirectLogin", sb, 256))
        {
            string val = sb.ToString();
            s_Instance.m_EnableDirectLogin = (int.Parse(val) != 0 ? true : false);
        }

        if (CenterHubApi.GetConfig("UserSaveInterval", sb, 256))
        {
            string saveinterval = sb.ToString();
            int    val          = int.Parse(saveinterval);
            if (s_Instance.m_UserSaveInterval != val)
            {
                s_Instance.m_UserSaveInterval = val;
            }
        }

        if (CenterHubApi.GetConfig("ActivateCodeAvailable", sb, 256))
        {
            string activatecode = sb.ToString();
            s_Instance.m_ActivateCodeAvailable = (int.Parse(activatecode) != 0 ? true : false);
        }

        if (CenterHubApi.GetConfig("StartServerTime", sb, 256))
        {
            string time = sb.ToString();
            s_Instance.m_StartServerTime = time;
        }

        if (CenterHubApi.GetConfig("worldid", sb, 256))
        {
            string worldid = sb.ToString();
            int    val     = int.Parse(worldid);
            if (s_Instance.m_WorldId != val)
            {
                s_Instance.m_WorldId = val;
            }
        }

        if (CenterHubApi.GetConfig("centernum", sb, 256))
        {
            string worldidnum = sb.ToString();
            int    val        = int.Parse(worldidnum);
            if (s_Instance.m_WorldIdNum != val)
            {
                s_Instance.m_WorldIdNum = val;
            }
        }

        if (CenterHubApi.GetConfig("worldid0", sb, 256))
        {
            string worldid = sb.ToString();
            int    val     = int.Parse(worldid);
            if (s_Instance.m_WorldId0 != val)
            {
                s_Instance.m_WorldId0 = val;
            }
        }

        if (CenterHubApi.GetConfig("worldid1", sb, 256))
        {
            string worldid = sb.ToString();
            int    val     = int.Parse(worldid);
            if (s_Instance.m_WorldId1 != val)
            {
                s_Instance.m_WorldId1 = val;
            }
        }

        if (CenterHubApi.GetConfig("DSRequestTimeout", sb, 256))
        {
            s_Instance.m_DSRequestTimeout = uint.Parse(sb.ToString());
        }
    }