From 4e3ac7a36bb681d23565056fddcd856760709674 Mon Sep 17 00:00:00 2001 From: nwjgit Date: Sat, 27 Jan 2024 22:50:23 -0600 Subject: [PATCH] fix --- scripts/prepareItems.ts | 13 ++++++++++++- src/data/items/item_data.json | 12 ------------ src/simulation/monsters/low/g-m/LavaDragon.ts | 3 ++- src/structures/Items.ts | 3 +++ test/Items.test.ts | 2 ++ 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/scripts/prepareItems.ts b/scripts/prepareItems.ts index 869ca3cdc..eba630d0f 100644 --- a/scripts/prepareItems.ts +++ b/scripts/prepareItems.ts @@ -414,12 +414,23 @@ export default async function prepareItems(): Promise { itemNameMap[item.id] = item; } } - const deletedItems = Object.values(previousItems) + const deletedItems: any[] = Object.values(previousItems) .filter((i: any) => !(itemNameMap as any)[i.id]) .filter(notEmpty); messages.push(`New Items: ${moidLink(newItems)}.`); messages.push(`Deleted Items: ${moidLink(deletedItems)}.`); + const sql = `SELECT + ${deletedItems + .map( + item => `COUNT(*) FILTER (WHERE bank->>'${item.id}' IS NOT NULL) AS people_with_item_${item.id}, + SUM((bank->>'${item.id}')::int) AS sum_item_${item.id},` + ) + .join('\n')} + +FROM users; +`; + messages.push(`${sql}`); messages.push( `Major price changes NOT changed: ${majorPriceChanges diff --git a/src/data/items/item_data.json b/src/data/items/item_data.json index c29471e2c..e50c14ac1 100644 --- a/src/data/items/item_data.json +++ b/src/data/items/item_data.json @@ -224964,18 +224964,6 @@ "wiki_url": "https://oldschool.runescape.wiki/w/Mysterious_crushed_meat", "price": 0 }, - "22405": { - "id": 22405, - "name": "Vial of blood", - "members": true, - "cost": 100, - "weight": 0.02, - "release_date": "2018-05-24", - "examine": "A glass vial containing some blood. Yuck.", - "wiki_name": "Vial of blood (A Taste of Hope)", - "wiki_url": "https://oldschool.runescape.wiki/w/Vial_of_blood_(A_Taste_of_Hope)", - "price": 0 - }, "22406": { "id": 22406, "name": "Unfinished blood potion", diff --git a/src/simulation/monsters/low/g-m/LavaDragon.ts b/src/simulation/monsters/low/g-m/LavaDragon.ts index 1f9b0a472..54d506758 100644 --- a/src/simulation/monsters/low/g-m/LavaDragon.ts +++ b/src/simulation/monsters/low/g-m/LavaDragon.ts @@ -51,7 +51,8 @@ export const LavaDragonTable = new LootTable() /* Tertiary */ .tertiary(250, 'Clue scroll (elite)') - .tertiary(10_000, 'Draconic visage'); + .tertiary(10_000, 'Draconic visage') + .tertiary(18, 'Ensouled dragon head'); export default new SimpleMonster({ id: 6593, diff --git a/src/structures/Items.ts b/src/structures/Items.ts index 2ac8da10a..0481018bf 100644 --- a/src/structures/Items.ts +++ b/src/structures/Items.ts @@ -16,6 +16,9 @@ export interface ItemCollection { export const USELESS_ITEMS = [ 617, 8890, 6964, 2513, 19_492, 11_071, 11_068, 21_284, 24_735, 21_913, 4703, 4561, 2425, 4692, 3741, + // Quest blood vial + 22_405, + // Pharaoh's sceptres 9045, 9046, 9047, 9048, 9049, 9050, 9051, 13_074, 13_075, 13_076, 13_077, 13_078, 16_176, 21_445, 21_446, 26_948, 26_950, 26_945, diff --git a/test/Items.test.ts b/test/Items.test.ts index 09eea5f59..c321552f2 100644 --- a/test/Items.test.ts +++ b/test/Items.test.ts @@ -102,6 +102,8 @@ describe('Items', () => { expect(coins.id).toBe(995); expect(coins.price).toEqual(1); expect(Items.get('Snowy knight')!.price).toEqual(0); + + expect(Items.get('Vial of blood')!.id).toEqual(22_446); }, 60_000 );