Skip to content

Commit 49c163c

Browse files
committed
Fix: tries to draw bso items from osb spritesheet
1 parent 339a114 commit 49c163c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/lib/bankImage.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,16 @@ export class BankImageTask {
463463
}
464464
}
465465

466-
const data = this.spriteSheetData[itemID];
466+
const data = this.spriteSheetData[itemID] ?? this.bsoSpriteSheetData[itemID];
467467
if (data) {
468468
const [sX, sY, width, height] = data;
469-
const image = await getClippedRegionImage(this.spriteSheetImage, sX, sY, width, height);
469+
const image = await getClippedRegionImage(
470+
this.spriteSheetData[itemID] ? this.spriteSheetImage : this.bsoSpriteSheetImage,
471+
sX,
472+
sY,
473+
width,
474+
height
475+
);
470476
return image;
471477
}
472478

0 commit comments

Comments
 (0)