fix for greymoor

Leandro Silva [05-26-20 - 17:43]
fix for greymoor
Filename
Craft.lua
LeoTrainer.lua
LeoTrainer.txt
LeoTrainerConst.lua
Settings.lua
diff --git a/Craft.lua b/Craft.lua
index 10a5418..b75b2e6 100644
--- a/Craft.lua
+++ b/Craft.lua
@@ -62,7 +62,7 @@ function Craft.ScanBackpackForCrafted()
         local type = GetItemType(data.bagId, data.slotIndex)
         local trait = GetItemLinkTraitInfo(itemLink)
         if wasCraftedByMe(data.bagId, data.slotIndex) and (type == ITEMTYPE_ARMOR or type == ITEMTYPE_WEAPON) and
-            trait ~= ITEM_TRAIT_TYPE_NONE and GetItemQuality(data.bagId, data.slotIndex) == ITEM_QUALITY_NORMAL then
+            trait ~= ITEM_TRAIT_TYPE_NONE and GetItemQuality(data.bagId, data.slotIndex) == ITEM_FUNCTIONAL_QUALITY_NORMAL then
             table.insert(list, {
                 bagId = data.bagId,
                 slotIndex = data.slotIndex,
@@ -113,7 +113,7 @@ local function addItemToLLC(queueIndex, data)
         data.useUniversalStyleItem,
         nil,
         nil,
-        ITEM_QUALITY_NORMAL,
+        ITEM_FUNCTIONAL_QUALITY_NORMAL,
         true,
         queueIndex -- reference
     )
diff --git a/LeoTrainer.lua b/LeoTrainer.lua
index 3a98e05..2a6f35f 100644
--- a/LeoTrainer.lua
+++ b/LeoTrainer.lua
@@ -290,7 +290,7 @@ function LeoTrainer.Initialize()
     LeoTrainer.data = LibSavedVars:NewAccountWide( "LeoTrainer_Data", LeoTrainer.dataDefaults )
     LeoTrainer.data.loaded = true

-    if LeoTrainer.settings.deconstruct.maxQuality[CRAFTING_TYPE_ENCHANTING] == nil then LeoTrainer.settings.deconstruct.maxQuality[CRAFTING_TYPE_ENCHANTING] = ITEM_QUALITY_ARCANE end
+    if LeoTrainer.settings.deconstruct.maxQuality[CRAFTING_TYPE_ENCHANTING] == nil then LeoTrainer.settings.deconstruct.maxQuality[CRAFTING_TYPE_ENCHANTING] = ITEM_FUNCTIONAL_QUALITY_ARCANE end

     LeoTrainer.stage = LEOTRAINER_STAGE_START

diff --git a/LeoTrainer.txt b/LeoTrainer.txt
index 877ef8a..279124e 100644
--- a/LeoTrainer.txt
+++ b/LeoTrainer.txt
@@ -1,7 +1,7 @@
 ## Title: Leo's Trainer
 ## APIVersion: 100030 100031
-## Version: 2.2.0
-## AddOnVersion: 220
+## Version: 2.2.1
+## AddOnVersion: 221
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoTrainer_Settings LeoTrainer_Data
 ## OptionalDependsOn: FCOItemSaver PersonalAssistant DolgubonsLazyWritCreator
diff --git a/LeoTrainerConst.lua b/LeoTrainerConst.lua
index 5df7fc3..2ad0099 100644
--- a/LeoTrainerConst.lua
+++ b/LeoTrainerConst.lua
@@ -1,4 +1,3 @@
-
 LeoTrainer = {
     ui = {},
     craft = {},
@@ -8,7 +7,7 @@ LeoTrainer = {
 }
 LeoTrainer.name = "LeoTrainer"
 LeoTrainer.displayName = "Leo's Trainer"
-LeoTrainer.version = "2.2.0"
+LeoTrainer.version = "2.2.1"
 LeoTrainer.chatPrefix = "|c39B027" .. LeoTrainer.name .. "|r: "
 LeoTrainer.setting = nil
 LeoTrainer.hidden = true
@@ -22,10 +21,10 @@ LeoTrainer.settingsDefaults = {
         allowCrafted = true,
         allowSets = false,
         maxQuality = {
-            [CRAFTING_TYPE_BLACKSMITHING]   = ITEM_QUALITY_NORMAL,
-            [CRAFTING_TYPE_CLOTHIER]        = ITEM_QUALITY_NORMAL,
-            [CRAFTING_TYPE_WOODWORKING]     = ITEM_QUALITY_NORMAL,
-            [CRAFTING_TYPE_JEWELRYCRAFTING] = ITEM_QUALITY_NORMAL,
+            [CRAFTING_TYPE_BLACKSMITHING]   = ITEM_FUNCTIONAL_QUALITY_NORMAL,
+            [CRAFTING_TYPE_CLOTHIER]        = ITEM_FUNCTIONAL_QUALITY_NORMAL,
+            [CRAFTING_TYPE_WOODWORKING]     = ITEM_FUNCTIONAL_QUALITY_NORMAL,
+            [CRAFTING_TYPE_JEWELRYCRAFTING] = ITEM_FUNCTIONAL_QUALITY_NORMAL,
         },
     },
     craft = {
@@ -38,11 +37,11 @@ LeoTrainer.settingsDefaults = {
         allowSets = false,
         onlyClosestLevel = false,
         maxQuality = {
-            [CRAFTING_TYPE_BLACKSMITHING]   = ITEM_QUALITY_ARCANE,
-            [CRAFTING_TYPE_CLOTHIER]        = ITEM_QUALITY_ARCANE,
-            [CRAFTING_TYPE_WOODWORKING]     = ITEM_QUALITY_ARCANE,
-            [CRAFTING_TYPE_JEWELRYCRAFTING] = ITEM_QUALITY_ARCANE,
-            [CRAFTING_TYPE_ENCHANTING]      = ITEM_QUALITY_ARCANE,
+            [CRAFTING_TYPE_BLACKSMITHING]   = ITEM_FUNCTIONAL_QUALITY_ARCANE,
+            [CRAFTING_TYPE_CLOTHIER]        = ITEM_FUNCTIONAL_QUALITY_ARCANE,
+            [CRAFTING_TYPE_WOODWORKING]     = ITEM_FUNCTIONAL_QUALITY_ARCANE,
+            [CRAFTING_TYPE_JEWELRYCRAFTING] = ITEM_FUNCTIONAL_QUALITY_ARCANE,
+            [CRAFTING_TYPE_ENCHANTING]      = ITEM_FUNCTIONAL_QUALITY_ARCANE,
         },
     },
     bank = {
diff --git a/Settings.lua b/Settings.lua
index bdfec2a..59f8fa7 100644
--- a/Settings.lua
+++ b/Settings.lua
@@ -44,7 +44,7 @@ end

 local qualityChoices = {}
 local qualityChoicesValues = {}
-for quality = ITEM_QUALITY_MIN_VALUE, ITEM_QUALITY_MAX_VALUE do
+for quality = ITEM_FUNCTIONAL_QUALITY_MIN_VALUE, ITEM_FUNCTIONAL_QUALITY_MAX_VALUE do
     local qualityColor = GetItemQualityColor(quality)
     local qualityString = qualityColor:Colorize(GetString("SI_ITEMQUALITY", quality))
     table.insert(qualityChoicesValues, quality)