mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 03:30:25 +00:00
fix(quests): don't drop canBuy:false items
This commit is contained in:
parent
2ee93763fc
commit
56cc5db9b7
1 changed files with 1 additions and 1 deletions
|
|
@ -982,7 +982,7 @@ api.wrap = (user, main=true) ->
|
|||
|
||||
# Eggs: 30% chance
|
||||
else if rarity > .3
|
||||
drop = user.fns.randomVal content.eggs
|
||||
drop = user.fns.randomVal _.where(content.eggs,{canBuy:true})
|
||||
user.items.eggs[drop.key] ?= 0
|
||||
user.items.eggs[drop.key]++
|
||||
drop.type = 'Egg'
|
||||
|
|
|
|||
Loading…
Reference in a new issue