public void Create(byte[] msg)
        {
            PackIn inpack = new PackIn(msg);

            inpack.ReadUInt16();
            accountid = inpack.ReadInt32();
            IsExit = inpack.ReadBool();
            name = inpack.ReadString();
            lookface = inpack.ReadUInt32();
            hair = inpack.ReadUInt32();
            level = inpack.ReadByte();
            exp = inpack.ReadInt32();
            life = inpack.ReadUInt32();
            mana = inpack.ReadUInt32();
            profession = inpack.ReadByte();
            pk = inpack.ReadInt16();
            gold = inpack.ReadLong();
            gamegold = inpack.ReadLong();
            stronggold = inpack.ReadLong();
            mapid = inpack.ReadUInt32();
            x = inpack.ReadInt16();
            y = inpack.ReadInt16();
            hotkey = inpack.ReadString();
            guanjue = inpack.ReadULong();
            godlevel = inpack.ReadByte();
            maxeudemon = inpack.ReadByte();
        }
 public void Create(PackIn inpack)
 {
     id = inpack.ReadUInt32();
     name = inpack.ReadString();
     guanjue = inpack.ReadULong();
 }
        public short y; //所在地图坐标y

        #endregion Fields

        #region Constructors

        public RoleInfo(byte[] msg = null)
        {
            mParam = Define.ROLEINFO;
            gameid = 0;
            isRole = false;
            mKey = 0;
            mKey1 = 0;
            accountid = 0;
            sAccount = "";
            name = "";
            lookface = 0;
            hair = 0;
            lv = 0;
            exp = 0;
            life = 0;
            mana = 0;
            profession = 0;
            pk = 0;
            gold = 0;
            gamegold = 0;
            mapid = 0;
            x = 0;
            y = 0;
            playerid = 0;
            hotkey = "";
            guanjue = 0;
            godlevel = 0;
            maxeudemon = 2;
            if (msg != null)
            {
                PackIn inpack = new PackIn(msg);
                mParam = inpack.ReadUInt16();
                gameid = inpack.ReadUInt32();

                mKey = inpack.ReadInt32();
                mKey1 = inpack.ReadInt32();
                accountid = inpack.ReadInt32();
                sAccount = inpack.ReadString();
                playerid = inpack.ReadInt32();
                isRole = inpack.ReadBool();
                if (isRole)
                {
                    name = inpack.ReadString();
                    lookface = inpack.ReadUInt32();
                    hair = inpack.ReadUInt32();
                    lv = inpack.ReadByte();
                    exp = inpack.ReadUInt32();
                    life = inpack.ReadUInt32();
                    mana = inpack.ReadUInt32();
                    profession = inpack.ReadByte();
                    pk = inpack.ReadInt16();
                    gold = inpack.ReadInt32();
                    gamegold = inpack.ReadInt32();
                    stronggold = inpack.ReadInt32();
                    mapid = inpack.ReadInt32();
                    x = inpack.ReadInt16();
                    y = inpack.ReadInt16();
                    hotkey = inpack.ReadString();
                    guanjue = inpack.ReadULong();
                    godlevel = inpack.ReadInt32();
                    maxeudemon = inpack.ReadByte();
                }

            }
        }