From 3561ef5d068f7a8d3f3e89163c63ac0ab13669dc Mon Sep 17 00:00:00 2001 From: DayV Date: Mon, 18 Nov 2024 23:04:15 +0000 Subject: [PATCH] add price --- scripts/prepareItems.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/prepareItems.ts b/scripts/prepareItems.ts index e20eb6713..180c40db9 100644 --- a/scripts/prepareItems.ts +++ b/scripts/prepareItems.ts @@ -322,6 +322,14 @@ export default async function prepareItems(): Promise { 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", @@ -371,7 +379,7 @@ export default async function prepareItems(): Promise { 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; @@ -486,14 +494,6 @@ export default async function prepareItems(): Promise { 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) {