diff --git a/MrPlow.lua b/MrPlow.lua
index be919d6..bfcec22 100644
--- a/MrPlow.lua
+++ b/MrPlow.lua
@@ -91,10 +91,11 @@ function MrPlow:Loaded(...)
LibSort:Register("Item Sort", "Weapon Type", "The type of weapon", "weaponType", function(...) return MrPlow:WeaponType(...) end)
LibSort:Register("Item Sort", "Armour Equip Type", "The type of armour", "armorEquipType", function(...) return MrPlow:ArmourEquipType(...) end)
LibSort:Register("Item Sort", "Armour Type", "The weight of armour", "armorType", function(...) return MrPlow:ArmorType(...) end)
-
+ LibSort:Register("Item Sort", "Crafting Type", "The crafting type of an item", "craftingType", function(...) return MrPlow:CraftingType(...) end)
+
LibSort:Register("Item Sort", "Subjective Level", "The calculated subjective level", "subjectiveLevel", function(slotType, bag, index) return GetItemLevel(bag, index) end)
- LibSort:RegisterDefaultOrder("Item Sort", {"Item Type", "Weapon Type", "Armour Equip Type", "Armour Type"}, {"Subjective Level"})
+ LibSort:RegisterDefaultOrder("Item Sort", {"Item Type", "Weapon Type", "Armour Equip Type", "Armour Type", "Crafting Type"}, {"Subjective Level"})
end
function MrPlow:ItemType(slotType, bag, index)
@@ -130,7 +131,11 @@ function MrPlow:ArmourEquipType(slotType, bag, index)
end
end
-
+function MrPlow:CraftingType(slotType, bag, index)
+ if watchedSlots[slotType] then
+ local _, _, extra1 = GetItemCraftingInfo(bag, index)
+ return extra1 or 0
+ end
+end
EVENT_MANAGER:RegisterForEvent("MrPlowLoaded", EVENT_ADD_ON_LOADED, function(...) MrPlow:Loaded(...) end)
-
\ No newline at end of file