diff --git a/dist/habitrpg-shared.js b/dist/habitrpg-shared.js index 985d2663da..20b666a900 100644 --- a/dist/habitrpg-shared.js +++ b/dist/habitrpg-shared.js @@ -15067,7 +15067,7 @@ api.wrap = function(user, main) { if (type === 'gems' && key === 'gem') { _ref1 = api.planGemLimits, convRate = _ref1.convRate, convCap = _ref1.convCap; convCap += user.purchased.plan.consecutive.gemCapExtra; - if (!((_ref2 = user.purchased) != null ? (_ref3 = _ref2.plan) != null ? _ref3.planId : void 0 : void 0)) { + if (!((_ref2 = user.purchased) != null ? (_ref3 = _ref2.plan) != null ? _ref3.customerId : void 0 : void 0)) { return typeof cb === "function" ? cb({ code: 401, message: "Must subscribe to purchase gems with GP" diff --git a/script/index.coffee b/script/index.coffee index 7e485f8a8b..91010b3c00 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -696,7 +696,7 @@ api.wrap = (user, main=true) -> if type is 'gems' and key is 'gem' {convRate, convCap} = api.planGemLimits convCap += user.purchased.plan.consecutive.gemCapExtra - return cb?({code:401,message:"Must subscribe to purchase gems with GP"},req) unless user.purchased?.plan?.planId + return cb?({code:401,message:"Must subscribe to purchase gems with GP"},req) unless user.purchased?.plan?.customerId return cb?({code:401,message:"Not enough Gold"}) unless user.stats.gp >= convRate return cb?({code:401,message:"You've reached the Gold=>Gem conversion cap (#{convCap}) for this month. We have this to prevent abuse / farming. The cap will reset within the first three days of next month."}) if user.purchased.plan.gemsBought >= convCap user.balance += .25