Skip to content

Commit

Permalink
fix: bundle Ringmaster icon missing from legacy CDN
Browse files Browse the repository at this point in the history
  • Loading branch information
timkurvers committed Aug 31, 2024
1 parent 937d9a8 commit 84e0bc7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Binary file added public/images/heroes/ringmaster_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 8 additions & 7 deletions src/lib/resources.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,13 @@ const MISSING_ABILITY_RESOURCES = [
'warpine_raider_seed_shot',
];

const MISSING_HERO_RESOURCES = [
'dawnbreaker',
'marci',
'muerta',
'primal_beast',
];
const MISSING_HERO_RESOURCES = {
dawnbreaker: ['portrait', 'landscape', 'icon'],
marci: ['portrait', 'icon'],
muerta: ['portrait', 'icon'],
primal_beast: ['portrait', 'icon'],
ringmaster: ['icon'],
};

const KNOWN_DUMMY_UNITS = [
'npc_dota_base_additive',
Expand Down Expand Up @@ -84,7 +85,7 @@ export const heroResourceFor = (refname, variant) => {

// Various new heroes lack portrait and low-bandwidth images on legacy CDN so use bundled
let base = CDN_BASE_URL;
if (MISSING_HERO_RESOURCES.includes(heroname)) {
if (MISSING_HERO_RESOURCES[heroname]?.includes(variant)) {
base = BUNDLED_BASE_URL;
}
return `${base}/heroes/${heroname}${suffix}`;
Expand Down

0 comments on commit 84e0bc7

Please sign in to comment.