Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function CompareItems(lItem, rItem)
- if rItem.id == nil then
- return true;
- elseif lItem.id == nil then
- return false;
- -- elseif lItem.quality ~= rItem.quality then
- -- return (lItem.quality > rItem.quality);
- elseif lItem.class ~= rItem.class then
- return (lItem.class < rItem.class);
- elseif lItem.subclass ~= rItem.subclass then
- return (lItem.subclass < rItem.subclass);
- -- [KAP] put ilvl and quality here, major sort on class/subclass to group similar items together
- elseif lItem.itemLevel ~= rItem.itemLevel then
- return (lItem.itemLevel < rItem.itemLevel);
- elseif lItem.quality ~= rItem.quality then
- return (lItem.quality > rItem.quality);
- elseif lItem.name ~= rItem.name then
- return (lItem.name < rItem.name);
- elseif lItem.count ~= rItem.count then
- return (lItem.count >= rItem.count);
- else
- return true;
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement