free orb of rebirth for level 100(+) users

Orb of Rebirth now only spits out "not enough gems" if user is under level 100 and has less than 8 gems. It also only charges if the user is below level 100.
This commit is contained in:
deilann 2014-03-27 22:27:37 -07:00
parent e09e9d1c23
commit 1db3b7cf98

View file

@ -429,9 +429,11 @@ api.wrap = (user, main=true) ->
rebirth: (req, cb, ga) ->
# Cost is 8 Gems ($2)
if user.balance < 2
if (user.balance < 2 && user.stats.lvl < 100)
return cb? {code:401,message: "Not enough gems."}
user.balance -= 2
# only charge people if they are under level 100 - ryan
if user.stats.lvl < 100
user.balance -= 2
# Save off user's level, for calculating achievement eligibility later
lvl = user.stats.lvl
# Turn tasks yellow, zero out streaks