mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-04-14 19:56:23 +00:00
Separated out the check for nyeRecieved and pushing to the array
This commit is contained in:
parent
0b57d42e2a
commit
439f72cb91
2 changed files with 6774 additions and 6801 deletions
13570
dist/habitrpg-shared.js
vendored
13570
dist/habitrpg-shared.js
vendored
File diff suppressed because it is too large
Load diff
|
|
@ -705,7 +705,10 @@ api.spells =
|
|||
_.each [user,target], (t)->
|
||||
t.achievements.nye ?= 0
|
||||
t.achievements.nye++
|
||||
(target.items.special.nyeReceived ?= []).push user.profile.name
|
||||
if !target.items.special.nyeReceived
|
||||
target.items.special.nyeReceived = []
|
||||
target.items.special.nyeReceived.push user.profile.name
|
||||
|
||||
target.markModified? 'items.special.nyeReceived'
|
||||
user.stats.gp -= 10
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue