From 9ad1ef2ca0e1fa4789b40c17f5a2df8b0eb4a849 Mon Sep 17 00:00:00 2001 From: Domingos Martins Date: Sun, 8 Nov 2026 10:31:33 -0300 Subject: [PATCH] Fix the "Destory" set and "Guardian Shiled" item names Webzen's item table spells the Destroy set "Destory" and the shield 6/20 "Guardian Shiled", and the player reads both on screen. - ItemName and tools/Item.txt use the right spelling. - The English, Portuguese and Spanish packs get name fixes for the set (8..11/47) through the existing itemNames mechanism; English also fixes 6/20. English and Portuguese layers now carry itemNames. - Tests check every fixed name lands on a record of each shipped pack and leaves no "Destory"/"Shiled" behind. The item and text goldens are updated on purpose (only en and pt text hashes change). --- src/i18n/english.ts | 3 +- src/i18n/itemNames.test.ts | 27 +++++++++++++++++- src/i18n/itemNames.ts | 28 +++++++++++++++++++ src/i18n/portuguese.ts | 2 ++ src/i18n/text.golden.test.ts | 4 +-- tools/Item.txt | 10 +++---- versions/shared/items/armors/destory_armor.ts | 2 +- versions/shared/items/boots/destory_boots.ts | 2 +- .../shared/items/gloves/destory_gloves.ts | 2 +- versions/shared/items/items.golden.test.ts | 2 +- versions/shared/items/pants/destory_pants.ts | 2 +- .../shared/items/shields/guardian_shiled.ts | 2 +- 12 files changed, 71 insertions(+), 15 deletions(-) diff --git a/src/i18n/english.ts b/src/i18n/english.ts index e5e336f5b..93034919e 100644 --- a/src/i18n/english.ts +++ b/src/i18n/english.ts @@ -6,6 +6,7 @@ */ import type { LanguageLayer } from './layer'; +import { ENGLISH_ITEM_NAMES } from './itemNames'; export const englishLayer: LanguageLayer = { name: 'english', @@ -13,5 +14,5 @@ export const englishLayer: LanguageLayer = { aliases: ['en-US', 'en-GB', 'en-AU', 'en-CA'], label: 'English', region: 'GB', - dataPack: { folder: 'Eng', suffix: 'eng' }, + dataPack: { folder: 'Eng', suffix: 'eng', itemNames: ENGLISH_ITEM_NAMES }, }; diff --git a/src/i18n/itemNames.test.ts b/src/i18n/itemNames.test.ts index a5673c489..63bf6220f 100644 --- a/src/i18n/itemNames.test.ts +++ b/src/i18n/itemNames.test.ts @@ -1,7 +1,9 @@ import { existsSync, readFileSync } from 'fs'; import { beforeEach, describe, expect, it } from 'vitest'; import { i18n } from './index'; -import { SPANISH_ITEM_NAMES } from './itemNames'; +import { ENGLISH_ITEM_NAMES, PORTUGUESE_ITEM_NAMES, SPANISH_ITEM_NAMES } from './itemNames'; +import { englishLayer } from './english'; +import { portugueseLayer } from './portuguese'; import { spanishLayer } from './spanish'; import { localisedItemName, parseItemNames } from '../controllers/assets/mu/itemNameFile'; @@ -68,3 +70,26 @@ describe('Spanish item names', () => { expect(localisedItemName(15, 0)).toBe('Pergamino de Veneno'); }); }); + +describe('the Destroy set and the Guardian Shield', () => { + const packs = [ + ['Eng', 'item_eng.bmd', ENGLISH_ITEM_NAMES, englishLayer], + ['Por', 'item_por.bmd', PORTUGUESE_ITEM_NAMES, portugueseLayer], + ['Spn', 'item_spn.bmd', SPANISH_ITEM_NAMES, spanishLayer], + ] as const; + + for (const [folder, file, fixes, layer] of packs) { + const url = new URL(`../../Data/Local/${folder}/${file}`, import.meta.url); + + it(`${folder}: is wired into the layer`, () => { + expect(layer.dataPack?.itemNames).toBe(fixes); + }); + + it.skipIf(!existsSync(url))(`${folder}: no name is spelled "Destory" or "Shiled" once fixed`, () => { + const names = parseItemNames(new Uint8Array(readFileSync(url))); + for (const [key, name] of Object.entries(fixes)) names.set(code(key), name); + const left = [...names.values()].filter(name => /Destory|Shiled/i.test(name)); + expect(left).toEqual([]); + }); + } +}); diff --git a/src/i18n/itemNames.ts b/src/i18n/itemNames.ts index 478416173..4795d8db1 100644 --- a/src/i18n/itemNames.ts +++ b/src/i18n/itemNames.ts @@ -112,4 +112,32 @@ export const SPANISH_ITEM_NAMES: ItemNameFixes = { '9/53': 'Pantalones de la Reina', '10/53': 'Guantes de la Reina', '11/53': 'Botas de la Reina', + + // --- typo in the pack --------------------------------------------------- + // The pack spells the set "Destory"; it is Destroy. + '8/47': 'Destroy Armor', + '9/47': 'Destroy Pants', + '10/47': 'Destroy Gloves', + '11/47': 'Destroy Boots', +}; + +// ---- Portuguese (`Data/Local/Por`) ----------------------------------------- + +export const PORTUGUESE_ITEM_NAMES: ItemNameFixes = { + // The pack spells the set "Destory"; it is Destroy. + '8/47': 'Destroy Armor', + '9/47': 'Destroy Pants', + '10/47': 'Destroy Gloves', + '11/47': 'Destroy Boots', +}; + +// ---- English (`Data/Local/Eng`) -------------------------------------------- + +export const ENGLISH_ITEM_NAMES: ItemNameFixes = { + // The pack spells the set "Destory"; it is Destroy. + '8/47': 'Destroy Armor', + '9/47': 'Destroy Pants', + '10/47': 'Destroy Gloves', + '11/47': 'Destroy Boots', + '6/20': 'Guardian Shield', }; diff --git a/src/i18n/portuguese.ts b/src/i18n/portuguese.ts index 5adfa7367..2e9138e43 100644 --- a/src/i18n/portuguese.ts +++ b/src/i18n/portuguese.ts @@ -6,6 +6,7 @@ import type { LanguageLayer } from './layer'; import { PORTUGUESE_PACK_REPAIRS } from './packRepairs'; +import { PORTUGUESE_ITEM_NAMES } from './itemNames'; import { PORTUGUESE_DIALOG_PAGES } from './dialogPages'; export const portugueseLayer: LanguageLayer = { @@ -21,6 +22,7 @@ export const portugueseLayer: LanguageLayer = { suffix: 'por', encoding: 'windows-1252', repairs: PORTUGUESE_PACK_REPAIRS, + itemNames: PORTUGUESE_ITEM_NAMES, dialogPages: PORTUGUESE_DIALOG_PAGES, }, }; diff --git a/src/i18n/text.golden.test.ts b/src/i18n/text.golden.test.ts index 79c9a5edd..2ce968a3f 100644 --- a/src/i18n/text.golden.test.ts +++ b/src/i18n/text.golden.test.ts @@ -35,7 +35,7 @@ describe('text golden', () => { expect(KEYS.length).toBe(2640); expect(hashes).toEqual({ - en: '544ced3d91139801', + en: '1b38c602d1ff9e2b', bg: 'd194a222bfa64797', zh: '7648439d402221ae', fr: '9250ef047d39ae17', @@ -44,7 +44,7 @@ describe('text golden', () => { ja: '135032b994caaedb', ko: 'e146b1e309cb8764', pl: 'ab1b7bfe910457e2', - pt: '819a0071da3588f5', + pt: '8ab4168985f923c7', ro: '37b74292d7196cab', ru: 'ed68556919de2831', es: 'fd92ec6a364869ec', diff --git a/tools/Item.txt b/tools/Item.txt index 32c5644d9..1a7a6e1eb 100644 --- a/tools/Item.txt +++ b/tools/Item.txt @@ -176,7 +176,7 @@ end 17 1 18 2 2 1 1 1 "Crimson Glory Shield" 104 19 90 51 380 95 48 0 0 0 4 0 2 0 0 0 0 18 1 18 2 2 1 1 1 "Salamander Shield" 102 20 96 51 380 80 61 0 0 0 4 0 0 0 1 0 0 19 1 0 2 2 1 1 1 "Frost Barrier Shield" 99 14 58 51 380 26 53 26 0 0 4 0 0 2 0 0 0 -20 1 18 2 2 1 1 1 "Guardian Shiled" 106 12 30 51 380 54 18 0 0 0 4 2 0 0 0 0 0 +20 1 18 2 2 1 1 1 "Guardian Shield" 106 12 30 51 380 54 18 0 0 0 4 2 0 0 0 0 0 21 1 18 2 2 1 1 1 "Cross Shield" 70 16 75 65 0 140 55 0 0 0 4 0 0 0 0 1 0 end @@ -282,7 +282,7 @@ end 44 3 0 2 2 1 1 1 "Lilium Armor" 113 71 0 84 0 110 50 0 0 0 0 2 0 0 0 0 2 45 3 0 2 3 1 1 1 "Titan Armor" 132 81 0 86 380 222 32 0 0 0 0 0 1 0 0 0 0 46 3 0 2 3 1 1 1 "Brave Armor" 128 62 0 86 380 74 162 0 0 0 0 0 1 0 0 0 0 -47 3 0 2 3 1 1 1 "Destory Armor" 131 80 0 86 380 212 57 0 0 0 0 0 0 0 1 0 0 +47 3 0 2 3 1 1 1 "Destroy Armor" 131 80 0 86 380 212 57 0 0 0 0 0 0 0 1 0 0 48 3 0 2 3 1 1 1 "Phantom Armor" 125 66 0 86 380 62 19 165 0 0 0 0 0 0 1 0 0 49 3 0 2 2 1 1 1 "Seraphim Armor" 129 60 0 86 380 55 197 0 0 0 0 0 0 1 0 0 0 50 3 0 2 2 1 1 1 "Faith Armor" 122 52 0 86 380 32 29 138 0 0 0 0 0 1 0 0 0 @@ -341,7 +341,7 @@ end 44 4 0 2 2 1 1 1 "Lilium Pants" 120 52 0 82 0 75 30 0 0 0 0 2 0 0 0 0 2 45 4 0 2 2 1 1 1 "Titan Pants" 116 74 0 86 380 222 32 0 0 0 0 0 1 0 0 0 0 46 4 0 2 2 1 1 1 "Brave Pants" 112 58 0 86 380 74 162 0 0 0 0 0 1 0 0 0 0 -47 4 0 2 2 1 1 1 "Destory Pants" 115 66 0 86 380 212 57 0 0 0 0 0 0 0 1 0 0 +47 4 0 2 2 1 1 1 "Destroy Pants" 115 66 0 86 380 212 57 0 0 0 0 0 0 0 1 0 0 48 4 0 2 2 1 1 1 "Phantom Pants" 113 51 0 86 380 62 19 165 0 0 0 0 0 0 1 0 0 49 4 0 2 2 1 1 1 "Seraphim Pants" 116 53 0 86 380 55 197 0 0 0 0 0 0 1 0 0 0 50 4 0 2 2 1 1 1 "Faith Pants" 109 46 0 86 380 32 29 138 0 0 0 0 0 1 0 0 0 @@ -400,7 +400,7 @@ end 44 5 0 2 2 1 1 1 "Lilium Gloves" 82 45 7 80 0 75 20 0 0 0 0 2 0 0 0 0 2 45 5 0 2 2 1 1 1 "Titan Gloves" 100 56 7 86 380 222 32 0 0 0 0 0 1 0 0 0 0 46 5 0 2 2 1 1 1 "Brave Gloves" 97 42 7 86 380 74 162 0 0 0 0 0 1 0 0 0 0 -47 5 0 2 2 1 1 1 "Destory Gloves" 101 49 7 86 380 212 57 0 0 0 0 0 0 0 1 0 0 +47 5 0 2 2 1 1 1 "Destroy Gloves" 101 49 7 86 380 212 57 0 0 0 0 0 0 0 1 0 0 48 5 0 2 2 1 1 1 "Phantom Gloves" 99 40 7 86 380 62 19 165 0 0 0 0 0 0 1 0 0 49 5 0 2 2 1 1 1 "Seraphim Gloves" 100 43 7 86 380 55 197 0 0 0 0 0 0 1 0 0 0 50 5 0 2 2 1 1 1 "Faith Gloves" 95 36 7 86 380 32 29 138 0 0 0 0 0 1 0 0 0 @@ -459,7 +459,7 @@ end 44 6 0 2 2 1 1 1 "Lilium Boots" 90 50 0 85 0 150 30 0 0 0 0 2 0 0 0 0 2 45 6 0 2 2 1 1 1 "Titan Boots" 96 57 0 86 380 222 32 0 0 0 0 0 1 0 0 0 0 46 6 0 2 2 1 1 1 "Brave Boots" 93 45 0 86 380 74 162 0 0 0 0 0 1 0 0 0 0 -47 6 0 2 2 1 1 1 "Destory Boots" 97 54 0 86 380 212 57 0 0 0 0 0 0 0 1 0 0 +47 6 0 2 2 1 1 1 "Destroy Boots" 97 54 0 86 380 212 57 0 0 0 0 0 0 0 1 0 0 48 6 0 2 2 1 1 1 "Phantom Boots" 94 44 0 86 380 62 19 165 0 0 0 0 0 0 1 0 0 49 6 0 2 2 1 1 1 "Seraphim Boots" 97 42 0 86 380 55 197 0 0 0 0 0 0 1 0 0 0 50 6 0 2 2 1 1 1 "Faith Boots" 92 35 0 86 380 32 29 138 0 0 0 0 0 1 0 0 0 diff --git a/versions/shared/items/armors/destory_armor.ts b/versions/shared/items/armors/destory_armor.ts index 46269b4d9..393c0143e 100644 --- a/versions/shared/items/armors/destory_armor.ts +++ b/versions/shared/items/armors/destory_armor.ts @@ -10,7 +10,7 @@ export default defineItem({ Serial: 1, Opt: 1, Drop: 1, - ItemName: 'Destory Armor', + ItemName: 'Destroy Armor', ItemLvl: 131, Def: 80, DefRate: 0, diff --git a/versions/shared/items/boots/destory_boots.ts b/versions/shared/items/boots/destory_boots.ts index 50f920b6b..4a85cae00 100644 --- a/versions/shared/items/boots/destory_boots.ts +++ b/versions/shared/items/boots/destory_boots.ts @@ -10,7 +10,7 @@ export default defineItem({ Serial: 1, Opt: 1, Drop: 1, - ItemName: 'Destory Boots', + ItemName: 'Destroy Boots', ItemLvl: 97, Def: 54, DefRate: 0, diff --git a/versions/shared/items/gloves/destory_gloves.ts b/versions/shared/items/gloves/destory_gloves.ts index 734abcd8c..02e9b88eb 100644 --- a/versions/shared/items/gloves/destory_gloves.ts +++ b/versions/shared/items/gloves/destory_gloves.ts @@ -10,7 +10,7 @@ export default defineItem({ Serial: 1, Opt: 1, Drop: 1, - ItemName: 'Destory Gloves', + ItemName: 'Destroy Gloves', ItemLvl: 101, Def: 49, DefRate: 7, diff --git a/versions/shared/items/items.golden.test.ts b/versions/shared/items/items.golden.test.ts index f0260ec27..bce69939d 100644 --- a/versions/shared/items/items.golden.test.ts +++ b/versions/shared/items/items.golden.test.ts @@ -6,7 +6,7 @@ import { items } from './all'; * The item files are the old items.json split one per item. This hash is that table's, in (group, index) * order, so any change to an item's data shows here: update it on purpose, in the same commit. */ -const ITEMS_HASH = '3fead1832bf8437df8dbd5a9ed4c3ce3369bb5a608ba3d4ae7d1bee8b210d19d'; +const ITEMS_HASH = 'd4b6964dfa165889bd0ce9826a40fd3987cdbf08c2ec49ac249f6cb3a9562e93'; describe('item files', () => { it('hold every item, unchanged', () => { diff --git a/versions/shared/items/pants/destory_pants.ts b/versions/shared/items/pants/destory_pants.ts index 541a1fa6e..d518aa576 100644 --- a/versions/shared/items/pants/destory_pants.ts +++ b/versions/shared/items/pants/destory_pants.ts @@ -10,7 +10,7 @@ export default defineItem({ Serial: 1, Opt: 1, Drop: 1, - ItemName: 'Destory Pants', + ItemName: 'Destroy Pants', ItemLvl: 115, Def: 66, DefRate: 0, diff --git a/versions/shared/items/shields/guardian_shiled.ts b/versions/shared/items/shields/guardian_shiled.ts index cb1ac9a0b..f733e38e2 100644 --- a/versions/shared/items/shields/guardian_shiled.ts +++ b/versions/shared/items/shields/guardian_shiled.ts @@ -10,7 +10,7 @@ export default defineItem({ Serial: 1, Opt: 1, Drop: 1, - ItemName: 'Guardian Shiled', + ItemName: 'Guardian Shield', ItemLvl: 106, Def: 12, DefRate: 30,