Skip to content

Commit

Permalink
Fix item icon
Browse files Browse the repository at this point in the history
  • Loading branch information
xpdota committed Jun 27, 2024
1 parent b724c19 commit 1efcafd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/datamanager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/gear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/test/datamanager_tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 1efcafd

Please sign in to comment.