public Chunk_MODF(ADTFile file) : base(file, "MODF", Magic) { int entryCount = (int)ChunkSize / 64; entries = new MODFEntry[entryCount]; for (int i = 0; i < entryCount; i++) { MODFEntry entry = new MODFEntry(); entry.entry = file.readUInt32(); entry.uniqueID = file.readUInt32(); float x = Constants.WOW_ADT_MAP_MAX - file.readFloat(); float z = file.readFloat() - Constants.WOW_ADT_MAP_MAX; entry.position = new Position(z, file.readFloat(), x); entry.rotation = Position.Read(file); entry.lowerBound = Position.Read(file); entry.upperBound = Position.Read(file); entry.flags = file.readUInt16(); entry.doodadSet = file.readUInt16(); entry.nameSet = file.readUInt16(); entry.unk = file.readUInt16(); entries[i] = entry; } LogWrite("Loaded " + entryCount + " WMO spawns"); }
public Chunk_MDDF(ADTFile file) : base(file, "MDDF", Magic) { int entryCount = (int)ChunkSize / 36; entries = new MDDFEntry[entryCount]; for (int i = 0; i < entryCount; i++) { MDDFEntry entry = new MDDFEntry(); entry.entry = file.readUInt32(); entry.uniqueID = file.readUInt32(); entry.position = Position.Read(file); entry.rotation = Rotation.Read(file); entry.scale = file.readUInt16(); entry.flags = file.readUInt16(); } LogWrite("Loaded " + entryCount + " doodad spawns"); }