Exemple #1
0
        public int res_error_code(Bit_Buffer buffer)
        {
            uint   code    = buffer.read_uint(16);
            string err_msg = Error_Code.message(code);

            if (err_msg != "")
            {
                player_log("服务器返回错误消息:" + err_msg);
            }
            else
            {
                player_log("服务器返回错误代码:" + code.ToString());
            }
            return(0);
        }
Exemple #2
0
        public int init_conf()
        {
            try
            {
                bool clear_map = true;
                init_conf_path();

                foreach (string path in conf_list_["msg_struct_path"])
                {
                    Log.debug_log("加载消息配置,path:" + path);
                    Struct_Manager.instance.load_config(path, clear_map);
                    if (clear_map)
                    {
                        clear_map = false;
                    }
                }

                clear_map = true;
                foreach (string path in conf_list_["cmd_list_path"])
                {
                    Log.debug_log("加载命令配置,path:" + path);
                    Msg_Parse.load_cmd_list(path, clear_map);
                    if (clear_map)
                    {
                        clear_map = false;
                    }
                }

                clear_map = true;
                foreach (string path in conf_list_["error_code_path"])
                {
                    Log.debug_log("加载错误号配置,path:" + path);
                    Error_Code.load_error_code(path, clear_map);
                    if (clear_map)
                    {
                        clear_map = false;
                    }
                }
                return(0);
            }
            catch (Exception ex)
            {
                Log.debug_log(ex.Message);
                return(-1);
            }
        }