From 0a6b22fdd9d6fe717e0ba6f9525e64e6edc68a2e Mon Sep 17 00:00:00 2001 From: Sabe Jones Date: Fri, 25 Sep 2020 14:45:56 -0500 Subject: [PATCH] fix(potions): erroneous Ghost overbuy warnings --- website/client/src/components/shops/buyModal.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/website/client/src/components/shops/buyModal.vue b/website/client/src/components/shops/buyModal.vue index 65a0393199..532b170a19 100644 --- a/website/client/src/components/shops/buyModal.vue +++ b/website/client/src/components/shops/buyModal.vue @@ -554,12 +554,16 @@ export default { } const ownedPets = reduce(this.user.items.pets, (sum, petValue, petKey) => { - if (petKey.includes(this.item.key) && petValue > 0) return sum + 1; + if (petKey.includes(this.item.key) && petValue > 0 + && !petKey.includes('JackOLantern') // Jack-O-Lantern has "Ghost" version + ) return sum + 1; return sum; }, 0); const ownedMounts = reduce(this.user.items.mounts, (sum, mountValue, mountKey) => { - if (mountKey.includes(this.item.key) && mountValue === true) return sum + 1; + if (mountKey.includes(this.item.key) && mountValue === true + && !mountKey.includes('JackOLantern') + ) return sum + 1; return sum; }, 0);