mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
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:
parent
d01b4291af
commit
66aebf2e80
1 changed files with 1 additions and 1 deletions
|
|
@ -697,7 +697,7 @@ api.wrap = (user, main=true) ->
|
||||||
{convRate,convCap} = api.planGemLimits
|
{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:"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:"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.balance += .25
|
||||||
user.purchased.plan.gemsBought++
|
user.purchased.plan.gemsBought++
|
||||||
user.stats.gp -= convRate
|
user.stats.gp -= convRate
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue