fix Start Craft button
Leandro Silva [04-06-20 - 23:46]
diff --git a/Craft.lua b/Craft.lua
index 0b9a233..9621e93 100644
--- a/Craft.lua
+++ b/Craft.lua
@@ -166,14 +166,20 @@ function Craft.OnStationExit(craftSkill)
Craft.RemoveCraftedFromQueue(craftSkill)
end
+function Craft.StartCraft(craftSkill)
+ LeoTrainerWindowQueuePanelQueueScrollCraftAll:SetState(BSTATE_DISABLED)
+ if craftSkill == nil then craftSkill = GetCraftingInteractionType() end
+ addItemsToLLC()
+ LibLazyCrafting.craftInteract(1, craftSkill)
+end
+
function Craft.OnStationEnter(craftSkill)
Craft.GetPatternIndexes(craftSkill)
Craft.isCrafting = false
if #LeoTrainer.data.craftQueue > 0 and LeoTrainer.settings.craft.auto then
- addItemsToLLC()
- LibLazyCrafting.craftInteract(1, craftSkill)
+ Craft.StartCraft(craftSkill)
return
end
diff --git a/LeoTrainer.txt b/LeoTrainer.txt
index 8d8d5a1..dd93f5e 100644
--- a/LeoTrainer.txt
+++ b/LeoTrainer.txt
@@ -1,7 +1,7 @@
## Title: Leo's Trainer
## APIVersion: 100030
-## Version: 2.0.3
-## AddOnVersion: 203
+## Version: 2.0.4
+## AddOnVersion: 204
## Author: |c39B027@LeandroSilva|r
## SavedVariables: LeoTrainer_Settings LeoTrainer_Data
## OptionalDependsOn: FCOItemSaver PersonalAssistant DolgubonsLazyWritCreator
diff --git a/LeoTrainer.xml b/LeoTrainer.xml
index 36e8a32..c16155a 100644
--- a/LeoTrainer.xml
+++ b/LeoTrainer.xml
@@ -862,7 +862,7 @@
<ButtonState state="DISABLED"/>
<OnClicked>
LeoTrainer.continueCrating = true
- LeoTrainer.CraftNext()
+ LeoTrainer.craft.StartCraft()
</OnClicked>
</Button>
diff --git a/LeoTrainerConst.lua b/LeoTrainerConst.lua
index 8eeefce..e9ee4e0 100644
--- a/LeoTrainerConst.lua
+++ b/LeoTrainerConst.lua
@@ -8,7 +8,7 @@ LeoTrainer = {
}
LeoTrainer.name = "LeoTrainer"
LeoTrainer.displayName = "Leo's Trainer"
-LeoTrainer.version = "2.0.3"
+LeoTrainer.version = "2.0.4"
LeoTrainer.chatPrefix = "|c39B027" .. LeoTrainer.name .. "|r: "
LeoTrainer.setting = nil
LeoTrainer.hidden = true