From 113670a305f021152d33f338a9bc20110fbac606 Mon Sep 17 00:00:00 2001 From: ArcaneDisgea <39720490+ArcaneDisgea@users.noreply.github.com> Date: Sun, 30 May 2021 10:07:03 -0400 Subject: [PATCH] fix for blu bug --- create-card.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/create-card.js b/create-card.js index 5318e47..aa8b1cc 100644 --- a/create-card.js +++ b/create-card.js @@ -293,7 +293,12 @@ class CardCreator { // Name, Title, Server Rect ctx.fillRect(25, 10, 840, 100); - ctx.drawImage(this.imgJobBg[data.Character.ActiveClassJob.UnlockedState.ID], 450, 4, rectFullWidth, 110); + // BLU returns a null UnlockedState.ID so we can't use it to pick the job image. + if (data.Character.ActiveClassJob.UnlockedState.ID != null) { + ctx.drawImage(this.imgJobBg[data.Character.ActiveClassJob.UnlockedState.ID], 450, 4, rectFullWidth, 110); + } else { + ctx.drawImage(this.imgJobBg[36], 450, 4, rectFullWidth, 110); + } ctx.fillRect(rectStartX, rectStartRow2Y, rectHalfWidth, rectHeightRow2); ctx.fillRect(rectStartXHalf, rectStartRow2Y, rectHalfWidth, rectHeightRow2);