improve: for "make rank 30", also make respective exalted items rank 30 (#648)
This commit is contained in:
parent
27af54d039
commit
9dbb0fe4bf
@ -89,7 +89,8 @@ const getItemListsController: RequestHandler = (req, res) => {
|
|||||||
.map(([uniqueName, warframe]) => {
|
.map(([uniqueName, warframe]) => {
|
||||||
return {
|
return {
|
||||||
uniqueName,
|
uniqueName,
|
||||||
name: getString(warframe.name, lang)
|
name: getString(warframe.name, lang),
|
||||||
|
exalted: warframe.exalted
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
weapons,
|
weapons,
|
||||||
|
@ -203,6 +203,22 @@ function updateInventory() {
|
|||||||
a.onclick = function (event) {
|
a.onclick = function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
addGearExp("Suits", item.ItemId.$oid, 1_600_000 - item.XP);
|
addGearExp("Suits", item.ItemId.$oid, 1_600_000 - item.XP);
|
||||||
|
if ("exalted" in itemMap[item.ItemType]) {
|
||||||
|
for (const exaltedType of itemMap[item.ItemType].exalted) {
|
||||||
|
const exaltedItem = data.SpecialItems.find(x => x.ItemType == exaltedType);
|
||||||
|
if (exaltedItem) {
|
||||||
|
const exaltedCap =
|
||||||
|
itemMap[exaltedType]?.type == "weapons" ? 800_000 : 1_600_000;
|
||||||
|
if (exaltedItem.XP < exaltedCap) {
|
||||||
|
addGearExp(
|
||||||
|
"SpecialItems",
|
||||||
|
exaltedItem.ItemId.$oid,
|
||||||
|
exaltedCap - exaltedItem.XP
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
a.title = "Make Rank 30";
|
a.title = "Make Rank 30";
|
||||||
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg>`;
|
a.innerHTML = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2V448c0 17.7 14.3 32 32 32s32-14.3 32-32V141.2L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"/></svg>`;
|
||||||
@ -562,7 +578,9 @@ function addGearExp(category, oid, xp) {
|
|||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: JSON.stringify(data)
|
data: JSON.stringify(data)
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
updateInventory();
|
if (category != "SpecialItems") {
|
||||||
|
updateInventory();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user