Skip to content

Commit

Permalink
Fix Skillet frame TradeSkill buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
b-morgan committed Aug 12, 2024
1 parent 4376b07 commit 30801ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
11 changes: 3 additions & 8 deletions Skillet.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1455,14 +1455,9 @@ function Skillet:ChangeTradeSkill(tradeID, tradeName)
DA.DEBUG(0,"ChangeTradeSkill: changingTrade= "..tostring(self.changingTrade)..", changingName= "..tostring(self.changingName))
StaticPopup_Show("SKILLET_MANUAL_CHANGE", self.changingName)
else
if self.spellOffset and self.spellOffset[tradeName] then
DA.DEBUG(1,"ChangeTradeSkill: executing CastSpell("..tostring(self.spellOffset[tradeName]+1)..",BOOKTYPE_PROFESSION)")
CastSpell(self.spellOffset[tradeName]+1,BOOKTYPE_PROFESSION)
else
if tradeName == "Mining" then tradeName = "Mining Journal" end
DA.DEBUG(1,"ChangeTradeSkill: executing CastSpellByName("..tostring(tradeName)..")")
CastSpellByName(tradeName)
end
if tradeName == "Mining" then tradeName = "Mining Journal" end
DA.DEBUG(1,"ChangeTradeSkill: executing CastSpellByName("..tostring(tradeName)..")")
CastSpellByName(tradeName)
self.delayTrade = tradeID
self.delayName = tradeName
self.delayChange = true
Expand Down
24 changes: 0 additions & 24 deletions SkilletData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -505,30 +505,6 @@ function Skillet:ScanPlayerTradeSkills(player)
self.db.realm.tradeSkills = {}
end
self.db.realm.tradeSkills[player] = {}
self.spellOffset = {}
local prof1, prof2, archaeology, fishing, cooking, firstAid = GetProfessions()
--DA.DEBUG(3,"ScanPlayerTradeSkills: prof1= "..tostring(prof1)..", prof2= "..tostring(prof2)..", archaeology= "..tostring(archaeology)..", fishing= "..tostring(fishing)..", cooking= "..tostring(cooking)..", firstAid= "..tostring(firstAid))
if prof1 then
local name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset, skillLine, skillModifier, specializationIndex, specializationOffset = GetProfessionInfo(prof1)
--DA.DEBUG(3,"ScanPlayerTradeSkills: prof1 name= "..tostring(name)..", icon= "..tostring(icon)..", skillLevel= "..tostring(skillLevel)..", maxSkillLevel= "..tostring(maxSkillLevel)..", numAbilities= "..tostring(numAbilities)..", spelloffset= "..tostring(spelloffset)..", skillLine= "..tostring(skillLine)..", skillModifier= "..tostring(skillModifier)..", specializationIndex= "..tostring(specializationIndex)..", specializationOffset= "..tostring(specializationOffset))
self.spellOffset[name] = spelloffset
end
if prof2 then
local name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset, skillLine, skillModifier, specializationIndex, specializationOffset = GetProfessionInfo(prof2)
--DA.DEBUG(3,"ScanPlayerTradeSkills: prof2 name= "..tostring(name)..", icon= "..tostring(icon)..", skillLevel= "..tostring(skillLevel)..", maxSkillLevel= "..tostring(maxSkillLevel)..", numAbilities= "..tostring(numAbilities)..", spelloffset= "..tostring(spelloffset)..", skillLine= "..tostring(skillLine)..", skillModifier= "..tostring(skillModifier)..", specializationIndex= "..tostring(specializationIndex)..", specializationOffset= "..tostring(specializationOffset))
self.spellOffset[name] = spelloffset
end
if fishing then
local name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset, skillLine, skillModifier, specializationIndex, specializationOffset = GetProfessionInfo(fishing)
--DA.DEBUG(3,"ScanPlayerTradeSkills: fishing name= "..tostring(name)..", icon= "..tostring(icon)..", skillLevel= "..tostring(skillLevel)..", maxSkillLevel= "..tostring(maxSkillLevel)..", numAbilities= "..tostring(numAbilities)..", spelloffset= "..tostring(spelloffset)..", skillLine= "..tostring(skillLine)..", skillModifier= "..tostring(skillModifier)..", specializationIndex= "..tostring(specializationIndex)..", specializationOffset= "..tostring(specializationOffset))
self.spellOffset[name] = spelloffset
end
if cooking then
local name, icon, skillLevel, maxSkillLevel, numAbilities, spelloffset, skillLine, skillModifier, specializationIndex, specializationOffset = GetProfessionInfo(cooking)
--DA.DEBUG(3,"ScanPlayerTradeSkills: cooking name= "..tostring(name)..", icon= "..tostring(icon)..", skillLevel= "..tostring(skillLevel)..", maxSkillLevel= "..tostring(maxSkillLevel)..", numAbilities= "..tostring(numAbilities)..", spelloffset= "..tostring(spelloffset)..", skillLine= "..tostring(skillLine)..", skillModifier= "..tostring(skillModifier)..", specializationIndex= "..tostring(specializationIndex)..", specializationOffset= "..tostring(specializationOffset))
self.spellOffset[name] = spelloffset
end
--DA.DEBUG(3,"ScanPlayerTradeSkills: spellOffset= "..DA.DUMP1(self.spellOffset))
local skillRanksData = Skillet.db.realm.tradeSkills[player]
for i=1,#TradeSkillList,1 do
local id = TradeSkillList[i]
Expand Down
1 change: 1 addition & 0 deletions SkilletNewsData.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ Skillet.NewsData = {
{ name = "Fixes",
data = {
{ header = "Inventory", body = "Add Warband Bank" },
{ header = "TradeSkills", body = "Fix TradeSkill buttons" },
},
},
},
Expand Down

0 comments on commit 30801ab

Please sign in to comment.