Separated out the check for nyeRecieved and pushing to the array

This commit is contained in:
Blade Barringer 2014-12-31 18:35:59 -06:00
parent 0b57d42e2a
commit 439f72cb91
2 changed files with 6774 additions and 6801 deletions

13570
dist/habitrpg-shared.js vendored

File diff suppressed because it is too large Load diff

View file

@ -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