コード例 #1
0
        private void ReadSounds(WoWFile wowFile, GameObjectTypeInfo type)
        {
            if (SoundCount < 1)
            {
                return;
            }

            //long start = type.SoundListOffset - 0x401A00;
            long start = type.SoundIdListOffset - 0x401600;            // GameObjectTypeExtractor.s_VirtualOffset;

            wowFile.BaseStream.Position = start;



            for (int i = 0; i < SoundCount; i++)
            {
                Sounds[i]    = new GameObjectSound();
                Sounds[i].Id = wowFile.ReadInt32();
                long startPos = wowFile.BaseStream.Position;
                if (Sounds[i].Id > GameObjectTypeExtractor.Sounds.Count)
                {
                    System.Diagnostics.Debugger.Break();
                }
                wowFile.BaseStream.Position = GameObjectTypeExtractor.Sounds[Sounds[i].Id].NameOffset - GameObjectTypeExtractor.s_VirtualOffset;
                Sounds[i].Name = wowFile.ReadCString();
                wowFile.BaseStream.Position = startPos;
            }
        }
コード例 #2
0
		private void ReadSounds(WoWFile wowFile, GameObjectTypeInfo type)
		{
			if (SoundCount < 1)
				return;

			//long start = type.SoundListOffset - 0x401A00;
			long start = type.SoundIdListOffset - 0x401600;// GameObjectTypeExtractor.s_VirtualOffset;

			wowFile.BaseStream.Position = start;




			for (int i = 0; i < SoundCount; i++)
			{
				Sounds[i] = new GameObjectSound();
				Sounds[i].Id = wowFile.ReadInt32();
				long startPos = wowFile.BaseStream.Position;
				if (Sounds[i].Id > GameObjectTypeExtractor.Sounds.Count)
				{
					System.Diagnostics.Debugger.Break();
				}
				wowFile.BaseStream.Position = GameObjectTypeExtractor.Sounds[Sounds[i].Id].NameOffset - GameObjectTypeExtractor.s_VirtualOffset;
				Sounds[i].Name = wowFile.ReadCString();
				wowFile.BaseStream.Position = startPos;
			}
		}