mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-15 05:37:22 +01:00
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:
committed by
Sabe Jones
parent
7cff331800
commit
9c9b67aa9d
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user