Keys kennel fixes (#9848)

* Show keys to pets immediately

* Ensured keys to pets dissapear after use

* Added resdirect to stable after purchase

* Added mount check and updated keys to mounts and to both

* Added api calls

* Added check for beastmaster progress

* Added mount check for release mounts. Added pets and mount check to release both

* Added actions

* Added catch to common tests

* Added beast count and reload

* Removed extra console log
This commit is contained in:
Keith Holliday
2018-03-02 14:30:11 -07:00
committed by Sabe Jones
parent 7cff331800
commit 9c9b67aa9d
14 changed files with 174 additions and 50 deletions

View File

@@ -1,4 +1,5 @@
import content from '../content/index';
import {beastMasterProgress} from '../count';
import i18n from '../i18n';
import {
NotAuthorized,
@@ -9,6 +10,10 @@ module.exports = function releasePets (user, req = {}, analytics) {
throw new NotAuthorized(i18n.t('notEnoughGems', req.language));
}
if (beastMasterProgress(user.items.pets) !== 90) {
throw new NotAuthorized(i18n.t('notEnoughPets', req.language));
}
user.balance -= 1;
let giveBeastMasterAchievement = true;