diff --git a/ui/core/proto_utils/action_id.ts b/ui/core/proto_utils/action_id.ts index 4de58eb2b9..c6f941c1fb 100644 --- a/ui/core/proto_utils/action_id.ts +++ b/ui/core/proto_utils/action_id.ts @@ -165,7 +165,7 @@ export class ActionId { static makeItemUrl(id: number, randomSuffixId?: number, reforgeId?: number): string { const langPrefix = getWowheadLanguagePrefix(); - const url = new URL(`https://wowhead.com/cata/${langPrefix}item=${id}`); + const url = mopItemsOverrides.includes(id) ? new URL(`https://wowhead.com/mop-classic/${langPrefix}item=${id}`) : new URL(`https://wowhead.com/cata/${langPrefix}item=${id}`); url.searchParams.set('level', String(CHARACTER_LEVEL)); url.searchParams.set('rand', String(randomSuffixId || 0)); if (reforgeId) url.searchParams.set('forg', String(reforgeId)); @@ -1020,3 +1020,5 @@ export const buffAuraToSpellIdMap: Record = { 96229: ActionId.fromSpellId(82174), // Synapse Springs - Str 96230: ActionId.fromSpellId(82174), // Synapse Springs - Int }; + +export const mopItemsOverrides = [248747, 248748, 248749, 248750, 248751, 248752] \ No newline at end of file diff --git a/ui/core/proto_utils/database.ts b/ui/core/proto_utils/database.ts index c57c9bd567..a2d62d3dbc 100644 --- a/ui/core/proto_utils/database.ts +++ b/ui/core/proto_utils/database.ts @@ -4,7 +4,6 @@ import { ConsumableType, EquipmentSpec, GemColor, - ItemLevelState, ItemRandomSuffix, ItemSlot, ItemSpec, @@ -347,7 +346,7 @@ export class Database { static async getItemIconData(itemId: number, options: { signal?: AbortSignal } = {}): Promise { const db = await Database.get({ signal: options?.signal }); - const data = await db.spellIcons[itemId]; + const data = await db.itemIcons[itemId]; if (!data?.icon) { db.itemIcons[itemId] = Database.getWowheadItemTooltipData(itemId, { signal: options?.signal }); diff --git a/ui/core/wowhead.ts b/ui/core/wowhead.ts index 87e520d23e..d9e3671149 100644 --- a/ui/core/wowhead.ts +++ b/ui/core/wowhead.ts @@ -1,5 +1,6 @@ import { getLanguageCode } from './constants/lang'; import { CHARACTER_LEVEL } from './constants/mechanics'; +import { mopItemsOverrides } from './proto_utils/action_id'; import { Database } from './proto_utils/database'; export type WowheadTooltipItemParams = { @@ -125,6 +126,10 @@ export const buildWowheadTooltipDataset = async (options: WowheadTooltipItemPara if (options.transmogId) { params.set('transmog', String(options.transmogId)); } + //wowhead does not have the midsummer items on their cata site. Currently only on the mop site + if (mopItemsOverrides.includes(options.itemId)) { + params.set('domain', `${langPrefix}mop-classic`); + } } return decodeURIComponent(params.toString());