Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ui/core/proto_utils/action_id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down Expand Up @@ -1020,3 +1020,5 @@ export const buffAuraToSpellIdMap: Record<number, ActionId> = {
96229: ActionId.fromSpellId(82174), // Synapse Springs - Str
96230: ActionId.fromSpellId(82174), // Synapse Springs - Int
};

export const mopItemsOverrides = [248747, 248748, 248749, 248750, 248751, 248752]
3 changes: 1 addition & 2 deletions ui/core/proto_utils/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
ConsumableType,
EquipmentSpec,
GemColor,
ItemLevelState,
ItemRandomSuffix,
ItemSlot,
ItemSpec,
Expand Down Expand Up @@ -347,7 +346,7 @@ export class Database {

static async getItemIconData(itemId: number, options: { signal?: AbortSignal } = {}): Promise<IconData> {
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 });
Expand Down
5 changes: 5 additions & 0 deletions ui/core/wowhead.ts
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -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());
Expand Down
Loading