fix to special gear not showing up properly

This commit is contained in:
Tyler Renelle
2013-12-16 22:37:53 -07:00
parent 7e82e2f5e0
commit c2ace688b9
2 changed files with 4 additions and 8 deletions
+2 -2
View File
@@ -117,8 +117,8 @@ api.updateStore = (user) ->
changes.push(found) if found
true
# Add special items (contrib gear, backer gear, etc)
_.defaults changes, _.transform _.where(content.gear.flat, {klass:'special'}), (m,v) ->
m.push v if v.canOwn?(user) && !user.items.gear.owned[v.key]
changes = changes.concat _.filter content.gear.flat, (v) ->
v.klass is 'special' and !user.items.gear.owned[v.key] and v.canOwn?(user)
changes.push content.potion
# Return sorted store (array)
_.sortBy changes, (item) ->