UInt32[] wmoLodLength; //Number of elements used from MLMD per lod public MLFD(WOTLK.Chunks.MDDF mddf, WOTLK.Chunks.MODF modf) : base("MLFD", 48, false) { m2LodOffset = new UInt32[3]; m2LodLength = new UInt32[3]; wmoLodOffset = new UInt32[3]; wmoLodLength = new UInt32[3]; m2LodOffset[0] = 0; m2LodOffset[1] = 0; m2LodOffset[2] = 0; m2LodLength[0] = (UInt32)mddf.DoodadDefs.Count;// m2LodLength[1] = 0; m2LodLength[2] = 0; wmoLodOffset[0] = 0; wmoLodOffset[1] = 0; wmoLodOffset[2] = 0; wmoLodLength[0] = 0; wmoLodLength[1] = 0; wmoLodLength[2] = (UInt32)modf.MapObjDefs.Count;// }
public MLDX(WOTLK.Chunks.MDDF wotlk) : base(wotlk, "MLDX", false) { int boundingSize = Program.config.BoundingSize; int boundingRadius = Program.config.BoundingRadius; if (Program.config.DynamicBoundingGeneration) { int count = wotlk.DoodadDefs.Count; if (wotlk.DoodadDefs.Count > 1000) { boundingSize = Convert.ToInt32(boundingSize - ((wotlk.DoodadDefs.Count - 1000) / 10)); boundingRadius = Convert.ToInt32(boundingRadius - ((wotlk.DoodadDefs.Count - 1000) / 10)); if (boundingSize < 10) { boundingSize = 10; Logger.log("Bounding size was too small. Set to 10", Logger.Type.WARNING); } if (boundingRadius < 10) { boundingRadius = 10; Logger.log("Bounding radius was too small. Set to 10", Logger.Type.WARNING); } } } /* * doodadDef.Position.X = bounding.Y * doodadDef.Position.Y = bounding.Z * doodadDef.Position.Z = bounding.X */ foreach (DoodadDef doodadDef in wotlk.DoodadDefs) { lod_extent extent = new lod_extent(); CAaBox bounding = new CAaBox(); Vector min = new Vector(); Vector max = new Vector(); min.X = ConvertClientCoordsToServerCoords(doodadDef.Position.Z) - boundingSize; min.Y = ConvertClientCoordsToServerCoords(doodadDef.Position.X) - boundingSize; min.Z = doodadDef.Position.Y - boundingSize; max.X = ConvertClientCoordsToServerCoords(doodadDef.Position.Z) + boundingSize; max.Y = ConvertClientCoordsToServerCoords(doodadDef.Position.X) + boundingSize; max.Z = doodadDef.Position.Y + boundingSize; bounding.Min = min; bounding.Max = max; extent.Bounding = bounding; extent.Radius = boundingRadius; doodadExtents.Add(extent); } Header.ChangeSize(RecalculateSize()); }
public MLDD(WOTLK.Chunks.MDDF wotlk) : base(wotlk, "MLDD", false) { doodadDefs = wotlk.DoodadDefs; }