mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-07-21 13:24:16 +00:00
Merge pull request #221 from Alys/fix
fix #3513 - if contrib level is NaN, use 0
This commit is contained in:
commit
082ec6fe1d
2 changed files with 3 additions and 3 deletions
4
dist/habitrpg-shared.js
vendored
4
dist/habitrpg-shared.js
vendored
|
|
@ -13414,7 +13414,7 @@ api.wrap = function(user, main) {
|
|||
user.markModified('party.quest.progress');
|
||||
}
|
||||
}
|
||||
if ((api.daysSince(user.items.lastDrop.date, user.preferences) === 0) && (user.items.lastDrop.count >= 5 + Math.floor(user._statsComputed.per / 25) + user.contributor.level)) {
|
||||
if ((api.daysSince(user.items.lastDrop.date, user.preferences) === 0) && (user.items.lastDrop.count >= 5 + Math.floor(user._statsComputed.per / 25) + (user.contributor.level || 0))) {
|
||||
return;
|
||||
}
|
||||
if (((_ref1 = user.flags) != null ? _ref1.dropsEnabled : void 0) && user.fns.predictableRandom(user.stats.exp) < chance) {
|
||||
|
|
@ -13836,4 +13836,4 @@ api.wrap = function(user, main) {
|
|||
|
||||
|
||||
}).call(this,require("/Users/lefnire/Dropbox/Sites/habitrpg/modules/habitrpg-shared/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))
|
||||
},{"./content.coffee":5,"./i18n.coffee":6,"/Users/lefnire/Dropbox/Sites/habitrpg/modules/habitrpg-shared/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":2,"lodash":3,"moment":4}]},{},[1])
|
||||
},{"./content.coffee":5,"./i18n.coffee":6,"/Users/lefnire/Dropbox/Sites/habitrpg/modules/habitrpg-shared/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":2,"lodash":3,"moment":4}]},{},[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
|
||||
|
|
|
|||
Loading…
Reference in a new issue