Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
var r = require('restructure');
var Chunk = require('../chunked/chunk');
var Chunked = require('../chunked');
var SkipChunk = require('../chunked/skip-chunk');
var MPHD = Chunk({
flags: r.uint32le,
skip: new r.Reserved(r.uint32le, 7)
});
var Tile = new r.Struct({
flags: r.uint32le,
skip: new r.Reserved(r.uint32le)
});
var MAIN = Chunk({
tiles: new r.Array(Tile, 4096)
});
module.exports = Chunked({
MPHD: MPHD,
MAIN: MAIN,
MWMO: require('../chunked/mwmo'),
// TODO: Optional MODF chunk
import r from 'restructure';
import Chunk from '../chunked/chunk';
import Chunked from '../chunked';
import MWMO from '../chunked/mwmo';
const MPHD = Chunk({
flags: r.uint32le,
skip: new r.Reserved(r.uint32le, 7),
});
const Tile = new r.Struct({
flags: r.uint32le,
skip: new r.Reserved(r.uint32le),
});
const MAIN = Chunk({
tiles: new r.Array(Tile, 4096),
});
export default Chunked({
MPHD: MPHD,
MAIN: MAIN,
MWMO: MWMO,
// TODO: Optional MODF chunk
flags: function () {
return this.MPHD.flags;
},
import Chunked from '../chunked';
import SkipChunk from '../chunked/skip-chunk';
import { Vec3Float, float32array2, float32array3 } from '../types';
const MOGP = Chunk({
nameOffset: r.uint32le,
descriptionOffset: r.uint32le,
flags: r.uint32le,
minBoundingBox: Vec3Float,
maxBoundingBox: Vec3Float,
portalOffset: r.uint16le,
aBatchCount: r.uint16le,
interiorBatchCount: r.uint16le,
exteriorBatchCount: r.uint16le,
fogOffsets: new r.Array(r.uint8, 4),
unknown: new r.Reserved(r.uint32le),
groupID: r.uint32le,
unknowns: new r.Reserved(r.uint32le, 3),
});
const MOPY = Chunk({
triangles: new r.Array(new r.Struct({
flags: r.uint8,
materialID: r.int8,
}), 'size', 'bytes'),
});
const MOVI = Chunk({
triangles: new r.Array(r.uint16le, 'size', 'bytes'),
});
const MOVT = Chunk({
'use strict';
var r = require('restructure');
var Entity = require('../entity');
var StringRef = require('../string-ref');
module.exports = Entity({
id: r.uint32le,
name: StringRef,
unknowns: new r.Reserved(r.uint32le, 2),
soundID: r.uint32le,
flags: r.uint32le
});
'use strict';
var r = require('restructure');
var Entity = require('../entity');
module.exports = Entity({
id: r.uint32le,
tabID: r.uint32le,
tierID: r.uint32le,
columnIndex: r.uint32le,
spellRankIDs: new r.Array(r.uint32le, 9),
preqreqTalentIDs: new r.Array(r.uint32le, 3),
preqreqRanks: new r.Array(r.uint32le, 3),
flags: r.uint32le,
requiredSpellID: r.uint32le,
unknowns: new r.Reserved(r.uint32le, 2)
});
import Entity from '../entity';
import StringRef from '../string-ref';
export default Entity({
id: r.uint32le,
modelID: r.uint32le,
soundID: r.uint32le,
extraInfoID: r.uint32le,
scale: r.floatle,
opacity: r.uint32le,
skin1: StringRef,
skin2: StringRef,
skin3: StringRef,
portraitTexture: StringRef,
skips: new r.Reserved(r.uint32le, 6),
});
'use strict';
var r = require('restructure');
var Entity = require('../entity');
module.exports = Entity({
id: r.uint32le,
factionID: r.uint32le,
unknown: new r.Reserved(r.uint32le),
groupMask: r.uint32le,
friendlyMask: r.uint32le,
hostileMask: r.uint32le,
relatedFactionIDs: new r.Array(r.uint32le, 8)
});
import r from 'restructure';
import Entity from '../entity';
export default Entity({
id: r.uint32le,
costHonor: r.uint32le,
costArena: r.uint32le,
itemIDs: new r.Array(r.uint32le, 5),
itemCounts: new r.Array(r.uint32le, 5),
personalRating: r.uint32le,
purchaseGroupID: r.uint32le,
unknown: new r.Reserved(r.uint32le),
});
'use strict';
var r = require('restructure');
var Entity = require('../entity');
var StringRef = require('../string-ref');
module.exports = Entity({
id: r.uint32le,
name: StringRef,
type: r.uint32le,
rgba: new r.Array(r.uint8, 4),
edge: r.uint32le,
bw: r.uint32le,
unknown: new r.Reserved(r.uint32le),
lightParamsID: r.int32le,
soundAmbienceID: r.uint32le,
zoneMusicID: r.uint32le
});
import r from 'restructure';
import Entity from '../entity';
import LocalizedStringRef from '../localized-string-ref';
import StringRef from '../string-ref';
export default Entity({
id: r.uint32le,
skip: new r.Reserved(r.uint32le),
powerType: r.uint32le,
petType: r.uint32le,
name: LocalizedStringRef,
nameFemale: LocalizedStringRef,
nameMale: LocalizedStringRef,
filename: StringRef,
spellClassSet: r.uint32le,
flags: r.uint32le,
cameraID: r.uint32le,
expansionID: r.uint32le,
});