/// <summary>
        /// 创建角色
        /// </summary>
        public static void SendCreateCharacter(string name, uint flag)
        {
            if (!CheckLogin())
            {
                return;
            }

            c2gs.CreateCharacter msg = PacketPools.Get(c2gs.msg.CREATE_CHARACTER) as c2gs.CreateCharacter;
            msg.name  = name;
            msg.flags = flag;
            ClientNetManager.Instance.Send(msg);
        }
        /// <summary>
        /// 创建角色
        /// </summary>
        private void OnCreateCharacter(ClientSession session, PacketBase packet)
        {
            c2gs.CreateCharacter msg = packet as c2gs.CreateCharacter;

            //发送到ws,分配char_idx
            gs2ws.CreateCharacter rep_msg = PacketPools.Get(gs2ws.msg.CREATE_CHARACTER) as gs2ws.CreateCharacter;
            rep_msg.client_uid  = session.client_uid;
            rep_msg.account_idx = session.account_idx;
            rep_msg.db_id       = session.db_id.game_id;
            rep_msg.name        = msg.name;
            rep_msg.flags       = msg.flags;
            ServerNetManager.Instance.Send2WS(rep_msg);
        }