Skip to content

Commit 4e3ac7a

Browse files
committed
fix
1 parent 4be0f12 commit 4e3ac7a

File tree

5 files changed

+19
-14
lines changed

5 files changed

+19
-14
lines changed

scripts/prepareItems.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,12 +414,23 @@ export default async function prepareItems(): Promise<void> {
414414
itemNameMap[item.id] = item;
415415
}
416416
}
417-
const deletedItems = Object.values(previousItems)
417+
const deletedItems: any[] = Object.values(previousItems)
418418
.filter((i: any) => !(itemNameMap as any)[i.id])
419419
.filter(notEmpty);
420420

421421
messages.push(`New Items: ${moidLink(newItems)}.`);
422422
messages.push(`Deleted Items: ${moidLink(deletedItems)}.`);
423+
const sql = `SELECT
424+
${deletedItems
425+
.map(
426+
item => `COUNT(*) FILTER (WHERE bank->>'${item.id}' IS NOT NULL) AS people_with_item_${item.id},
427+
SUM((bank->>'${item.id}')::int) AS sum_item_${item.id},`
428+
)
429+
.join('\n')}
430+
431+
FROM users;
432+
`;
433+
messages.push(`${sql}`);
423434

424435
messages.push(
425436
`Major price changes NOT changed: ${majorPriceChanges

src/data/items/item_data.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -224964,18 +224964,6 @@
224964224964
"wiki_url": "https://oldschool.runescape.wiki/w/Mysterious_crushed_meat",
224965224965
"price": 0
224966224966
},
224967-
"22405": {
224968-
"id": 22405,
224969-
"name": "Vial of blood",
224970-
"members": true,
224971-
"cost": 100,
224972-
"weight": 0.02,
224973-
"release_date": "2018-05-24",
224974-
"examine": "A glass vial containing some blood. Yuck.",
224975-
"wiki_name": "Vial of blood (A Taste of Hope)",
224976-
"wiki_url": "https://oldschool.runescape.wiki/w/Vial_of_blood_(A_Taste_of_Hope)",
224977-
"price": 0
224978-
},
224979224967
"22406": {
224980224968
"id": 22406,
224981224969
"name": "Unfinished blood potion",

src/simulation/monsters/low/g-m/LavaDragon.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export const LavaDragonTable = new LootTable()
5151

5252
/* Tertiary */
5353
.tertiary(250, 'Clue scroll (elite)')
54-
.tertiary(10_000, 'Draconic visage');
54+
.tertiary(10_000, 'Draconic visage')
55+
.tertiary(18, 'Ensouled dragon head');
5556

5657
export default new SimpleMonster({
5758
id: 6593,

src/structures/Items.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ export interface ItemCollection {
1616
export const USELESS_ITEMS = [
1717
617, 8890, 6964, 2513, 19_492, 11_071, 11_068, 21_284, 24_735, 21_913, 4703, 4561, 2425, 4692, 3741,
1818

19+
// Quest blood vial
20+
22_405,
21+
1922
// Pharaoh's sceptres
2023
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,
2124
26_950, 26_945,

test/Items.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ describe('Items', () => {
102102
expect(coins.id).toBe(995);
103103
expect(coins.price).toEqual(1);
104104
expect(Items.get('Snowy knight')!.price).toEqual(0);
105+
106+
expect(Items.get('Vial of blood')!.id).toEqual(22_446);
105107
},
106108
60_000
107109
);

0 commit comments

Comments
 (0)