New release
Leandro Silva [11-07-18 - 16:16]
diff --git a/LeoTrainer.txt b/LeoTrainer.txt
index 48ba6d2..317a6d0 100644
--- a/LeoTrainer.txt
+++ b/LeoTrainer.txt
@@ -1,7 +1,7 @@
## Title: Leo's Trainer
## APIVersion: 100024 100025
-## Version: 1.2.2
-## AddOnVersion: 122
+## Version: 1.2.3
+## AddOnVersion: 123
## Author: |c39B027@LeandroSilva|r
## SavedVariables: LeoTrainerSavedVariables
## DependsOn: LeoAltholic
diff --git a/LeoTrainerConst.lua b/LeoTrainerConst.lua
index 6aa629d..7c6ca90 100644
--- a/LeoTrainerConst.lua
+++ b/LeoTrainerConst.lua
@@ -3,7 +3,7 @@ LeoTrainer = {}
LeoTrainerUI = {}
LeoTrainer.name = "LeoTrainer"
LeoTrainer.displayName = "Leo's Trainer"
-LeoTrainer.version = "1.2.2"
+LeoTrainer.version = "1.2.3"
LeoTrainer.chatPrefix = "|c39B027" .. LeoTrainer.name .. "|r: "
LeoTrainer.setting = nil
LeoTrainer.hidden = true
diff --git a/LeoTrainerUI.lua b/LeoTrainerUI.lua
index 826b042..6c1815f 100644
--- a/LeoTrainerUI.lua
+++ b/LeoTrainerUI.lua
@@ -624,10 +624,11 @@ function LeoTrainer.AddToQueue(data)
for _, item in pairs(LeoTrainer.savedVariables.queue) do
if data.trainer ~= "Anyone" and data.trainee ~= "Anyone" and item.trainer == data.trainer and item.trainee == data.trainee and item.craft == data.craft and
item.line == data.line and item.trait == data.trait then
- return
+ return false
end
end
table.insert(LeoTrainer.savedVariables.queue, data)
+ return true
end
function LeoTrainer.RemoveFromQueue(pos)
@@ -652,6 +653,7 @@ function LeoTrainer.FillSlots(trainer, trainee)
if LeoTrainer.savedVariables.researchItems then
items = scanItems()
end
+ local newAdded = 0
for _, char in pairs(charList) do
if (trainee == nil or trainee == char.bio.name) and trainer == nil or (trainer ~= nil and trainer ~= char.bio.name) then
knownCount[char.bio.name] = {}
@@ -696,7 +698,7 @@ function LeoTrainer.FillSlots(trainer, trainee)
if not lineData.added and not lineData.isResearching then
local trait, knownList = getFirstUnknownTraitCanBeTrained(craft, lineData.line, lineData.unknownTraits, trainer)
local hasItem = false
- if trait ~= nil then
+ if trait ~= nil and (trait ~= 9 or LeoTrainer.savedVariables.trainNirnhoned == true) then
for itemIndex, itemData in ipairs(items) do
if itemData.selected == false and itemData.craft == craft and itemData.line == lineData.line and itemData.trait == trait then
if not LeoTrainer.savedVariables.onlyResearchFCO or
@@ -709,7 +711,7 @@ function LeoTrainer.FillSlots(trainer, trainee)
end
end
end
- if trait ~= nil then
+ if trait ~= nil and (trait ~= 9 or LeoTrainer.savedVariables.trainNirnhoned == true) then
if not hasItem then
local traitType = GetSmithingResearchLineTraitInfo(craft, lineData.line, trait)
local traitName = GetString('SI_ITEMTRAITTYPE', traitType)
@@ -746,7 +748,9 @@ function LeoTrainer.FillSlots(trainer, trainee)
}
if trainer ~= nil then data.trainer = trainer end
if trainee ~= nil then data.trainee = trainee end
- LeoTrainer.AddToQueue(data)
+ if LeoTrainer.AddToQueue(data) then
+ newAdded = newAdded + 1
+ end
end
lineList[j].added = true
break
@@ -759,5 +763,5 @@ function LeoTrainer.FillSlots(trainer, trainee)
end
end
end
- LeoTrainer.log("Done filling empty research slots.")
+ LeoTrainer.log(ZO_CachedStrFormat("Done filling research slots. Added <<1[1 item/$d items]>>", newAdded))
end