Skip to content

Commit

Permalink
Fixed display bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsargul committed May 10, 2023
1 parent 306e004 commit 03423d7
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ end
-- For some reason, the skill header "other" is sometimes not recognised as a header, and causes a bug if not accounted for
function core:SkillIsOther(skillName, skillType)
if (skillName == 'Other' or skillType == 'Other') then
core:Print("Is other "..skillName)
return 1
else
return 0
Expand All @@ -94,7 +95,7 @@ end
function core:UpdateTradeSkill(i, profName)
local skillButton = _G['TradeSkillSkill'..i]
local skillIndex = skillButton:GetID()
local skillName, skillType, numAv, _, _, _ = GetTradeSkillInfo(skillIndex)
local skillName, skillType, _, _, _, _ = GetTradeSkillInfo(skillIndex)
local playerSkill = core:GetProfessionLevel()
local chance

Expand All @@ -108,11 +109,7 @@ function core:UpdateTradeSkill(i, profName)
if (skillButton:IsShown()) then
chance = core:GetChance(skillName, profName, playerSkill)
if (chance > 0) then
if (numAv == 0) then
skillButton:SetText(" "..skillName.." ("..chance.."%)")
else
skillButton:SetText(" "..skillName.." ["..numAv.."] ("..chance.."%)")
end
skillButton:SetText(" "..skillName.." ("..chance.."%)")
return
end
end
Expand Down

0 comments on commit 03423d7

Please sign in to comment.