diff --git a/packages/core/src/datamanager.ts b/packages/core/src/datamanager.ts index bac24360..76608404 100644 --- a/packages/core/src/datamanager.ts +++ b/packages/core/src/datamanager.ts @@ -173,7 +173,7 @@ export class DataManager implements DataManagerIntf { sheet: 'Item', columns: [ // Basic item properties - 'ID', 'Icon', 'Name', 'LevelItem', + 'ID', 'IconID', 'Name', 'LevelItem', // Equip slot restrictions 'ClassJobCategory', 'EquipSlotCategory', 'IsUnique', // Stats diff --git a/packages/core/src/gear.ts b/packages/core/src/gear.ts index 2fb9caec..e0412b64 100644 --- a/packages/core/src/gear.ts +++ b/packages/core/src/gear.ts @@ -734,7 +734,7 @@ export class XivApiGearInfo implements GearItem { this.id = data['ID']; this.name = data['Name']; this.ilvl = data['LevelItem']; - this.iconUrl = xivApiIcon(data['Icon']); + this.iconUrl = new URL(xivApiIconUrl(data['IconID'], true)); this.Stats = data['Stats'] ? data['Stats'] : []; const eqs = data['EquipSlotCategory']; if (!eqs) { @@ -1106,7 +1106,7 @@ export function processRawMateriaInfo(data: object): Materia[] { out.push({ name: itemName, id: itemId, - iconUrl: new URL(xivApiIconUrl(itemFields['Icon']['id'])), + iconUrl: new URL(xivApiIconUrl(itemFields['Icon']['id'], true)), stats: stats, primaryStat: stat, primaryStatValue: stats[stat], diff --git a/packages/core/src/test/datamanager_tests.ts b/packages/core/src/test/datamanager_tests.ts index 3c370f92..d49e8191 100644 --- a/packages/core/src/test/datamanager_tests.ts +++ b/packages/core/src/test/datamanager_tests.ts @@ -20,7 +20,7 @@ describe('Datamanager', () => { eq(codexOfAscension.id, 40176); eq(codexOfAscension.name, 'Codex of Ascension'); // TODO: fix the extra / ? - eq(codexOfAscension.iconUrl.toString(), 'https://xivapi.com//i/033000/033387_hr1.png'); + eq(codexOfAscension.iconUrl.toString(), 'https://beta.xivapi.com/api/1/asset/ui/icon/033000/033387_hr1.tex?format=png'); // XivCombatItem props deq(codexOfAscension.stats, new RawStats({