@rhyster/wow-casc-dbc 2.9.11 → 2.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/dist/wdc.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/test/salsa20.test.ts +186 -186
- package/src/wdc.ts +20 -19
package/dist/index.cjs
CHANGED
|
@@ -1298,7 +1298,8 @@ class WDCReader {
|
|
|
1298
1298
|
sectionPointer === sectionHeader.fileOffset,
|
|
1299
1299
|
`Invalid section offset: ${sectionPointer.toString()} != ${sectionHeader.fileOffset.toString()}`
|
|
1300
1300
|
);
|
|
1301
|
-
const
|
|
1301
|
+
const sectionRecordSize = isNormal ? sectionHeader.recordCount * recordSize + sectionHeader.stringTableSize : sectionHeader.offsetRecordsEnd - sectionPointer;
|
|
1302
|
+
const sectionSize = sectionRecordSize + sectionHeader.idListSize + sectionHeader.copyTableCount * 8 + sectionHeader.offsetMapIDCount * 10 + sectionHeader.relationshipDataSize;
|
|
1302
1303
|
const recordDataSize = isNormal ? recordSize * sectionHeader.recordCount : sectionHeader.offsetRecordsEnd - sectionHeader.fileOffset;
|
|
1303
1304
|
const isZeroed = blocks.some((block) => {
|
|
1304
1305
|
const sectionStart = sectionHeader.fileOffset;
|
|
@@ -1448,7 +1449,10 @@ class WDCReader {
|
|
|
1448
1449
|
};
|
|
1449
1450
|
}
|
|
1450
1451
|
case "commonData": {
|
|
1451
|
-
|
|
1452
|
+
let value = recordID !== undefined ? commonData.get(fieldIndex)?.get(recordID) : undefined;
|
|
1453
|
+
if (value === undefined) {
|
|
1454
|
+
value = fieldInfo.defaultValue;
|
|
1455
|
+
}
|
|
1452
1456
|
return {
|
|
1453
1457
|
type: "commonData",
|
|
1454
1458
|
data: value
|