示例#1
0
        public void Read(MemoryStreamReader br, int size)
        {
            Tick = br.ReadInt();
            var posDir = br.ReadPos();

            PosX = posDir[0];
            PosY = posDir[1];
            Dir  = posDir[2];

            br.Seek(2, SeekOrigin.Current);

            Font = br.ReadShort();
            Sex  = br.ReadByte();
        }
        public void Read(MemoryStreamReader br, int size)
        {
            entityData = new EntitySpawnData();

            entityData.objecttype = (EntityType)br.ReadByte();

            entityData.AID = br.ReadUInt();
            entityData.GID = br.ReadUInt();

            entityData.speed       = br.ReadShort();
            entityData.bodyState   = br.ReadShort();
            entityData.healthState = br.ReadShort();

            entityData.effectState = br.ReadInt();

            entityData.job = br.ReadShort();

            entityData.head = br.ReadUShort();

            entityData.Weapon = br.ReadUInt();
            entityData.Shield = br.ReadUInt();

            /**
             * might represent emblem/guild_id1/guild_id0
             * rA clif.cpp #1102
             */
            entityData.Accessory  = br.ReadUShort();
            entityData.Accessory2 = br.ReadUShort();
            entityData.Accessory3 = br.ReadUShort();

            entityData.HairColor    = br.ReadShort();
            entityData.ClothesColor = br.ReadShort();
            entityData.headDir      = br.ReadShort();

            entityData.Robe = br.ReadUShort();

            entityData.GUID = br.ReadUInt();

            entityData.GEmblemVer = br.ReadShort();
            entityData.honor      = br.ReadShort();

            entityData.virtue = br.ReadInt();

            entityData.isPKModeON = (byte)br.ReadByte();
            entityData.sex        = (byte)br.ReadByte();

            entityData.PosDir = br.ReadPos();

            entityData.xSize = (byte)br.ReadByte();
            entityData.ySize = (byte)br.ReadByte();
            entityData.state = (byte)br.ReadByte();

            entityData.clevel = br.ReadShort();
            entityData.font   = br.ReadShort();

            entityData.MaxHP = br.ReadInt();
            entityData.HP    = br.ReadInt();

            entityData.isBoss = (byte)br.ReadByte();

            entityData.body = br.ReadUShort();
            entityData.name = br.ReadBinaryString(24);
        }