over-purchase warning for Gryphon eggs now ignore Royal Purple pets a… (#13121)

* over-purchase warning for Gryphon eggs now ignore Royal Purple pets and mounts

* fixed casing with potion name
This commit is contained in:
Ilenia
2021-04-29 21:18:13 +02:00
committed by GitHub
parent 6d28029a5f
commit fea39e7c9b
@@ -539,6 +539,7 @@ export default {
const ownedPets = reduce(this.user.items.pets, (sum, petValue, petKey) => {
if (petKey.includes(this.item.key) && petValue > 0
&& !petKey.includes('JackOLantern') // Jack-O-Lantern has "Ghost" version
&& !petKey.includes('RoyalPurple') // to avoid counting Royal Purple Gryphons for gryphon eggs
) return sum + 1;
return sum;
}, 0);
@@ -546,6 +547,7 @@ export default {
const ownedMounts = reduce(this.user.items.mounts, (sum, mountValue, mountKey) => {
if (mountKey.includes(this.item.key) && mountValue === true
&& !mountKey.includes('JackOLantern')
&& !mountKey.includes('RoyalPurple')
) return sum + 1;
return sum;
}, 0);