public void Read(BinaryReader reader)
        {
            EntityId = reader.ReadInt32();
            PositionX = reader.ReadInt64();
            PositionY = reader.ReadInt64();
            PositionZ = reader.ReadInt64();
            Pitch = reader.ReadSingle();
            Roll = reader.ReadSingle();
            Yaw = reader.ReadSingle();

            Health = reader.ReadSingle();
            Experience = reader.ReadInt32();
            Level = reader.ReadInt32();
            Class = (ClassType)reader.ReadByte();
            Specialization = reader.ReadByte();
            unknown1 = reader.ReadUInt32();
            unknown2 = reader.ReadUInt32();

            for (int i = 0; i < EquipmentCount; ++i)
            {
                Item item = new Item();
                item.Read(reader);

                Equipment.Add(item);
            }

            Name = reader.ReadLongString();
            Race = reader.ReadInt32();
            Gender = reader.ReadByte();
            reader.Skip(3);
            Face = reader.ReadInt32();
            Hair = reader.ReadInt32();
            HairColor = Utility.FromAbgr(reader.ReadInt32());

            int inventoryCount = reader.ReadInt32();
            for (int i = 0; i < inventoryCount; ++i)
            {
                Inventory inventory = new Inventory();
                inventory.Read(reader);

                Inventories.Add(inventory);
            }

            Coins = reader.ReadInt32();
            PlatinumCoins = reader.ReadInt32();

            int craftingRecipeCount = reader.ReadInt32();
            for (int i = 0; i < craftingRecipeCount; ++i)
            {
                Item item = new Item();
                item.Read(reader);

                CraftingRecipes.Add(item);
            }

            int worldCount = reader.ReadInt32();
            for (int i = 0; i < worldCount; ++i)
            {
                World world = new World();
                world.Read(reader);

                Worlds.Add(world);
            }

            int lastWorldSeed = reader.ReadInt32();
            string lastWorldName = reader.ReadLongString();

            LastWorld = Worlds.FirstOrDefault(w => w.Seed == lastWorldSeed && w.Name == lastWorldName);

            unknown3 = reader.ReadUInt32();
            reader.Skip(4);
            PetMasterSkillLevel = reader.ReadInt32();
            PetRidingSkillLevel = reader.ReadInt32();
            ClimbingSkillLevel = reader.ReadInt32();
            HangGlidingSkillLevel = reader.ReadInt32();
            SwimmingSkillLevel = reader.ReadInt32();
            SailingSkillLevel = reader.ReadInt32();
            TierOneSkillLevel = reader.ReadInt32();
            TierTwoSkillLevel = reader.ReadInt32();
            TierThreeSkillLevel = reader.ReadInt32();
            unknown4 = reader.ReadInt32();
            unknown5 = reader.ReadInt32();
        }
Exemple #2
0
		public void Read(BinaryReader reader)
		{
			Count = reader.ReadInt32();
			Item = new Item();
			Item.Read(reader);
		}