public static void BuildCache() { if (IO.FileManager.Instance.Version == IO.FileDataVersion.Warlords) { CreatureDisplayInfo.BuildCache <IO.Files.Models.WoD.CreatureDisplayInfoEntry>(); CreatureModelData.BuildCache <IO.Files.Models.WoD.CreatureModelDataEntry>(); FileData.BuildCache <IO.Files.Models.WoD.FileDataIDEntry>(); } else if (IO.FileManager.Instance.Version == IO.FileDataVersion.Lichking) { CreatureDisplayInfo.BuildCache <IO.Files.Models.Wotlk.CreatureDisplayInfoEntry>(); CreatureModelData.BuildCache <IO.Files.Models.Wotlk.CreatureModelDataEntry>(); CreatureDisplayInfoExtra.BuildCache <IO.Files.Models.Wotlk.CreatureDisplayInfoExtraEntry>(); AreaTable.BuildCache <IO.Files.Terrain.Wotlk.AreaTable>(); } }
public static void Initialize() { Map.Load(@"DBFilesClient\Map.dbc"); LoadingScreen.Load(@"DBFilesClient\LoadingScreens.dbc"); Light.Load(@"DBFilesClient\Light.dbc"); try { CreatureDisplayInfo.Load(@"DBFilesClient\CreatureDisplayInfo.dbc"); } catch (Exception) { if (FileManager.Instance.Version < FileDataVersion.Warlords) { throw; } CreatureDisplayInfo = new DB2File(); CreatureDisplayInfo.Load(@"DBFilesClient\CreatureDisplayInfo.db2"); } CreatureDisplayInfoExtra.Load(@"DBFilesClient\CreatureDisplayInfoExtra.dbc"); CreatureModelData.Load(@"DBFilesClient\CreatureModelData.dbc"); if (FileManager.Instance.Version <= FileDataVersion.Mists) { InitLightsMop(); } if (FileManager.Instance.Version == FileDataVersion.Lichking) { LightIntBand.Load(@"DBFilesClient\LightIntBand.dbc"); LightFloatBand.Load(@"DBFilesClient\LightFloatBand.dbc"); } if (FileManager.Instance.Version <= FileDataVersion.Warlords) { FileData.Load(@"DBFilesClient\FileData.dbc"); } GroundEffectDoodad.Load(@"DBFilesClient\GroundEffectDoodad.dbc"); GroundEffectTexture.Load(@"DBFilesClient\GroundEffectTexture.dbc"); AreaTable.Load(@"DBFilesClient\AreaTable.dbc"); MapFormatGuess.Initialize(); SkyManager.Instance.Initialize(); }
public static void Load(string build) { ListFile = new ListFile(); ComponentModelFileData = new ComponentModelFileData(build); ComponentTextureFileData = new ComponentTextureFileData(build); CreatureDisplayInfoExtra = new CreatureDisplayInfoExtra(build); CreatureModelData = new CreatureModelData(build); ItemAppearance = new ItemAppearance(build); ItemDisplayInfo = new ItemDisplayInfo(build); ItemDisplayInfoMaterialRes = new ItemDisplayInfoMaterialRes(build); LightSkybox = new LightSkybox(build); ModelFileData = new ModelFileData(build); SpellVisualEffectName = new SpellVisualEffectName(build); SpellVisualKitAreaModel = new SpellVisualKitAreaModel(build); TextureFileData = new TextureFileData(build); // high priority lookups Task.WaitAll( ListFile.Load(), ModelFileData.Load(), TextureFileData.Load() ); Task.WaitAll( ComponentModelFileData.Load(), ComponentTextureFileData.Load(), CreatureDisplayInfoExtra.Load(), CreatureModelData.Load(), ItemAppearance.Load(), ItemDisplayInfo.Load(), ItemDisplayInfoMaterialRes.Load(), LightSkybox.Load(), SpellVisualEffectName.Load(), SpellVisualKitAreaModel.Load() ); Console.WriteLine("Loaded DBs"); }
public static List<CreatureDisplayInfoExtra> LoadCreatureDisplayInfoEx() { List<CreatureDisplayInfoExtra> list = new List<CreatureDisplayInfoExtra>(); using (FileStream stream = File.Open(DATA_PATH + "DBC/CreatureDisplayInfoExtra.dbc", FileMode.Open)) { BinaryReader r = new BinaryReader(stream); DBCHeader header = DBC.ReadDBCHeader(r); int dataSize = 20 + header.RowSize * header.Records; for (int i = 0; i != header.Records; ++i) { CreatureDisplayInfoExtra ex = new CreatureDisplayInfoExtra(); ex.ID = r.ReadInt32(); ex.Race = r.ReadInt32(); ex.Gender = r.ReadInt32(); ex.SkinColor = r.ReadInt32(); ex.FaceType = r.ReadInt32(); ex.HairStype = r.ReadInt32(); ex.HairStype = r.ReadInt32(); ex.FacialFeature = r.ReadInt32(); ex.EquipHead = r.ReadInt32(); ex.EquipShoulder = r.ReadInt32(); ex.EquipShirt = r.ReadInt32(); ex.EquipChest = r.ReadInt32(); ex.EquipWaist = r.ReadInt32(); ex.EquipLeg = r.ReadInt32(); ex.EquipFeet = r.ReadInt32(); ex.EquipWrist = r.ReadInt32(); ex.EquipHand = r.ReadInt32(); ex.EquipTarbard = r.ReadInt32(); ex.EquipBack = r.ReadInt32(); ex.CanEquip = r.ReadInt32(); ex.Texture = DBC.ReadString(r, dataSize); list.Add(ex); } r.Close(); } return list; }