allow correct equipment item to be lost on death - mostly fixes https://github.com/HabitRPG/habitrpg/issues/2789
This commit is contained in:
Vendored
+524
-1019
File diff suppressed because it is too large
Load Diff
@@ -985,6 +985,7 @@ api.wrap = (user, main=true) ->
|
||||
randomVal: (obj, options) ->
|
||||
array = if options?.key then _.keys(obj) else _.values(obj)
|
||||
rand = user.fns.predictableRandom(options?.seed)
|
||||
array.sort()
|
||||
array[Math.floor(rand * array.length)]
|
||||
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user