don't run drops on the client. they will be wiped on refresh anyway,

only run on the server (we still need a way to notify users when a drop
happened on the server)
This commit is contained in:
Tyler Renelle
2013-09-02 20:51:21 -04:00
parent 4174412b11
commit 04de115877
2 changed files with 13 additions and 9 deletions
+3 -2
View File
@@ -282,8 +282,9 @@ obj.score = (user, task, direction, options={}) ->
task.value = value; paths["tasks.#{task.id}.value"] = true
updateStats user, { hp, exp, gp }, {paths: paths}
# Drop system #FIXME
randomDrop(user, delta, priority, streak, {paths: paths}) if direction is 'up'
# Drop system (don't run on the client, as it would only be discarded since ops are sent to the API, not the results)
if typeof window is 'undefined'
randomDrop(user, delta, priority, streak, {paths: paths}) if direction is 'up'
return delta