Mercurial > wow > askmrrobot
comparison sort.lua @ 17:e77e01abce98
Warlords of Draenor pre-patch
author | Adam tegen <adam.tegen@gmail.com> |
---|---|
date | Mon, 13 Oct 2014 21:28:32 -0500 |
parents | ec731d2fe6ba |
children |
comparison
equal
deleted
inserted
replaced
16:9793e8b683d2 | 17:e77e01abce98 |
---|---|
20 if keys[i] then | 20 if keys[i] then |
21 return keys[i], t[keys[i]] | 21 return keys[i], t[keys[i]] |
22 end | 22 end |
23 end | 23 end |
24 end | 24 end |
25 | |
26 function AskMrRobot.sortSlots(t) | |
27 return AskMrRobot.spairs(t, function(x, a, b) | |
28 if a == nil and b == nil then return 0 end | |
29 return AskMrRobot.sortedSlots[a] < AskMrRobot.sortedSlots[b] | |
30 end) | |
31 end |