fix: weapon seed's low dword being sign extended #1914

Merged
Sainan merged 1 commits from lodword-fix into main 2025-04-29 12:28:01 -07:00
Showing only changes of commit ce37b736b7 - Show all commits

View File

@ -286,7 +286,7 @@ const generateVendorManifest = (vendorInfo: IGeneratableVendorInfo): IVendorMani
item.LocTagRandSeed = (rng.randomInt(0, 0xffff) << 16) | rng.randomInt(0, 0xffff);
if (vendorInfo.RandomSeedType == "VRST_WEAPON") {
const highDword = (rng.randomInt(0, 0xffff) << 16) | rng.randomInt(0, 0xffff);
item.LocTagRandSeed = (BigInt(highDword) << 32n) | BigInt(item.LocTagRandSeed);
item.LocTagRandSeed = (BigInt(highDword) << 32n) | (BigInt(item.LocTagRandSeed) & 0xffffffffn);
}
}
processed.ItemManifest.push(item);