improve: don't fake XPInfo if we don't have to (#303)
This commit is contained in:
parent
8f8d58ade6
commit
c9b570059e
@ -78,19 +78,18 @@ const inventoryController: RequestHandler = async (request: Request, response: R
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
typeof config.spoofMasteryRank === "number" &&
|
||||
config.spoofMasteryRank >= 0 &&
|
||||
config.spoofMasteryRank <= 5030
|
||||
) {
|
||||
if (typeof config.spoofMasteryRank === "number" && config.spoofMasteryRank >= 0) {
|
||||
inventoryResponse.PlayerLevel = config.spoofMasteryRank;
|
||||
inventoryResponse.XPInfo = [];
|
||||
let numFrames = getExpRequiredForMr(config.spoofMasteryRank) / 6000;
|
||||
while (numFrames-- > 0) {
|
||||
inventoryResponse.XPInfo.push({
|
||||
ItemType: "/Lotus/Powersuits/Mag/Mag",
|
||||
XP: 1_600_000
|
||||
});
|
||||
if (!("xpBasedLevelCapDisabled" in request.query)) {
|
||||
// This client has not been patched to accept any mastery rank, need to fake the XP.
|
||||
inventoryResponse.XPInfo = [];
|
||||
let numFrames = getExpRequiredForMr(Math.min(config.spoofMasteryRank, 5030)) / 6000;
|
||||
while (numFrames-- > 0) {
|
||||
inventoryResponse.XPInfo.push({
|
||||
ItemType: "/Lotus/Powersuits/Mag/Mag",
|
||||
XP: 1_600_000
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ window.itemListPromise = new Promise(resolve => {
|
||||
});
|
||||
|
||||
function updateInventory() {
|
||||
const req = $.get("/api/inventory.php?" + window.authz);
|
||||
const req = $.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1");
|
||||
req.done(data => {
|
||||
window.itemListPromise.then(itemMap => {
|
||||
document.getElementById("warframe-list").innerHTML = "";
|
||||
@ -539,7 +539,7 @@ function doAcquireRiven() {
|
||||
})
|
||||
}).done(function () {
|
||||
// Get riven's assigned id
|
||||
$.get("/api/inventory.php?" + window.authz).done(data => {
|
||||
$.get("/api/inventory.php?" + window.authz + "&xpBasedLevelCapDisabled=1").done(data => {
|
||||
for (const rawUpgrade of data.RawUpgrades) {
|
||||
if (rawUpgrade.ItemType === uniqueName) {
|
||||
// Add fingerprint to riven
|
||||
|
Loading…
x
Reference in New Issue
Block a user