mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-18 03:52:54 +00:00
Merge pull request #370 from Alys/gem-cap-message-2014-11-25
make Gold=>Gem conversion cap message more accurate in terms of when to wait until - fixes https://github.com/HabitRPG/habitrpg/issues/3996
This commit is contained in:
commit
0a4dc94474
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue