@rhyster/wow-casc-dbc 2.9.17 → 2.10.0

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.mjs CHANGED
@@ -2055,19 +2055,36 @@ class DBDParser {
2055
2055
  srcSize,
2056
2056
  4 * column.arraySize
2057
2057
  );
2058
- const values = [];
2059
- if (column.isSigned) {
2060
- for (let i = 0; i < column.arraySize; i += 1) {
2061
- const value = castBuffer.readIntLE(i * dstSize, dstSize);
2062
- values.push(value);
2058
+ if (dstSize > 6) {
2059
+ assert(dstSize === 8, `Unexpected size ${dstSize.toString()} for column ${column.name}`);
2060
+ const values = [];
2061
+ if (column.isSigned) {
2062
+ for (let i = 0; i < column.arraySize; i += 1) {
2063
+ const value = castBuffer.readBigInt64LE(i * dstSize);
2064
+ values.push(value);
2065
+ }
2066
+ } else {
2067
+ for (let i = 0; i < column.arraySize; i += 1) {
2068
+ const value = castBuffer.readBigUInt64LE(i * dstSize);
2069
+ values.push(value);
2070
+ }
2063
2071
  }
2072
+ data[column.name] = values;
2064
2073
  } else {
2065
- for (let i = 0; i < column.arraySize; i += 1) {
2066
- const value = castBuffer.readUIntLE(i * dstSize, dstSize);
2067
- values.push(value);
2074
+ const values = [];
2075
+ if (column.isSigned) {
2076
+ for (let i = 0; i < column.arraySize; i += 1) {
2077
+ const value = castBuffer.readIntLE(i * dstSize, dstSize);
2078
+ values.push(value);
2079
+ }
2080
+ } else {
2081
+ for (let i = 0; i < column.arraySize; i += 1) {
2082
+ const value = castBuffer.readUIntLE(i * dstSize, dstSize);
2083
+ values.push(value);
2084
+ }
2068
2085
  }
2086
+ data[column.name] = values;
2069
2087
  }
2070
- data[column.name] = values;
2071
2088
  } else if (typeof cell.data === "number") {
2072
2089
  data[column.name] = castIntegerBySize(
2073
2090
  cell.data,