示例#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
 public void InitFromType(WoWFile wowFile, GameObjectTypeInfo type, int id)
 {
     // 0x4A9724
     wowFile.BaseStream.Position = type.NameOffset - GameObjectTypeExtractor.s_VirtualOffset;            //0x401800; // 0x4988C4
     Name       = wowFile.ReadCString();
     TypeId     = id;
     SoundCount = type.SoundCount;
     Sounds     = new GameObjectSound[SoundCount];
     ReadSounds(wowFile, type);
     //DumpInfo(RalekProgram.Log);
 }
		private static GameObjectSoundEntry[] GetSounds(WoWFile wowFile, GameObjectTypeInfo type)
		{
			return null;
		}
		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;
			}
		}
		public void InitFromType(WoWFile wowFile, GameObjectTypeInfo type, int id)
		{
			// 0x4A9724
			wowFile.BaseStream.Position = type.NameOffset - GameObjectTypeExtractor.s_VirtualOffset;//0x401800; // 0x4988C4
			Name = wowFile.ReadCString();
			TypeId = id;
			SoundCount = type.SoundCount;
			Sounds = new GameObjectSound[SoundCount];
			ReadSounds(wowFile, type);
			//DumpInfo(RalekProgram.Log);
		}
示例#6
0
 private static GameObjectSoundEntry[] GetSounds(WoWFile wowFile, GameObjectTypeInfo type)
 {
     return(null);
 }