feat(pets): Peppermint Hatching Potions

Also fixes an issue where the pet hatching modal would appear when the user attempted to hatch a premium version of a quest pet.
This commit is contained in:
Sabe Jones
2015-12-04 17:20:33 -05:00
parent a3665e7095
commit 0f578b79ff
45 changed files with 3317 additions and 3108 deletions

View File

@@ -115,11 +115,12 @@ habitrpg.controller("InventoryCtrl",
var potName = Content.hatchingPotions[potion.key].text();
if (!$window.confirm(window.env.t('hatchAPot', {potion: potName, egg: eggName}))) return;
var userHasPet = user.items.pets[egg.key + '-' + potion.key] > 0;
var invalidPet = (user.items.pets[egg.key + '-' + potion.key] > 0) ||
(Content.hatchingPotions[potion.key].premium && !Content.dropEggs[egg.key])
user.ops.hatch({params:{egg:egg.key, hatchingPotion:potion.key}});
if (!user.preferences.suppressModals.hatchPet && !userHasPet) {
if (!user.preferences.suppressModals.hatchPet && !invalidPet) {
$scope.hatchedPet = {
egg: eggName,
potion: potName,