Skip to content

Commit

Permalink
add price
Browse files Browse the repository at this point in the history
  • Loading branch information
DayV-git committed Nov 18, 2024
1 parent 0909058 commit 3561ef5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions scripts/prepareItems.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,14 @@ export default async function prepareItems(): Promise<void> {
for (let item of Object.values(allItems)) {
if (itemShouldntBeAdded(item)) continue;

if (item.name === "Pharaoh's sceptre") {
item = {
...allItems[26_945],
name: "Pharaoh's sceptre",
id: item.id,
};
}

for (const delKey of [
"quest_item",
"placeholder",
Expand Down Expand Up @@ -371,7 +379,7 @@ export default async function prepareItems(): Promise<void> {
newItems.push(item);
}

const price = allPrices[item.id];
const price = allPrices[item.name === "Pharaoh's sceptre" ? 26_945 : item.id];
if (price) {
// Fix weird bug with prices: (high can be 1 and low 2.14b for example... blame Jamflex)
if (price.high < price.low) price.high = price.low;
Expand Down Expand Up @@ -486,14 +494,6 @@ export default async function prepareItems(): Promise<void> {
item = deepMerge(item, itemChanges[item.id]) as any;
}

if (item.name === "Pharaoh's sceptre") {
item = {
...allItems[26_945],
name: "Pharaoh's sceptre",
id: item.id,
};
}

newItemJSON[item.id] = item;

for (const item of manualItems) {
Expand Down

0 comments on commit 3561ef5

Please sign in to comment.