From 66aebf2e8002d48cbcea1bf21322aba2c5c11128 Mon Sep 17 00:00:00 2001 From: Alice Harris Date: Tue, 25 Nov 2014 05:16:36 +1000 Subject: [PATCH] make Gold=>Gem conversion cap message more accurate in terms of when to wait until - fixes https://github.com/HabitRPG/habitrpg/issues/3996 --- script/index.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/index.coffee b/script/index.coffee index 3bb61d2993..89a4b8ffeb 100644 --- a/script/index.coffee +++ b/script/index.coffee @@ -697,7 +697,7 @@ api.wrap = (user, main=true) -> {convRate,convCap} = api.planGemLimits return cb?({code:401,message:"Must subscribe to purchase gems with GP"},req) unless user.purchased?.plan?.planId 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, please wait until the beginning of next month."}) if user.purchased.plan.gemsBought >= convCap + 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 user.purchased.plan.gemsBought++ user.stats.gp -= convRate