Fix crash related to fusion sprites
parent
d9a685611d
commit
9b03d6f8d3
|
@ -2043,7 +2043,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
for (let f = 0; f < 2; f++) {
|
||||
const variantColors = variantColorCache[!f ? spriteKey : backSpriteKey];
|
||||
let variantColorSet = new Map<integer, integer[]>();
|
||||
if (variantColors) {
|
||||
if (this.shiny && variantColors && variantColors[this.variant]) {
|
||||
Object.keys(variantColors[this.variant]).forEach(k => {
|
||||
variantColorSet.set(Utils.rgbaToInt(Array.from(Object.values(Utils.rgbHexToRgba(k)))), Array.from(Object.values(Utils.rgbHexToRgba(variantColors[this.variant][k]))));
|
||||
});
|
||||
|
@ -2082,7 +2082,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||
for (let f = 0; f < 2; f++) {
|
||||
const variantColors = variantColorCache[!f ? fusionSpriteKey : fusionBackSpriteKey];
|
||||
let variantColorSet = new Map<integer, integer[]>();
|
||||
if (variantColors) {
|
||||
if (this.fusionShiny && variantColors && variantColors[this.fusionVariant]) {
|
||||
Object.keys(variantColors[this.fusionVariant]).forEach(k => {
|
||||
variantColorSet.set(Utils.rgbaToInt(Array.from(Object.values(Utils.rgbHexToRgba(k)))), Array.from(Object.values(Utils.rgbHexToRgba(variantColors[this.fusionVariant][k]))));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue