fix #3513 - if contrib level is NaN, use 0
Fixes (I hope) https://github.com/HabitRPG/habitrpg/issues/3513. NOTE that private code will need to be edited too - ref https://github.com/HabitRPG/habitrpg-shared/commit/f49ed5436c60d6b135909a3c8714347d99499701
This commit is contained in:
+1
-1
@@ -1008,7 +1008,7 @@ api.wrap = (user, main=true) ->
|
||||
user.markModified? 'party.quest.progress'
|
||||
#console.log {progress:user.party.quest.progress}
|
||||
|
||||
return if (api.daysSince(user.items.lastDrop.date, user.preferences) is 0) and (user.items.lastDrop.count >= 5 + Math.floor(user._statsComputed.per / 25) + user.contributor.level)
|
||||
return if (api.daysSince(user.items.lastDrop.date, user.preferences) is 0) and (user.items.lastDrop.count >= 5 + Math.floor(user._statsComputed.per / 25) + (user.contributor.level or 0))
|
||||
if user.flags?.dropsEnabled and user.fns.predictableRandom(user.stats.exp) < chance
|
||||
|
||||
# current breakdown - 1% (adjustable) chance on drop
|
||||
|
||||
Reference in New Issue
Block a user