From 5fabba3c5f97accd0eea3f2b4d78b12a146323d4 Mon Sep 17 00:00:00 2001 From: Ulidan Date: Tue, 20 Jul 2021 11:12:07 +0300 Subject: [PATCH 1/8] bug fixed Handle a bug in wow causing double trigger of LOOT_READY when autolooting without speedy loot addon. --- Fishbringer.toc | 9 +++++++++ fishy.lua | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 Fishbringer.toc diff --git a/Fishbringer.toc b/Fishbringer.toc new file mode 100644 index 0000000..2bf929a --- /dev/null +++ b/Fishbringer.toc @@ -0,0 +1,9 @@ +## Interface: 11307 +## Interface: 20501 +## Title: Fishbringer +## Notes: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! +## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) +## Version: 2.5.1-4 + +# main: +localization.core.lua diff --git a/fishy.lua b/fishy.lua index ca44314..fc3b108 100755 --- a/fishy.lua +++ b/fishy.lua @@ -18,6 +18,7 @@ fb:RegisterEvent"ADDON_LOADED" fb:RegisterEvent"COMBAT_LOG_EVENT" fb:RegisterEvent"SKILL_LINES_CHANGED" fb:RegisterEvent"LOOT_READY" +fb:RegisterEvent"LOOT_CLOSED" fb:RegisterEvent"ZONE_CHANGED_NEW_AREA" fb:RegisterEvent"ZONE_CHANGED" fb:RegisterEvent"UNIT_INVENTORY_CHANGED" @@ -152,8 +153,15 @@ local function UpdateFishCount(shouldIncrement) ) end +local finishedLooting = true +local function LootClosed() + finishedLooting = true +end local function IncrementFishCount() - UpdateFishCount(true) + if finishedLooting then + finishedLooting = false + UpdateFishCount(true) + end end local function ResetFishCounter(numFish) @@ -526,6 +534,7 @@ end fb.COMBAT_LOG_EVENT = UpdateFishingSkill fb.SKILL_LINES_CHANGED = UpdateFishingSkill fb.LOOT_READY = IncrementFishCount +fb.LOOT_CLOSED = LootClosed fb.ZONE_CHANGED_NEW_AREA = UpdateCatchInfo fb.ZONE_CHANGED = UpdateCatchInfo fb.UNIT_INVENTORY_CHANGED = CheckForFishingPole From e099152905ee1f163801d7b7988595c3dccac75d Mon Sep 17 00:00:00 2001 From: Ulidan Date: Tue, 20 Jul 2021 11:16:52 +0300 Subject: [PATCH 2/8] compatibity with curseforge Brrrrrr(shudder) --- Fishbringer.toc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Fishbringer.toc b/Fishbringer.toc index 2bf929a..d0c11c6 100644 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -7,3 +7,5 @@ # main: localization.core.lua + +# This file is here for compatibility with CurseForge only. it has no function whatsoever \ No newline at end of file From 9acab52a1c717ad0196ef6ea77779fde5fd2ba40 Mon Sep 17 00:00:00 2001 From: Ulidan Date: Tue, 20 Jul 2021 22:30:06 +0300 Subject: [PATCH 3/8] Updated Version --- Fishbringer-BCC.toc | 2 +- Fishbringer-Classic.toc | 2 +- Fishbringer.toc | 2 +- fishy.lua | 1 + 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Fishbringer-BCC.toc b/Fishbringer-BCC.toc index 4e23d17..c2bd8c5 100644 --- a/Fishbringer-BCC.toc +++ b/Fishbringer-BCC.toc @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 2.5.1-4 +## Version: 2.5.1-5 # main: localization.core.lua diff --git a/Fishbringer-Classic.toc b/Fishbringer-Classic.toc index a849b45..bc7449a 100644 --- a/Fishbringer-Classic.toc +++ b/Fishbringer-Classic.toc @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 2.5.1-4 +## Version: 2.5.1-5 # main: localization.core.lua diff --git a/Fishbringer.toc b/Fishbringer.toc index d0c11c6..e1357ae 100644 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -3,7 +3,7 @@ ## Title: Fishbringer ## Notes: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) -## Version: 2.5.1-4 +## Version: 2.5.1-5 # main: localization.core.lua diff --git a/fishy.lua b/fishy.lua index fc3b108..c13d54f 100755 --- a/fishy.lua +++ b/fishy.lua @@ -157,6 +157,7 @@ local finishedLooting = true local function LootClosed() finishedLooting = true end + local function IncrementFishCount() if finishedLooting then finishedLooting = false From eacf88b670ee0b2672f751907adab809e849e7ba Mon Sep 17 00:00:00 2001 From: Ulidan Date: Wed, 1 Sep 2021 09:36:30 +0300 Subject: [PATCH 4/8] Updated TOC to phase 2 --- Fishbringer-BCC.toc | 4 ++-- fishy.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Fishbringer-BCC.toc b/Fishbringer-BCC.toc index c2bd8c5..9827b76 100644 --- a/Fishbringer-BCC.toc +++ b/Fishbringer-BCC.toc @@ -1,4 +1,4 @@ -## Interface: 20501 +## Interface: 20502 ## Title: Fishbringer ## Title-deDE: Fishbringer ## Title-ruRU: Fishbringer @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 2.5.1-5 +## Version: 2.5.2-1 # main: localization.core.lua diff --git a/fishy.lua b/fishy.lua index c13d54f..29e10d6 100755 --- a/fishy.lua +++ b/fishy.lua @@ -9,7 +9,7 @@ local version = GetAddOnMetadata(ADDON_NAME, "Version") local addoninfo = 'v'..version local _,_,_,interface = GetBuildInfo() local classicEra = (interface==11307) -local classicTBC = (interface==20501) +local classicTBC = (interface==20502) local areaTable = {} From 2150fbb2e8f0ba3c5cd30055249823d8b25c616a Mon Sep 17 00:00:00 2001 From: Ulidan Date: Sat, 20 Aug 2022 19:01:08 +0300 Subject: [PATCH 5/8] Updated to Wrath --- Fishbringer-BCC.toc | 4 +-- Fishbringer-Classic.toc | 4 +-- Fishbringer-Wrath.toc | 24 +++++++++++++++ Fishbringer.toc | 5 ++- fishy.lua | 67 +++++++++++++++++++++++++++-------------- 5 files changed, 74 insertions(+), 30 deletions(-) create mode 100644 Fishbringer-Wrath.toc diff --git a/Fishbringer-BCC.toc b/Fishbringer-BCC.toc index 9827b76..b9ba527 100644 --- a/Fishbringer-BCC.toc +++ b/Fishbringer-BCC.toc @@ -1,4 +1,4 @@ -## Interface: 20502 +## Interface: 20504 ## Title: Fishbringer ## Title-deDE: Fishbringer ## Title-ruRU: Fishbringer @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 2.5.2-1 +## Version: 3.0.0 # main: localization.core.lua diff --git a/Fishbringer-Classic.toc b/Fishbringer-Classic.toc index bc7449a..bfd10d4 100644 --- a/Fishbringer-Classic.toc +++ b/Fishbringer-Classic.toc @@ -1,4 +1,4 @@ -## Interface: 11307 +## Interface: 11403 ## Title: Fishbringer ## Title-deDE: Fishbringer ## Title-ruRU: Fishbringer @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 2.5.1-5 +## Version: 3.0.0 # main: localization.core.lua diff --git a/Fishbringer-Wrath.toc b/Fishbringer-Wrath.toc new file mode 100644 index 0000000..09619f1 --- /dev/null +++ b/Fishbringer-Wrath.toc @@ -0,0 +1,24 @@ +## Interface: 30400 +## Title: Fishbringer +## Title-deDE: Fishbringer +## Title-ruRU: Fishbringer +## Notes: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! +## Notes-deDE: Das legendäre Fishbringer, Leitfaden des Scharlachroten Hochlords! Nat Pagle wäre stolz auf dich! +## Notes-ruRU: Легендарный Рыболов, проводник Повелителя Алого ордена! Нат Пэгл гордился бы тобой! +## Notes-esES: ¡El legendario Fishbringer, guía del Scarlet Highlord! ¡Nat Pagle estaría orgulloso de ti! +## Notes-frFR: Le légendaire Fishbringer, guide du seigneur écarlate ! Nat Pagle serait fier de vous ! +## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! +## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) +## SavedVariables: FishbringerDB +## Version: 3.0.0 + +# main: +localization.core.lua +fishy.lua + +# localizations: +Localization.deDE.lua +Localization.ruRU.lua +Localization.esES.lua +Localization.frFR.lua +Localization.ptBR.lua diff --git a/Fishbringer.toc b/Fishbringer.toc index e1357ae..814dac3 100644 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -1,9 +1,8 @@ -## Interface: 11307 -## Interface: 20501 +## Interface: 20503 ## Title: Fishbringer ## Notes: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) -## Version: 2.5.1-5 +## Version: 2.5.4 # main: localization.core.lua diff --git a/fishy.lua b/fishy.lua index 29e10d6..180335c 100755 --- a/fishy.lua +++ b/fishy.lua @@ -1,4 +1,3 @@ -FishbringerDB = {} local FONT = select(1, GameFontNormalSmall:GetFont()) local fb = CreateFrame"Frame" local db @@ -8,8 +7,9 @@ local L = namespace.L --localization local version = GetAddOnMetadata(ADDON_NAME, "Version") local addoninfo = 'v'..version local _,_,_,interface = GetBuildInfo() -local classicEra = (interface==11307) -local classicTBC = (interface==20502) +local classicEra = (interface>10000 and interface<12000) +local classicTBC = (interface>20000 and interface<30000) +local classicWrath = (interface>30000 and interface<40000) local areaTable = {} @@ -28,6 +28,17 @@ local function Print(text) end local zones = { + [114] = 380, + [115] = 380, + [116] = 380, + [117] = 380, + [118] = 480, + [119] = 430, + [123] = 430, + [125] = 430, + [126] = 430, + [127] = 405, + [170] = 480, [1411] = -70, [1412] = -70, [1413] = -20, @@ -104,6 +115,7 @@ local subzones = { [3690] = 405, [3691] = 405, [3692] = 405, + [3979] = 480, [3859] = 405, [3974] = 405, [3975] = 405, @@ -117,7 +129,7 @@ local instances = { [309] = 309, [329] = 330, [349] = 205, - [548] = 405, + [548] = 130, [1001] = 130, [1004] = 130, [1007] = 330, @@ -132,14 +144,20 @@ local fishingpoles = { [19970] = true, [25978] = true, [44050] = true, + [45991] = true, + [45992] = true, } local function GetNumFishToLevel(skillRank) - if skillRank <= 75 then - return 1 - else - return math.ceil((skillRank - 75) / 25) - end + local expScale + local numFishToLevel + if classicEra or skillRank>=300 then expScale=25 + elseif classicTBC or classicWrath then expScale=31.25 + else expScale=1 end + numFishToLevel=math.ceil(skillRank / expScale)-3 + if numFishToLevel < 1 then numFishToLevel=1 end + + return numFishToLevel end local function UpdateFishCount(shouldIncrement) @@ -213,12 +231,11 @@ local function UpdateCatchInfo() zoneSkill = subzones[areaId] end if not zoneSkill then - zoneText = GetRealZoneText() local mapId = C_Map.GetBestMapForUnit("Player") + zoneText = C_Map.GetMapInfo(mapId).name zoneSkill = zones[mapId] end end - -- Sometimes we can trigger this before the player is in any zone if not zoneText then return @@ -232,7 +249,7 @@ local function UpdateCatchInfo() maxZoneSkill = zoneSkill + 95 end - local chance = ( + FishbringerDB.chance = ( db[char].fishingSkill + db[char].fishingBuff - zoneSkill ) * 0.01 + 0.05 @@ -240,18 +257,18 @@ local function UpdateCatchInfo() zoneSkill = 1 end - if chance > 1 then - chance = 1 - elseif chance < 0 then - chance = 0 + if FishbringerDB.chance > 1 then + FishbringerDB.chance = 1 + elseif FishbringerDB.chance < 0 then + FishbringerDB.chance = 0 end local color - if chance == 0 then + if FishbringerDB.chance == 0 then color = "ffff2020" - elseif chance <= 0.5 then + elseif FishbringerDB.chance <= 0.5 then color = "ffff8040" - elseif chance < 1 then + elseif FishbringerDB.chance < 1 then color = "ffffff00" else color = "ff40bf40" @@ -259,15 +276,15 @@ local function UpdateCatchInfo() if zoneSkill == 0 then Fishbringer.zoneInfo:SetFormattedText( L["\124c%s%s\124r\nNo fish in this zone"], - color, zoneText, zoneSkill, maxZoneSkill, chance * 100 + color, zoneText, zoneSkill, maxZoneSkill, FishbringerDB.chance * 100 ) Fishbringer.catchRate:SetText("") else Fishbringer.zoneInfo:SetFormattedText( L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"], - color, zoneText, zoneSkill, maxZoneSkill, chance * 100 + color, zoneText, zoneSkill, maxZoneSkill, FishbringerDB.chance * 100 ) - Fishbringer.catchRate:SetFormattedText(L["%d%% catch rate"], chance * 100) + Fishbringer.catchRate:SetFormattedText(L["%d%% catch rate"], FishbringerDB.chance * 100) end end @@ -414,13 +431,17 @@ local function InitializeFrame() if Fishbringer then return end +--[[ Classic Era Frame Is now the same as TBC if classicEra then local Fishbringer = classicEraCreateFrame() elseif classicTBC then +--]] local Fishbringer = classicTBCCreateFrame() +--[[ else return end +--]] Fishbringer:EnableMouse(true) Fishbringer:SetMovable(true) Fishbringer:SetUserPlaced(true) @@ -511,7 +532,7 @@ local function InitializeFrame() end end -function UpdateFishingSkill() +local function UpdateFishingSkill() return UpdateSkill(false) end From 0278d4e49c0a828a9d1bccd7731f3fd71a48bbdc Mon Sep 17 00:00:00 2001 From: Ulidan Date: Fri, 9 Sep 2022 11:48:26 +0300 Subject: [PATCH 6/8] More Wrath fixes Added fishing poles Modified fish needed display to an estimate. Removed some old code. --- fishy.lua | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/fishy.lua b/fishy.lua index 180335c..16bd4aa 100755 --- a/fishy.lua +++ b/fishy.lua @@ -144,18 +144,19 @@ local fishingpoles = { [19970] = true, [25978] = true, [44050] = true, + [45120] = true, + [45858] = true, [45991] = true, [45992] = true, } local function GetNumFishToLevel(skillRank) - local expScale + local expScale=25 local numFishToLevel - if classicEra or skillRank>=300 then expScale=25 - elseif classicTBC or classicWrath then expScale=31.25 - else expScale=1 end - numFishToLevel=math.ceil(skillRank / expScale)-3 - if numFishToLevel < 1 then numFishToLevel=1 end + numFishToLevel=math.ceil(skillRank / expScale)-2 + if numFishToLevel < 1 then + numFishToLevel=1 + end return numFishToLevel end @@ -314,9 +315,15 @@ local function UpdateSkill(forceResetFishCounter) local skillRankText = skillRank local fishNeeded = GetNumFishToLevel(skillRank) - if skillRank ~= skillMaxRank then + local strFishNeeded + if skillRank ~= skillMaxRank then skillRankText = string.format("%d(%d)", skillRank, skillMaxRank) - fishNeededText = string.format(L["\n%d fish needed to skill up"], fishNeeded) + if fishNeeded>1 then + strFishNeeded = string.format("%d-%d",fishNeeded-1, fishNeeded) + else + strFishNeeded = string.format("%d", fishNeeded) + end + fishNeededText = string.format(L["\n%s fish needed to skill up"], strFishNeeded) end local skillModifierText = "" @@ -419,29 +426,14 @@ local function InitializeDB(resetDatabase) end end -local function classicEraCreateFrame() - return CreateFrame("Frame", "Fishbringer", UIParent) -end -local function classicTBCCreateFrame() - return CreateFrame("Frame", "Fishbringer", UIParent, "BackdropTemplate") -end - local function InitializeFrame() -- Frame madness if Fishbringer then return end ---[[ Classic Era Frame Is now the same as TBC - if classicEra then - local Fishbringer = classicEraCreateFrame() - elseif classicTBC then ---]] - local Fishbringer = classicTBCCreateFrame() ---[[ - else - return - end ---]] + + local Fishbringer = CreateFrame("Frame", "Fishbringer", UIParent, "BackdropTemplate") + Fishbringer:EnableMouse(true) Fishbringer:SetMovable(true) Fishbringer:SetUserPlaced(true) From dbac15c1e2c67df8d518b63d31e850bc9093baa4 Mon Sep 17 00:00:00 2001 From: Ulidan Date: Fri, 9 Sep 2022 11:52:16 +0300 Subject: [PATCH 7/8] TOC Versions update --- Fishbringer-BCC.toc | 2 +- Fishbringer-Classic.toc | 2 +- Fishbringer-Wrath.toc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Fishbringer-BCC.toc b/Fishbringer-BCC.toc index b9ba527..25fc344 100644 --- a/Fishbringer-BCC.toc +++ b/Fishbringer-BCC.toc @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 3.0.0 +## Version: 3.0.1 # main: localization.core.lua diff --git a/Fishbringer-Classic.toc b/Fishbringer-Classic.toc index bfd10d4..f805785 100644 --- a/Fishbringer-Classic.toc +++ b/Fishbringer-Classic.toc @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 3.0.0 +## Version: 3.0.1 # main: localization.core.lua diff --git a/Fishbringer-Wrath.toc b/Fishbringer-Wrath.toc index 09619f1..c800cf7 100644 --- a/Fishbringer-Wrath.toc +++ b/Fishbringer-Wrath.toc @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 3.0.0 +## Version: 3.0.1 # main: localization.core.lua From 552688047e06d5ef274659bb8ad1e85bef61ea19 Mon Sep 17 00:00:00 2001 From: Ulidan Date: Thu, 6 Jun 2024 14:14:24 +0300 Subject: [PATCH 8/8] Calculation fix --- Fishbringer-Vanilla.toc | 2 +- Fishbringer.toc | 2 +- fishy.lua | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Fishbringer-Vanilla.toc b/Fishbringer-Vanilla.toc index 4b07203..df01d65 100644 --- a/Fishbringer-Vanilla.toc +++ b/Fishbringer-Vanilla.toc @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 3.1.1 +## Version: 3.1.2 # localizations: localization.core.lua diff --git a/Fishbringer.toc b/Fishbringer.toc index ea9ef20..c6f0d0b 100644 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -10,7 +10,7 @@ ## Notes-ptBR: O lendário Fishbringer, Guia do Highlord Escarlate! Nat Pagle ficaria orgulhoso de você! ## Author: Kalerath, Fye (Localization Code & Bugfixes), Zilom (Bugfixes & Localization Redesigned + Added), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 3.1.1 +## Version: 3.1.2 # localizations: localization.core.lua diff --git a/fishy.lua b/fishy.lua index 2626893..2990336 100755 --- a/fishy.lua +++ b/fishy.lua @@ -301,7 +301,8 @@ local function UpdateCatchInfo() "|c%s%s|r\n" .. areaSkillText .. L["%d skill needed for 100%% catch rate"], color, zoneText, maxZoneSkill ) - Fishbringer.catchRate:SetFormattedText(L["%d%% catch rate"] .. " (" .. L["%d%% junk rate"] .. ")", FishbringerDB.chance * 100, (1-FishbringerDB.chance) * 100) + local chance = floor(FishbringerDB.chance * 100) + Fishbringer.catchRate:SetFormattedText(L["%d%% catch rate"] .. " (" .. L["%d%% junk rate"] .. ")", chance, 100 - chance) end end