From 19978df12f9fc2e026312baef6c79e28af0cf955 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Sun, 1 Dec 2019 19:59:45 +0100 Subject: [PATCH 01/22] Added Translation Added some code for easy translation into other Languages Added German Translation --- Fishbringer.toc | 5 ++ Localization.deDE.lua | 98 ++++++++++++++++++++++++ fishy.lua | 169 ++++++++++++++++++++++-------------------- localization.core.lua | 10 +++ 4 files changed, 200 insertions(+), 82 deletions(-) create mode 100644 Localization.deDE.lua create mode 100644 localization.core.lua diff --git a/Fishbringer.toc b/Fishbringer.toc index 6f62619..113abdb 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -1,8 +1,13 @@ ## Interface: 11302 ## Title: Fishbringer +## Title-deDR: Fishbringer ## Notes: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! +## Notes-deDE: Das legend\195\164re Fishbringer, Leitfaden des Scharlachroten Hochlords! Nat Pagle w\195\164re stolz auf dich! ## Author: Kalerath ## SavedVariables: FishbringerDB ## Version: 1.13-3 +localization.core.lua +Localization.deDE.lua fishy.lua + diff --git a/Localization.deDE.lua b/Localization.deDE.lua new file mode 100644 index 0000000..d747111 --- /dev/null +++ b/Localization.deDE.lua @@ -0,0 +1,98 @@ +local ADDON_NAME, namespace = ... +local L = namespace.L + +if namespace.locale == "deDE" then + + --ShowHelp Funktion + L["Nat Pagle would be proud of you."] = "Nat Pagle wäre stolz auf dich!" + L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Fishbringer Bildschirmanzeige an/aus." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Textausrichtung ändern." + L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Gefangene Fische auf dem Level anzeigen an/aus." + L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Fishbringer Datenbank zurücksetzen." + + --Anzeige auf Bildschirm + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d Angelskill benötigt zum Angeln\n(%d benötigt für 100%% Fangchance)" + L["%d%% catch rate"] = "%d%% Fangchance" + L["%s%s fishing skill%s"] = "%s%s Angelskill%s" + L["\n%d fish needed to skill up"] = "\n%d Fische benötigt für Skillpunkt" + L["%d fish caught at this level"] = "%d Fische auf diesem Level gefangen" + + L["Fishing"] = "Angeln" + + L["Pack yer bags, we be leavin' fer fishin'!"] = "Pack deine Taschen, wir gehen angeln!" + + -- Angelzonen + + L["Dun Morogh"] = "Dun Morogh" + L["Durotar"] = "Durotar" + L["Elwynn Forest"] = "Wald von Elwynn" + L["Mulgore"] = "Mulgore" + L["Eversong Forest"] = "Immersangwald" + L["Azuremyst Isle"] = "Azurmythosinsel" + L["Teldrassil"] = "Teldrassil" + L["Tirisfal"] = "Tirisfal" + L["Orgrimmar"] = "Orgrimmar" + L["Ironforge"] = "Ironforge" + L["Stormwind City"] = "Stormwind" + L["Thunder Bluff"] = "Thunder Bluff" + L["Silvermoon City"] = "Silbermond" + L["The Exodar"] = "Die Exodar" + L["Darnassus"] = "Darnassus" + L["Undercity"] = "Undercity" + L["The Barrens"] = "Brachland" + L["Blackfathom Deeps"] = "Blackfathom-Tiefe" + L["Bloodmyst Isle"] = "Blutmythosinsel" + L["Darkshore"] = "Dunkelküste" + L["The Deadmines"] = "Die Todesminen" + L["Ghostlands"] = "Geisterlande" + L["Loch Modan"] = "Loch Modan" + L["Silverpine Forest"] = "Silberwald" + L["The Wailing Caverns"] = "Die Höhlen des Wehklagens" + L["Westfall"] = "Westfall" + L["Ashenvale"] = "Ashenvale" + L["Duskwood"] = "Dämmerwald" + L["Hillsbrad Foothills"] = "Vorgebirge von Hillsbrad" + L["Redridge Mountains"] = "Rotkammgebirge" + L["Stonetalon Mountains"] = "Steinkrallengebirge" + L["Wetlands"] = "Sumpfland" + L["Alterac Mountains"] = "Alteractal" + L["Arathi Highlands"] = "Arathihochland" + L["Desolace"] = "Desolace" + L["Dustwallow Marsh"] = "Marschen von Dustwallow" + L["Scarlet Monastery"] = "Das scharlachrote Kloster" + L["Stranglethorn Vale"] = "Schlingendorntal" + L["Swamp of Sorrows"] = "Sümpfe des Elends" + L["Thousand Needles"] = "Tausend Nadeln" + L["Azshara"] = "Azshara" + L["Teufelswald"] = "Felwood" + L["Feralas"] = "Feralas" + L["The Hinterlands"] = "Hinterland" + L["Maraudon"] = "Maraudon" + L["Moonglade"] = "Moonglade" + L["Tanaris"] = "Tanaris" + L["The Temple of Atal'Hakkar"] = "Der Tempel von Atal'Hakkar" + L["Un'Goro Crater"] = "Un'Goro-Krater" + L["Western Plaguelands"] = "Westliche Pestländer" + L["Shadowmoon Valley"] = "Schattenmondtal" + L["Zangarmarsh"] = "Zangarmarschen" + L["Burning Steppes"] = "Brennende Steppe" + L["Deadwind Pass"] = "Gebirgspass der Todenwinde" + L["Eastern Plaguelands"] = "Östliche Pestländer" + L["Scholomance"] = "Scholomance" + L["Silithus"] = "Silithus" + L["Stratholme"] = "Stratholme" + L["Winterspring"] = "Winterspring" + L["Zul'Gurub"] = "Zul'Gurub" + L["Terokkar Forest"] = "Wälder von Terokkar" + L["Nagrand"] = "Nagrand" + L["Netherstorm"] = "Nethersturm" + L["Borean Tundra"] = "Boreanische Tundra" + L["Dragonblight"] = "Drachenöde" + L["Howling Fjord"] = "Heulende Fjord" + L["Crystalsong Forest"] = "Kristallsangwald" + L["Dalaran"] = "Dalaran" + L["Sholazar Basin"] = "Sholazarbecken" + L["The Frozen Sea"] = "" + + +return end \ No newline at end of file diff --git a/fishy.lua b/fishy.lua index 4ea9c24..02a4073 100755 --- a/fishy.lua +++ b/fishy.lua @@ -3,6 +3,11 @@ local FONT = select(1, GameFontNormalSmall:GetFont()) local fb = CreateFrame"Frame" local db local char = string.format("%s - %s", UnitName"player", GetRealmName()) +local ADDON_NAME, namespace = ... --localization +local L = namespace.L --localization +local version = GetAddOnMetadata(ADDON_NAME, "Version") +local addoninfo = 'v'..version + fb:RegisterEvent"PLAYER_ENTERING_WORLD" fb:RegisterEvent"ADDON_LOADED" @@ -18,76 +23,76 @@ local function Print(text) end local zones = { - ["Dun Morogh"] = -70, - ["Durotar"] = -70, - ["Elwynn Forest"] = -70, - ["Mulgore"] = -70, - ["Eversong Forest"] = -70, - ["Azuremyst Isle"] = -70, - ["Teldrassil"] = -70, - ["Tirisfal Glades"] = -70, - ["Orgrimmar"] = -20, - ["Ironforge"] = -20, - ["Stormwind City"] = -20, - ["Thunder Bluff"] = -20, - ["Silvermoon City"] = -20, - ["The Exodar"] = -20, - ["Darnassus"] = -20, - ["Undercity"] = -20, - ["The Barrens"] = -20, - ["Blackfathom Deeps"] = -20, - ["Bloodmyst Isle"] = -20, - ["Darkshore"] = -20, - ["The Deadmines"] = -20, - ["Ghostlands"] = -20, - ["Loch Modan"] = -20, - ["Silverpine Forest"] = -20, - ["The Wailing Caverns"] = -20, - ["Westfall"] = -20, - ["Ashenvale"] = 55, - ["Duskwood"] = 55, - ["Hillsbrad Foothills"] = 55, - ["Redridge Mountains"] = 55, - ["Stonetalon Mountains"] = 55, - ["Wetlands"] = 55, - ["Alterac Mountains"] = 130, - ["Arathi Highlands"] = 130, - ["Desolace"] = 130, - ["Dustwallow Marsh"] = 130, - ["Scarlet Monastery"] = 130, - ["Stranglethorn Vale"] = 130, - ["Swamp of Sorrows"] = 130, - ["Thousand Needles"] = 130, - ["Azshara"] = 205, - ["Felwood"] = 205, - ["Feralas"] = 205, - ["The Hinterlands"] = 205, - ["Maraudon"] = 205, - ["Moonglade"] = 205, - ["Tanaris"] = 205, - ["The Temple of Atal'Hakkar"] = 205, - ["Un'Goro Crater"] = 205, - ["Western Plaguelands"] = 205, - ["Shadowmoon Valley"] = 280, - ["Zangarmarsh"] = 305, - ["Burning Steppes"] = 330, - ["Deadwind Pass"] = 330, - ["Eastern Plaguelands"] = 330, - ["Scholomance"] = 330, - ["Silithus"] = 330, - ["Stratholme"] = 330, - ["Winterspring"] = 330, - ["Zul'Gurub"] = 330, - ["Terokkar Forest"] = 355, - ["Nagrand"] = 380, - ["Netherstorm"] = 380, - ["Borean Tundra"] = 380, - ["Dragonblight"] = 380, - ["Howling Fjord"] = 380, - ["Crystalsong Forest"] = 405, - ["Dalaran"] = 430, - ["Sholazar Basin"] = 430, - ["The Frozen Sea"] = 480, + [L["Dun Morogh"]] = -70, + [L["Durotar"]] = -70, + [L["Elwynn Forest"]] = -70, + [L["Mulgore"]] = -70, + [L["Eversong Forest"]] = -70, + [L["Azuremyst Isle"]] = -70, + [L["Teldrassil"]] = -70, + [L["Tirisfal Glades"]] = -70, + [L["Orgrimmar"]] = -20, + [L["Ironforge"]] = -20, + [L["Stormwind City"]] = -20, + [L["Thunder Bluff"]] = -20, + [L["Silvermoon City"]] = -20, + [L["The Exodar"]] = -20, + [L["Darnassus"]] = -20, + [L["Undercity"]] = -20, + [L["The Barrens"]] = -20, + [L["Blackfathom Deeps"]] = -20, + [L["Bloodmyst Isle"]] = -20, + [L["Darkshore"]] = -20, + [L["The Deadmines"]] = -20, + [L["Ghostlands"]] = -20, + [L["Loch Modan"]] = -20, + [L["Silverpine Forest"]] = -20, + [L["The Wailing Caverns"]] = -20, + [L["Westfall"]] = -20, + [L["Ashenvale"]] = 55, + [L["Duskwood"]] = 55, + [L["Hillsbrad Foothills"]] = 55, + [L["Redridge Mountains"]] = 55, + [L["Stonetalon Mountains"]] = 55, + [L["Wetlands"]] = 55, + [L["Alterac Mountains"]] = 130, + [L["Arathi Highlands"]] = 130, + [L["Desolace"]] = 130, + [L["Dustwallow Marsh"]] = 130, + [L["Scarlet Monastery"]] = 130, + [L["Stranglethorn Vale"]] = 130, + [L["Swamp of Sorrows"]] = 130, + [L["Thousand Needles"]] = 130, + [L["Azshara"]] = 205, + [L["Felwood"]] = 205, + [L["Feralas"]] = 205, + [L["The Hinterlands"]] = 205, + [L["Maraudon"]] = 205, + [L["Moonglade"]] = 205, + [L["Tanaris"]] = 205, + [L["The Temple of Atal'Hakkar"]] = 205, + [L["Un'Goro Crater"]] = 205, + [L["Western Plaguelands"]] = 205, + [L["Shadowmoon Valley"]] = 280, + [L["Zangarmarsh"]] = 305, + [L["Burning Steppes"]] = 330, + [L["Deadwind Pass"]] = 330, + [L["Eastern Plaguelands"]] = 330, + [L["Scholomance"]] = 330, + [L["Silithus"]] = 330, + [L["Stratholme"]] = 330, + [L["Winterspring"]] = 330, + [L["Zul'Gurub"]] = 330, + [L["Terokkar Forest"]] = 355, + [L["Nagrand"]] = 380, + [L["Netherstorm"]] = 380, + [L["Borean Tundra"]] = 380, + [L["Dragonblight"]] = 380, + [L["Howling Fjord"]] = 380, + [L["Crystalsong Forest"]] = 405, + [L["Dalaran"]] = 430, + [L["Sholazar Basin"]] = 430, + [L["The Frozen Sea"]] = 480, } local subzones = { ["Jaguero Isle"] = 205, @@ -131,7 +136,7 @@ local function UpdateFishCount(shouldIncrement) end Fishbringer.fishCount:SetFormattedText( - "%d fish caught at this level", + L["%d fish caught at this level"], db[char].fishCaught ) end @@ -195,16 +200,16 @@ local function UpdateCatchInfo() color = "ff40bf40" end Fishbringer.zoneInfo:SetFormattedText( - "\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)", + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"], color, zoneText, zoneSkill, maxZoneSkill, chance * 100 ) - Fishbringer.catchRate:SetFormattedText("%d%% catch rate", chance * 100) + Fishbringer.catchRate:SetFormattedText(L["%d%% catch rate"], chance * 100) end local function GetFishingSkill() for i = 1, GetNumSkillLines() do local skillName, _, _, skillRank, _, skillModifier, skillMaxRank, _, _, _, _, _, _= GetSkillLineInfo(i) - if skillName == "Fishing" then + if skillName == L["Fishing"] then return skillRank, skillModifier, skillMaxRank end end @@ -229,7 +234,7 @@ local function UpdateSkill(forceResetFishCounter) local fishNeeded = GetNumFishToLevel(skillRank) if skillRank ~= skillMaxRank then skillRankText = string.format("%d/%d", skillRank, skillMaxRank) - fishNeededText = string.format("\n%d fish needed to skill up", fishNeeded) + fishNeededText = string.format(L["\n%d fish needed to skill up"], fishNeeded) end local skillModifierText = "" @@ -238,7 +243,7 @@ local function UpdateSkill(forceResetFishCounter) end Fishbringer.content:SetFormattedText( - "%s%s fishing skill%s", + L["%s%s fishing skill%s"], skillRankText, skillModifierText, fishNeededText @@ -456,11 +461,11 @@ fb.ZONE_CHANGED = UpdateCatchInfo fb.UNIT_INVENTORY_CHANGED = CheckForFishingPole local function ShowHelp() - Print("Nat Pagle would be proud of you.") - Print("- /fishbringer show - Toggles visibility.") - Print("- /fishbringer align - Cycles through text alignment.") - Print("- /fishbringer count - Toggles fish count visibility.") - Print("- /fishbringer reset - Resets the fish database.") + Print(L["Nat Pagle would be proud of you."]) + Print(L["- /fishbringer show - Toggles visibility."]) + Print(L["- /fishbringer align - Cycles through text alignment."]) + Print(L["- /fishbringer count - Toggles fish count visibility."]) + Print(L["- /fishbringer reset - Resets the fish database."]) end SlashCmdList["FISHBRINGER"] = function(arg) @@ -483,4 +488,4 @@ SLASH_FISHBRINGER1 = "/fishbringer" if not select(4, GetAddOnInfo"Fishing Buddy") then SLASH_FISHBRINGER2 = "/fb" end -Print("Pack yer bags, we be leavin' fer fishin'!") +Print(L["Pack yer bags, we be leavin' fer fishin'!"]) diff --git a/localization.core.lua b/localization.core.lua new file mode 100644 index 0000000..1e207a7 --- /dev/null +++ b/localization.core.lua @@ -0,0 +1,10 @@ +local _, namespace = ... +namespace.locale = GetLocale() +--print("at core",namespace.locale) +local L = setmetatable({}, { __index = function(t, k) + local v = tostring(k) + rawset(t, k, v) + return v +end }) + +namespace.L = L From 1f7b487c136214501155825afad228f3818429a4 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Sun, 1 Dec 2019 20:01:45 +0100 Subject: [PATCH 02/22] Little Typeo fix --- Fishbringer.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index 113abdb..5992583 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -2,7 +2,7 @@ ## Title: Fishbringer ## Title-deDR: Fishbringer ## Notes: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! -## Notes-deDE: Das legend\195\164re Fishbringer, Leitfaden des Scharlachroten Hochlords! Nat Pagle w\195\164re stolz auf dich! +## Notes-deDE: Das legendäre Fishbringer, Leitfaden des Scharlachroten Hochlords! Nat Pagle wäre stolz auf dich! ## Author: Kalerath ## SavedVariables: FishbringerDB ## Version: 1.13-3 From 03a3b0144287d12ebeb0c0abe11ad798265b4f52 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Sun, 1 Dec 2019 20:02:16 +0100 Subject: [PATCH 03/22] Update Fishbringer.toc --- Fishbringer.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index 5992583..9ef5024 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -1,6 +1,6 @@ ## Interface: 11302 ## Title: Fishbringer -## Title-deDR: Fishbringer +## Title-deDE: 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! ## Author: Kalerath From b1d70079f4cac2fc6de2c69e46271566f7e7e16b Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Fri, 6 Dec 2019 08:54:39 +0100 Subject: [PATCH 04/22] Hide/Show, Template for Loclization * Changed hide/show for equipping fishing poles + Added Template for Russian Localization and more --- Fishbringer.toc | 1 + Localization.ruRU.lua | 101 ++++++++++++++++++++++++++++++++++++++++++ fishy.lua | 2 +- 3 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 Localization.ruRU.lua diff --git a/Fishbringer.toc b/Fishbringer.toc index 9ef5024..28d1739 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -9,5 +9,6 @@ localization.core.lua Localization.deDE.lua +Localization.ruRU.lua fishy.lua diff --git a/Localization.ruRU.lua b/Localization.ruRU.lua new file mode 100644 index 0000000..0603c5a --- /dev/null +++ b/Localization.ruRU.lua @@ -0,0 +1,101 @@ +local ADDON_NAME, namespace = ... +local L = namespace.L + +if namespace.locale == "ruRU" then + + --*** Important Info: Don't change the Original Text + + --ShowHelp Function + L["Nat Pagle would be proud of you."] = "" + L["- /fishbringer show - Toggles visibility."] = "" + L["- /fishbringer align - Cycles through text alignment."] = "" + L["- /fishbringer count - Toggles fish count visibility."] = "" + L["- /fishbringer reset - Resets the fish database."] = "" + + --Anzeige auf Bildschirm - Fishbringer Overlay/Display Widget + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "" + L["%d%% catch rate"] = "" + L["%s%s fishing skill%s"] = "" + L["\n%d fish needed to skill up"] = "" + L["%d fish caught at this level"] = "" + + -- Angeln/Fishing - Name of the Fishing Perk - put the localized name into the "" + L["Fishing"] = "" + + -- Welcome Message on Login - put the localized text into the "" + L["Pack yer bags, we be leavin' fer fishin'!"] = "" + + -- Angelzonen/Fishing Zones - put the localized names into the "". Example: L["Dun Morogh"] = "Localized Name of the Zone" + L["Dun Morogh"] = "" + L["Durotar"] = "" + L["Elwynn Forest"] = "" + L["Mulgore"] = "" + L["Eversong Forest"] = "" + L["Azuremyst Isle"] = "" + L["Teldrassil"] = "" + L["Tirisfal"] = "" + L["Orgrimmar"] = "" + L["Ironforge"] = "" + L["Stormwind City"] = "" + L["Thunder Bluff"] = "" + L["Silvermoon City"] = "" + L["The Exodar"] = "" + L["Darnassus"] = "" + L["Undercity"] = "" + L["The Barrens"] = "" + L["Blackfathom Deeps"] = "" + L["Bloodmyst Isle"] = "" + L["Darkshore"] = "" + L["The Deadmines"] = "" + L["Ghostlands"] = "" + L["Loch Modan"] = "" + L["Silverpine Forest"] = "" + L["The Wailing Caverns"] = "" + L["Westfall"] = "" + L["Ashenvale"] = "" + L["Duskwood"] = "" + L["Hillsbrad Foothills"] = "" + L["Redridge Mountains"] = "" + L["Stonetalon Mountains"] = "" + L["Wetlands"] = "" + L["Alterac Mountains"] = "" + L["Arathi Highlands"] = "" + L["Desolace"] = "" + L["Dustwallow Marsh"] = "" + L["Scarlet Monastery"] = "" + L["Stranglethorn Vale"] = "" + L["Swamp of Sorrows"] = "" + L["Thousand Needles"] = "" + L["Azshara"] = "" + L["Teufelswald"] = "" + L["Feralas"] = "" + L["The Hinterlands"] = "" + L["Maraudon"] = "" + L["Moonglade"] = "" + L["Tanaris"] = "" + L["The Temple of Atal'Hakkar"] = "" + L["Un'Goro Crater"] = "" + L["Western Plaguelands"] = "" + L["Shadowmoon Valley"] = "" + L["Zangarmarsh"] = "" + L["Burning Steppes"] = "" + L["Deadwind Pass"] = "" + L["Eastern Plaguelands"] = "" + L["Scholomance"] = "" + L["Silithus"] = "" + L["Stratholme"] = "" + L["Winterspring"] = "" + L["Zul'Gurub"] = "" + L["Terokkar Forest"] = "" + L["Nagrand"] = "" + L["Netherstorm"] = "" + L["Borean Tundra"] = "" + L["Dragonblight"] = "" + L["Howling Fjord"] = "" + L["Crystalsong Forest"] = "" + L["Dalaran"] = "" + L["Sholazar Basin"] = "" + L["The Frozen Sea"] = "" + + +return end \ No newline at end of file diff --git a/fishy.lua b/fishy.lua index 02a4073..51a75df 100755 --- a/fishy.lua +++ b/fishy.lua @@ -305,7 +305,7 @@ end local function CheckForFishingPole() local _, _, itemid = string.find(GetInventoryItemLink("player", GetInventorySlotInfo("MainHandSlot")) or "", "item:(%d+):(.+)") - if db[char].isShown or fishingpoles[tonumber(itemid)] then + if fishingpoles[tonumber(itemid)] then Update() Fishbringer:Show() db[char].isShown = true From f40a71051d50894128db817040f4711da6529ba0 Mon Sep 17 00:00:00 2001 From: leafoe <39996564+leafoe@users.noreply.github.com> Date: Fri, 6 Dec 2019 14:46:29 +0300 Subject: [PATCH 05/22] Update Localization.ruRU.lua --- Localization.ruRU.lua | 166 +++++++++++++++++++++--------------------- 1 file changed, 83 insertions(+), 83 deletions(-) diff --git a/Localization.ruRU.lua b/Localization.ruRU.lua index 0603c5a..a1845c7 100644 --- a/Localization.ruRU.lua +++ b/Localization.ruRU.lua @@ -6,96 +6,96 @@ if namespace.locale == "ruRU" then --*** Important Info: Don't change the Original Text --ShowHelp Function - L["Nat Pagle would be proud of you."] = "" - L["- /fishbringer show - Toggles visibility."] = "" - L["- /fishbringer align - Cycles through text alignment."] = "" - L["- /fishbringer count - Toggles fish count visibility."] = "" - L["- /fishbringer reset - Resets the fish database."] = "" + L["Nat Pagle would be proud of you."] = "Нат Пэгл будет гордиться тобой." + L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Переключает видимость." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Выравнивание текста." + L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Переключает видимость счетчика пойманной рыбы." + L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Сбросить данные." --Anzeige auf Bildschirm - Fishbringer Overlay/Display Widget - L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "" - L["%d%% catch rate"] = "" - L["%s%s fishing skill%s"] = "" - L["\n%d fish needed to skill up"] = "" - L["%d fish caught at this level"] = "" + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d навыка требуется для рыбалки\n(%d требуется для 100%% успеха)" + L["%d%% catch rate"] = "%d%% шанс поймать" + L["%s%s fishing skill%s"] = "%s%s навык рыбной ловли" + L["\n%d fish needed to skill up"] = "\n%d рыб осталось до повышения навыка" + L["%d fish caught at this level"] = "%d рыб поймано на этом уровне" -- Angeln/Fishing - Name of the Fishing Perk - put the localized name into the "" - L["Fishing"] = "" + L["Fishing"] = "Рыбная ловля" -- Welcome Message on Login - put the localized text into the "" - L["Pack yer bags, we be leavin' fer fishin'!"] = "" + L["Pack yer bags, we be leavin' fer fishin'!"] = "Пакуй снасти, валим рыбачить!" -- Angelzonen/Fishing Zones - put the localized names into the "". Example: L["Dun Morogh"] = "Localized Name of the Zone" - L["Dun Morogh"] = "" - L["Durotar"] = "" - L["Elwynn Forest"] = "" - L["Mulgore"] = "" - L["Eversong Forest"] = "" - L["Azuremyst Isle"] = "" - L["Teldrassil"] = "" - L["Tirisfal"] = "" - L["Orgrimmar"] = "" - L["Ironforge"] = "" - L["Stormwind City"] = "" - L["Thunder Bluff"] = "" - L["Silvermoon City"] = "" - L["The Exodar"] = "" - L["Darnassus"] = "" - L["Undercity"] = "" - L["The Barrens"] = "" - L["Blackfathom Deeps"] = "" - L["Bloodmyst Isle"] = "" - L["Darkshore"] = "" - L["The Deadmines"] = "" - L["Ghostlands"] = "" - L["Loch Modan"] = "" - L["Silverpine Forest"] = "" - L["The Wailing Caverns"] = "" - L["Westfall"] = "" - L["Ashenvale"] = "" - L["Duskwood"] = "" - L["Hillsbrad Foothills"] = "" - L["Redridge Mountains"] = "" - L["Stonetalon Mountains"] = "" - L["Wetlands"] = "" - L["Alterac Mountains"] = "" - L["Arathi Highlands"] = "" - L["Desolace"] = "" - L["Dustwallow Marsh"] = "" - L["Scarlet Monastery"] = "" - L["Stranglethorn Vale"] = "" - L["Swamp of Sorrows"] = "" - L["Thousand Needles"] = "" - L["Azshara"] = "" - L["Teufelswald"] = "" - L["Feralas"] = "" - L["The Hinterlands"] = "" - L["Maraudon"] = "" - L["Moonglade"] = "" - L["Tanaris"] = "" - L["The Temple of Atal'Hakkar"] = "" - L["Un'Goro Crater"] = "" - L["Western Plaguelands"] = "" - L["Shadowmoon Valley"] = "" - L["Zangarmarsh"] = "" - L["Burning Steppes"] = "" - L["Deadwind Pass"] = "" - L["Eastern Plaguelands"] = "" - L["Scholomance"] = "" - L["Silithus"] = "" - L["Stratholme"] = "" - L["Winterspring"] = "" - L["Zul'Gurub"] = "" - L["Terokkar Forest"] = "" - L["Nagrand"] = "" - L["Netherstorm"] = "" - L["Borean Tundra"] = "" - L["Dragonblight"] = "" - L["Howling Fjord"] = "" - L["Crystalsong Forest"] = "" - L["Dalaran"] = "" - L["Sholazar Basin"] = "" - L["The Frozen Sea"] = "" + L["Dun Morogh"] = "Дун Морог" + L["Durotar"] = "Дуротар" + L["Elwynn Forest"] = "Элвиннский лес" + L["Mulgore"] = "Мулгор" + L["Eversong Forest"] = "Леса Вечной Песни" + L["Azuremyst Isle"] = "Остров Лазурной Дымки" + L["Teldrassil"] = "Тельдрассил" + L["Tirisfal"] = "Тирисфаль" + L["Orgrimmar"] = "Оргриммар" + L["Ironforge"] = "Стальгорн" + L["Stormwind City"] = "Штормград" + L["Thunder Bluff"] = "Громовой Утес" + L["Silvermoon City"] = "Луносвет" + L["The Exodar"] = "Экзодар" + L["Darnassus"] = "Дарнас" + L["Undercity"] = "Подгород" + L["The Barrens"] = "Степи" + L["Blackfathom Deeps"] = "Непроглядная Пучина" + L["Bloodmyst Isle"] = "Остров Кровавой Дымки" + L["Darkshore"] = "Темные берега" + L["The Deadmines"] = "Мертвые копи" + L["Ghostlands"] = "Призрачные земли" + L["Loch Modan"] = "Лок Модан" + L["Silverpine Forest"] = "Серебряный бор" + L["The Wailing Caverns"] = "Пещеры Стенаний" + L["Westfall"] = "Западный Край" + L["Ashenvale"] = "Ясеневый лес" + L["Duskwood"] = "Сумеречный лес" + L["Hillsbrad Foothills"] = "Предгорья Хилсбрада" + L["Redridge Mountains"] = "Красногорье" + L["Stonetalon Mountains"] = "Когтистые горы" + L["Wetlands"] = "Болотина" + L["Alterac Mountains"] = "Альтеракские горы" + L["Arathi Highlands"] = "Нагорье Арати" + L["Desolace"] = "Пустоши" + L["Dustwallow Marsh"] = "Пылевые топи" + L["Scarlet Monastery"] = "Монастырь Алого ордена" + L["Stranglethorn Vale"] = "Тернистая долина" + L["Swamp of Sorrows"] = "Болото Печали" + L["Thousand Needles"] = "Тысяча Игл" + L["Azshara"] = "Азшара" + L["Felwood"] = "Оскверненный лес" + L["Feralas"] = "Фералас" + L["The Hinterlands"] = "Внутренние земли" + L["Maraudon"] = "Мародон" + L["Moonglade"] = "Лунная поляна" + L["Tanaris"] = "Танарис" + L["The Temple of Atal'Hakkar"] = "Храм Атал'Хаккара" + L["Un'Goro Crater"] = "Кратер Ун'Горо" + L["Western Plaguelands"] = "Западные Чумные земли" + L["Shadowmoon Valley"] = "Долина Призрачной Луны" + L["Zangarmarsh"] = "Зангартопь" + L["Burning Steppes"] = "Пылающие степи" + L["Deadwind Pass"] = "Перевал Мертвого Ветра" + L["Eastern Plaguelands"] = "Восточные Чумные земли" + L["Scholomance"] = "Некроситет" + L["Silithus"] = "Силитус" + L["Stratholme"] = "Стратхольм" + L["Winterspring"] = "Зимние Ключи" + L["Zul'Gurub"] = "Зул'Гуруб" + L["Terokkar Forest"] = "Лес Тероккар" + L["Nagrand"] = "Награнд" + L["Netherstorm"] = "Пустоверть" + L["Borean Tundra"] = "Борейская тундра" + L["Dragonblight"] = "Драконий Погост" + L["Howling Fjord"] = "Ревущий фьорд" + L["Crystalsong Forest"] = "Лес Хрустальной Песни" + L["Dalaran"] = "Даларан" + L["Sholazar Basin"] = "Низина Шолазар" + L["The Frozen Sea"] = "The Frozen Sea" -return end \ No newline at end of file +return end From c89f2bde6d7ba08a398d40a5cedd7df3b90a225d Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Sat, 7 Dec 2019 10:42:25 +0100 Subject: [PATCH 06/22] Update Fishbringer.toc --- Fishbringer.toc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index 28d1739..5935b2e 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -1,9 +1,11 @@ ## Interface: 11302 ## Title: Fishbringer ## Title-deDE: Fishbringer +## Title-ruRU: ## 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! -## Author: Kalerath +## Notes-ruRU: +## Author: Kalerath, Godot-Fye (German Localization), leafoe (Russian Localizatin) ## SavedVariables: FishbringerDB ## Version: 1.13-3 From dc98fab41eea61c30ecfd8af6a499690bf6537a0 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Sat, 7 Dec 2019 16:05:20 +0100 Subject: [PATCH 07/22] Update Fishbringer.toc --- Fishbringer.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index 5935b2e..e90dd46 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -1,11 +1,11 @@ ## Interface: 11302 ## Title: Fishbringer ## Title-deDE: Fishbringer -## Title-ruRU: +## 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: -## Author: Kalerath, Godot-Fye (German Localization), leafoe (Russian Localizatin) +## Author: Kalerath, Fye (German Localization), leafoe (Russian Localization) ## SavedVariables: FishbringerDB ## Version: 1.13-3 From 536a2bf7bd56c3c907731972432ffdce5d577e93 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Wed, 11 Dec 2019 18:16:24 +0100 Subject: [PATCH 08/22] Set theme jekyll-theme-minimal --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..2f7efbe --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-minimal \ No newline at end of file From e9c4f708e3cbb4fc061801a31265150d9235ddc2 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Wed, 11 Dec 2019 18:17:28 +0100 Subject: [PATCH 09/22] Delete _config.yml --- _config.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 _config.yml diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 2f7efbe..0000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-minimal \ No newline at end of file From 53e9a7a8d9e9fd49f211129b2677aeefda526c06 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Wed, 11 Dec 2019 18:40:37 +0100 Subject: [PATCH 10/22] Updatet toc file for Classic Patch 1.13.3 --- Fishbringer.toc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index e90dd46..4244c5e 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -1,10 +1,10 @@ -## Interface: 11302 +## Interface: 11303 ## 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-ruRU: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! ## Author: Kalerath, Fye (German Localization), leafoe (Russian Localization) ## SavedVariables: FishbringerDB ## Version: 1.13-3 From 47c05053846db60f2a4d710189c34302514ee0bc Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Thu, 12 Dec 2019 16:50:39 +0100 Subject: [PATCH 11/22] Little Changes --- Localization.deDE.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Localization.deDE.lua b/Localization.deDE.lua index d747111..26a0c3c 100644 --- a/Localization.deDE.lua +++ b/Localization.deDE.lua @@ -17,11 +17,15 @@ if namespace.locale == "deDE" then L["\n%d fish needed to skill up"] = "\n%d Fische benötigt für Skillpunkt" L["%d fish caught at this level"] = "%d Fische auf diesem Level gefangen" + -- Name des Angelperks / Name of the Fishingperk + L["Fishing"] = "Angeln" + -- Login Message + L["Pack yer bags, we be leavin' fer fishin'!"] = "Pack deine Taschen, wir gehen angeln!" - -- Angelzonen + -- Angelzonen / Fishingzones L["Dun Morogh"] = "Dun Morogh" L["Durotar"] = "Durotar" @@ -92,7 +96,6 @@ if namespace.locale == "deDE" then L["Crystalsong Forest"] = "Kristallsangwald" L["Dalaran"] = "Dalaran" L["Sholazar Basin"] = "Sholazarbecken" - L["The Frozen Sea"] = "" - + L["The Frozen Sea"] = "Die gefrorene See" return end \ No newline at end of file From c3615088383a90433bb883c2080289344810ef6f Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Fri, 27 Dec 2019 08:44:03 +0100 Subject: [PATCH 12/22] Updated Catchrate Info, Bugfix German Localization * The catch rate will now update correctly if your Fishing Skill level up * Fixed a bug in the german localization (catch rate didn't show up correctly in Alterac Mountains) * Little updates inside the toc file --- Fishbringer.toc | 4 ++-- Localization.deDE.lua | 2 +- fishy.lua | 43 ++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 45 insertions(+), 4 deletions(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index 4244c5e..1fa87fc 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -5,9 +5,9 @@ ## 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: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! -## Author: Kalerath, Fye (German Localization), leafoe (Russian Localization) +## Author: Kalerath, Fye (Localization Code & Bugfixes), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 1.13-3 +## Version: 1.13-4 localization.core.lua Localization.deDE.lua diff --git a/Localization.deDE.lua b/Localization.deDE.lua index 26a0c3c..e4d884b 100644 --- a/Localization.deDE.lua +++ b/Localization.deDE.lua @@ -59,7 +59,7 @@ if namespace.locale == "deDE" then L["Redridge Mountains"] = "Rotkammgebirge" L["Stonetalon Mountains"] = "Steinkrallengebirge" L["Wetlands"] = "Sumpfland" - L["Alterac Mountains"] = "Alteractal" + L["Alterac Mountains"] = "Alteracgebirge" L["Arathi Highlands"] = "Arathihochland" L["Desolace"] = "Desolace" L["Dustwallow Marsh"] = "Marschen von Dustwallow" diff --git a/fishy.lua b/fishy.lua index 51a75df..adc8891 100755 --- a/fishy.lua +++ b/fishy.lua @@ -252,6 +252,7 @@ local function UpdateSkill(forceResetFishCounter) if forceResetFishCounter or db[char].fishingSkill ~= skillRank then db[char].fishingSkill = skillRank ResetFishCounter(fishNeeded) + UpdateCatchInfo() end if db[char].fishingBuff ~= skillModifier then @@ -466,6 +467,44 @@ local function ShowHelp() Print(L["- /fishbringer align - Cycles through text alignment."]) Print(L["- /fishbringer count - Toggles fish count visibility."]) Print(L["- /fishbringer reset - Resets the fish database."]) + + --[[local FishbringerUI = {} + + local FishbringerUI = CreateFrame("Frame", "FishbringerUI", UIParent, "BasicFrameTemplateWithInset") + FishbringerUI:SetSize(300, 400); + FishbringerUI:SetPoint("Center", UIParent, "Center"); + FishbringerUI:EnableMouse(true); + FishbringerUI:SetMovable(true); + FishbringerUI:RegisterForDrag("LeftButton") + FishbringerUI:SetScript("OnDragStart", FishbringerUI.StartMoving) + FishbringerUI:SetScript("OnDragStop", FishbringerUI.StopMovingOrSizing) + FishbringerUI:Show(); + + FishbringerUI.title = FishbringerUI:CreateFontString(nil, "Overlay"); + FishbringerUI.title:SetFontObject("GameFontHighlight"); + FishbringerUI.title:SetPoint("Center", FishbringerUI.TitleBg, "Center", 5, 0); + FishbringerUI.title:SetText("|cFF00FF00Fishbringer v1.13.4"); + + MoveableWindowButton = CreateFrame("CheckButton", "MoveableWindowButton_GlobalName", FishbringerUI, "ChatConfigCheckButtonTemplate"); + MoveableWindowButton:SetPoint("TOPLEFT", 10, -60); + MoveableWindowButton_GlobalNameText:SetText("Window Moveable"); + MoveableWindowButton.tooltip = "Let's move the Window...or not?"; + MoveableWindowButton:SetScript("OnClick", + function() + --FishbringerUI:SetMovable(false) + end + ); + + ToggleButton = CreateFrame("CheckButton", "ToggleButton_GlobalName", FishbringerUI, "ChatConfigCheckButtonTemplate"); + ToggleButton:SetPoint("TOPLEFT", 10, -30); + ToggleButton_GlobalNameText:SetText("Show/Hide the Fishing Widget"); + ToggleButton.tooltip = "Toggles the Widget visibility."; + ToggleButton:SetScript("OnClick", + function() + Toggle(); + end + ); --]] + end SlashCmdList["FISHBRINGER"] = function(arg) @@ -483,9 +522,11 @@ SlashCmdList["FISHBRINGER"] = function(arg) end return ShowHelp() end + SLASH_FISHBRINGER1 = "/fishbringer" -- Hail to Fishing Buddy! -if not select(4, GetAddOnInfo"Fishing Buddy") then +if not select(4, GetAddOnInfo"FishingBuddy") then SLASH_FISHBRINGER2 = "/fb" end + Print(L["Pack yer bags, we be leavin' fer fishin'!"]) From 05d9cb81870b046c408155efb1d15a76fc316935 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Fri, 28 May 2021 09:23:10 +0200 Subject: [PATCH 13/22] First update for coming Burning Crusade Release - Updated TOC File for Burning Crusade 2.5.1 - Updated German & Russian Localization for Burning Crusade Fishing Zones - Updated the code to work with Burning Crusade --- Fishbringer.toc | 4 +-- Localization.deDE.lua | 14 +++++++-- Localization.ruRU.lua | 14 +++++++-- fishy.lua | 66 +++++++++++++++++++++++++++++-------------- 4 files changed, 71 insertions(+), 27 deletions(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index 1fa87fc..46e9eb3 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -1,4 +1,4 @@ -## Interface: 11303 +## Interface: 20501 ## Title: Fishbringer ## Title-deDE: Fishbringer ## Title-ruRU: Fishbringer @@ -7,7 +7,7 @@ ## Notes-ruRU: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! ## Author: Kalerath, Fye (Localization Code & Bugfixes), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 1.13-4 +## Version: 1.20 localization.core.lua Localization.deDE.lua diff --git a/Localization.deDE.lua b/Localization.deDE.lua index e4d884b..95bea10 100644 --- a/Localization.deDE.lua +++ b/Localization.deDE.lua @@ -68,7 +68,7 @@ if namespace.locale == "deDE" then L["Swamp of Sorrows"] = "Sümpfe des Elends" L["Thousand Needles"] = "Tausend Nadeln" L["Azshara"] = "Azshara" - L["Teufelswald"] = "Felwood" + L["Felwood"] = "Teufelswald" L["Feralas"] = "Feralas" L["The Hinterlands"] = "Hinterland" L["Maraudon"] = "Maraudon" @@ -78,7 +78,6 @@ if namespace.locale == "deDE" then L["Un'Goro Crater"] = "Un'Goro-Krater" L["Western Plaguelands"] = "Westliche Pestländer" L["Shadowmoon Valley"] = "Schattenmondtal" - L["Zangarmarsh"] = "Zangarmarschen" L["Burning Steppes"] = "Brennende Steppe" L["Deadwind Pass"] = "Gebirgspass der Todenwinde" L["Eastern Plaguelands"] = "Östliche Pestländer" @@ -87,9 +86,20 @@ if namespace.locale == "deDE" then L["Stratholme"] = "Stratholme" L["Winterspring"] = "Winterspring" L["Zul'Gurub"] = "Zul'Gurub" + --- Burning Crusade L["Terokkar Forest"] = "Wälder von Terokkar" L["Nagrand"] = "Nagrand" L["Netherstorm"] = "Nethersturm" + L["Zangarmarsh"] = "Zangarmarschen" + -- Burning Crusade Subzones + L["Lake Sunspring"] = "Lake Sunspring" -- Nagrand + L["Marshlight Lake"] = "Sumpflichtsee" -- Zangarmarschen + L["Sporewind Lake"] = "Sporenwindsee" -- Zangarmarschen + L["Serpent Lake"] = "Schlangensee" -- Zangarmarschen + L["Blackwind Lake"] = "Schattenwindsee" -- Wälder von Terokarr + L["Lake Ere'Noru"] = "See von Ere'Noru" -- Wälder von Terokarr + L["Lake Jorune"] = "Jorunsee" -- Wälder von Terokarr + --- WOTLK L["Borean Tundra"] = "Boreanische Tundra" L["Dragonblight"] = "Drachenöde" L["Howling Fjord"] = "Heulende Fjord" diff --git a/Localization.ruRU.lua b/Localization.ruRU.lua index a1845c7..684274f 100644 --- a/Localization.ruRU.lua +++ b/Localization.ruRU.lua @@ -77,7 +77,6 @@ if namespace.locale == "ruRU" then L["Un'Goro Crater"] = "Кратер Ун'Горо" L["Western Plaguelands"] = "Западные Чумные земли" L["Shadowmoon Valley"] = "Долина Призрачной Луны" - L["Zangarmarsh"] = "Зангартопь" L["Burning Steppes"] = "Пылающие степи" L["Deadwind Pass"] = "Перевал Мертвого Ветра" L["Eastern Plaguelands"] = "Восточные Чумные земли" @@ -86,16 +85,27 @@ if namespace.locale == "ruRU" then L["Stratholme"] = "Стратхольм" L["Winterspring"] = "Зимние Ключи" L["Zul'Gurub"] = "Зул'Гуруб" + -- The Burning Crusade L["Terokkar Forest"] = "Лес Тероккар" L["Nagrand"] = "Награнд" L["Netherstorm"] = "Пустоверть" + L["Zangarmarsh"] = "Зангартопь" + -- Burning Crusade Subzones + L["Lake Sunspring"] = "Озеро Солнечного Источника" -- Nagrand + L["Marshlight Lake"] = "Озеро Болотных Огоньков" -- Zangarmarschen + L["Sporewind Lake"] = "Озеро Спороветра" -- Zangarmarschen + L["Serpent Lake"] = "Змеиное озеро" -- Zangarmarschen + L["Blackwind Lake"] = "Озеро Черного Ветра" -- Wälder von Terokarr + L["Lake Ere'Noru"] = "Озеро Эре'Нору" -- Wälder von Terokarr + L["Lake Jorune"] = "Озеро Иорун" -- Wälder von Terokarr + -- Wrath of the Lich King L["Borean Tundra"] = "Борейская тундра" L["Dragonblight"] = "Драконий Погост" L["Howling Fjord"] = "Ревущий фьорд" L["Crystalsong Forest"] = "Лес Хрустальной Песни" L["Dalaran"] = "Даларан" L["Sholazar Basin"] = "Низина Шолазар" - L["The Frozen Sea"] = "The Frozen Sea" + L["The Frozen Sea"] = "Ледяное море" return end diff --git a/fishy.lua b/fishy.lua index adc8891..52a40f5 100755 --- a/fishy.lua +++ b/fishy.lua @@ -74,7 +74,7 @@ local zones = { [L["Un'Goro Crater"]] = 205, [L["Western Plaguelands"]] = 205, [L["Shadowmoon Valley"]] = 280, - [L["Zangarmarsh"]] = 305, + [L["Zangarmarsh"]] = 305, -- Burning Crusade [L["Burning Steppes"]] = 330, [L["Deadwind Pass"]] = 330, [L["Eastern Plaguelands"]] = 330, @@ -86,6 +86,7 @@ local zones = { [L["Terokkar Forest"]] = 355, [L["Nagrand"]] = 380, [L["Netherstorm"]] = 380, + -- Wrath of the Lich King [L["Borean Tundra"]] = 380, [L["Dragonblight"]] = 380, [L["Howling Fjord"]] = 380, @@ -100,14 +101,14 @@ local subzones = { ["Hetaera's Clutch"] = 330, ["Scalebeard's Cave"] = 330, ["Jademir Lake"] = 330, - ["Marshlight Lake"] = 355, - ["Sporewind Lake"] = 355, - ["Serpent Lake"] = 355, - ["Lake Sunspring"] = 395, - ["Skysong Lake"] = 395, - ["Blackwind Lake"] = 405, - ["Lake Ere'Noru"] = 405, - ["Lake Jorune"] = 405, + [L["Marshlight Lake"]] = 355, + [L["Sporewind Lake"]] = 355, + [L["Serpent Lake"]] = 355, + [L["Lake Sunspring"]] = 395, + [L["Skysong Lake"]] = 395, + [L["Blackwind Lake"]] = 405, + [L["Lake Ere'Noru"]] = 405, + [L["Lake Jorune"]] = 405, } local fishingpoles = { @@ -342,12 +343,12 @@ local function InitializeFrame() if Fishbringer then return end - Fishbringer = CreateFrame("Frame", "Fishbringer", UIParent) + local Fishbringer = CreateFrame("Frame", "Fishbringer", UIParent, "BackdropTemplate") Fishbringer:EnableMouse(true) Fishbringer:SetMovable(true) Fishbringer:SetUserPlaced(true) Fishbringer:SetHeight(150) - Fishbringer:SetWidth(185) + Fishbringer:SetWidth(250) Fishbringer:SetBackdrop({ bgFile = "Interface\\ChatFrame\\ChatFrameBackground", tile = true, @@ -467,17 +468,35 @@ local function ShowHelp() Print(L["- /fishbringer align - Cycles through text alignment."]) Print(L["- /fishbringer count - Toggles fish count visibility."]) Print(L["- /fishbringer reset - Resets the fish database."]) +end - --[[local FishbringerUI = {} +local function FishbringerMenu() + --[[ + if FishrbingerUI then + return + end + local FishbringerUI = CreateFrame("Frame", "FishbringerUI", UIParent, "BasicFrameTemplateWithInset") FishbringerUI:SetSize(300, 400); FishbringerUI:SetPoint("Center", UIParent, "Center"); FishbringerUI:EnableMouse(true); - FishbringerUI:SetMovable(true); + FishbringerUI:SetMovable(false); FishbringerUI:RegisterForDrag("LeftButton") FishbringerUI:SetScript("OnDragStart", FishbringerUI.StartMoving) FishbringerUI:SetScript("OnDragStop", FishbringerUI.StopMovingOrSizing) + FishbringerUI:SetBackdrop({ + bgFile = "Interface\\ChatFrame\\ChatFrameBackground", + tile = true, + tileSize = 16, + insets = { + left = 4, + right = 4, + top = 4, + bottom = 4 + }, + }) + FishbringerUI:SetBackdropColor(0, 0, 0, .6) FishbringerUI:Show(); FishbringerUI.title = FishbringerUI:CreateFontString(nil, "Overlay"); @@ -485,17 +504,23 @@ local function ShowHelp() FishbringerUI.title:SetPoint("Center", FishbringerUI.TitleBg, "Center", 5, 0); FishbringerUI.title:SetText("|cFF00FF00Fishbringer v1.13.4"); - MoveableWindowButton = CreateFrame("CheckButton", "MoveableWindowButton_GlobalName", FishbringerUI, "ChatConfigCheckButtonTemplate"); - MoveableWindowButton:SetPoint("TOPLEFT", 10, -60); - MoveableWindowButton_GlobalNameText:SetText("Window Moveable"); - MoveableWindowButton.tooltip = "Let's move the Window...or not?"; - MoveableWindowButton:SetScript("OnClick", + tinsert(UISpecialFrames, FishbringerUI:GetName()) + + local MoveButton = CreateFrame("CheckButton", "MoveButton_GlobalName", FishbringerUI, "ChatConfigCheckButtonTemplate"); + MoveButton:SetPoint("TOPLEFT", 10, -60); + MoveButton_GlobalNameText:SetText("Window Moveable"); + MoveButton.tooltip = "Let's move the Window...or not?"; + MoveButton:SetScript("OnClick", function() - --FishbringerUI:SetMovable(false) + if FishbringerUI:IsMovable == false then + FishbringerUI:SetMovable(true) + else + FishbringerUI:SetMovable(false) + end end ); - ToggleButton = CreateFrame("CheckButton", "ToggleButton_GlobalName", FishbringerUI, "ChatConfigCheckButtonTemplate"); + local ToggleButton = CreateFrame("CheckButton", "ToggleButton_GlobalName", FishbringerUI, "ChatConfigCheckButtonTemplate"); ToggleButton:SetPoint("TOPLEFT", 10, -30); ToggleButton_GlobalNameText:SetText("Show/Hide the Fishing Widget"); ToggleButton.tooltip = "Toggles the Widget visibility."; @@ -504,7 +529,6 @@ local function ShowHelp() Toggle(); end ); --]] - end SlashCmdList["FISHBRINGER"] = function(arg) From a236d764d400793c89e5473b2681fad3d1879367 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Mon, 5 Jul 2021 18:51:00 +0200 Subject: [PATCH 14/22] Updated Localization Files Added Hellfire Peninsula (English, German and Russian) Fixed some Bugs in the German Localization --- Localization.deDE.lua | 25 +++++++++++++------------ Localization.ruRU.lua | 1 + 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Localization.deDE.lua b/Localization.deDE.lua index 95bea10..8b41a71 100644 --- a/Localization.deDE.lua +++ b/Localization.deDE.lua @@ -6,7 +6,7 @@ if namespace.locale == "deDE" then --ShowHelp Funktion L["Nat Pagle would be proud of you."] = "Nat Pagle wäre stolz auf dich!" L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Fishbringer Bildschirmanzeige an/aus." - L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Textausrichtung ändern." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Textausrichtung ändern." L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Gefangene Fische auf dem Level anzeigen an/aus." L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Fishbringer Datenbank zurücksetzen." @@ -36,13 +36,13 @@ if namespace.locale == "deDE" then L["Teldrassil"] = "Teldrassil" L["Tirisfal"] = "Tirisfal" L["Orgrimmar"] = "Orgrimmar" - L["Ironforge"] = "Ironforge" - L["Stormwind City"] = "Stormwind" - L["Thunder Bluff"] = "Thunder Bluff" + L["Ironforge"] = "Eisenschmiede" + L["Stormwind City"] = "Sturmwind" + L["Thunder Bluff"] = "Donnerfels" L["Silvermoon City"] = "Silbermond" L["The Exodar"] = "Die Exodar" L["Darnassus"] = "Darnassus" - L["Undercity"] = "Undercity" + L["Undercity"] = "Unterstadt" L["The Barrens"] = "Brachland" L["Blackfathom Deeps"] = "Blackfathom-Tiefe" L["Bloodmyst Isle"] = "Blutmythosinsel" @@ -53,16 +53,16 @@ if namespace.locale == "deDE" then L["Silverpine Forest"] = "Silberwald" L["The Wailing Caverns"] = "Die Höhlen des Wehklagens" L["Westfall"] = "Westfall" - L["Ashenvale"] = "Ashenvale" + L["Ashenvale"] = "Eschental" L["Duskwood"] = "Dämmerwald" - L["Hillsbrad Foothills"] = "Vorgebirge von Hillsbrad" + L["Hillsbrad Foothills"] = "Vorgebirge des Hügellands" L["Redridge Mountains"] = "Rotkammgebirge" L["Stonetalon Mountains"] = "Steinkrallengebirge" L["Wetlands"] = "Sumpfland" L["Alterac Mountains"] = "Alteracgebirge" L["Arathi Highlands"] = "Arathihochland" L["Desolace"] = "Desolace" - L["Dustwallow Marsh"] = "Marschen von Dustwallow" + L["Dustwallow Marsh"] = "Düstermarschen" L["Scarlet Monastery"] = "Das scharlachrote Kloster" L["Stranglethorn Vale"] = "Schlingendorntal" L["Swamp of Sorrows"] = "Sümpfe des Elends" @@ -72,7 +72,7 @@ if namespace.locale == "deDE" then L["Feralas"] = "Feralas" L["The Hinterlands"] = "Hinterland" L["Maraudon"] = "Maraudon" - L["Moonglade"] = "Moonglade" + L["Moonglade"] = "Mondlichtung" L["Tanaris"] = "Tanaris" L["The Temple of Atal'Hakkar"] = "Der Tempel von Atal'Hakkar" L["Un'Goro Crater"] = "Un'Goro-Krater" @@ -87,6 +87,7 @@ if namespace.locale == "deDE" then L["Winterspring"] = "Winterspring" L["Zul'Gurub"] = "Zul'Gurub" --- Burning Crusade + L["Hellfire Peninsula"] = "Höllenfeuerhalbinsel" L["Terokkar Forest"] = "Wälder von Terokkar" L["Nagrand"] = "Nagrand" L["Netherstorm"] = "Nethersturm" @@ -96,9 +97,9 @@ if namespace.locale == "deDE" then L["Marshlight Lake"] = "Sumpflichtsee" -- Zangarmarschen L["Sporewind Lake"] = "Sporenwindsee" -- Zangarmarschen L["Serpent Lake"] = "Schlangensee" -- Zangarmarschen - L["Blackwind Lake"] = "Schattenwindsee" -- Wälder von Terokarr - L["Lake Ere'Noru"] = "See von Ere'Noru" -- Wälder von Terokarr - L["Lake Jorune"] = "Jorunsee" -- Wälder von Terokarr + L["Blackwind Lake"] = "Schattenwindsee" -- Wälder von Terokarr + L["Lake Ere'Noru"] = "See von Ere'Noru" -- Wälder von Terokarr + L["Lake Jorune"] = "Jorunsee" -- Wälder von Terokarr --- WOTLK L["Borean Tundra"] = "Boreanische Tundra" L["Dragonblight"] = "Drachenöde" diff --git a/Localization.ruRU.lua b/Localization.ruRU.lua index 684274f..f541e47 100644 --- a/Localization.ruRU.lua +++ b/Localization.ruRU.lua @@ -86,6 +86,7 @@ if namespace.locale == "ruRU" then L["Winterspring"] = "Зимние Ключи" L["Zul'Gurub"] = "Зул'Гуруб" -- The Burning Crusade + L["Hellfire Peninsula"] = "Полуостров Адского Пламени - Темный портал" L["Terokkar Forest"] = "Лес Тероккар" L["Nagrand"] = "Награнд" L["Netherstorm"] = "Пустоверть" From 030b3d6c1d8681a80f6c38f760ff41c6d040fb17 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Mon, 5 Jul 2021 18:54:23 +0200 Subject: [PATCH 15/22] Updated toc for tbc --- Fishbringer.toc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index 46e9eb3..104abd6 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -7,7 +7,7 @@ ## Notes-ruRU: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! ## Author: Kalerath, Fye (Localization Code & Bugfixes), leafoe (Russian Localization) ## SavedVariables: FishbringerDB -## Version: 1.20 +## Version: 2.5.1-2 localization.core.lua Localization.deDE.lua From 88f76be547b30129a96ecf92baf3fe77a41366ad Mon Sep 17 00:00:00 2001 From: Ulidan Date: Thu, 8 Jul 2021 20:11:46 +0300 Subject: [PATCH 16/22] Update fishy.lua --- fishy.lua | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/fishy.lua b/fishy.lua index 52a40f5..7742d4d 100755 --- a/fishy.lua +++ b/fishy.lua @@ -13,7 +13,7 @@ fb:RegisterEvent"PLAYER_ENTERING_WORLD" fb:RegisterEvent"ADDON_LOADED" fb:RegisterEvent"COMBAT_LOG_EVENT" fb:RegisterEvent"SKILL_LINES_CHANGED" -fb:RegisterEvent"LOOT_OPENED" +fb:RegisterEvent"LOOT_READY" fb:RegisterEvent"ZONE_CHANGED_NEW_AREA" fb:RegisterEvent"ZONE_CHANGED" fb:RegisterEvent"UNIT_INVENTORY_CHANGED" @@ -27,24 +27,18 @@ local zones = { [L["Durotar"]] = -70, [L["Elwynn Forest"]] = -70, [L["Mulgore"]] = -70, - [L["Eversong Forest"]] = -70, - [L["Azuremyst Isle"]] = -70, [L["Teldrassil"]] = -70, [L["Tirisfal Glades"]] = -70, [L["Orgrimmar"]] = -20, [L["Ironforge"]] = -20, [L["Stormwind City"]] = -20, [L["Thunder Bluff"]] = -20, - [L["Silvermoon City"]] = -20, - [L["The Exodar"]] = -20, [L["Darnassus"]] = -20, [L["Undercity"]] = -20, [L["The Barrens"]] = -20, [L["Blackfathom Deeps"]] = -20, - [L["Bloodmyst Isle"]] = -20, [L["Darkshore"]] = -20, [L["The Deadmines"]] = -20, - [L["Ghostlands"]] = -20, [L["Loch Modan"]] = -20, [L["Silverpine Forest"]] = -20, [L["The Wailing Caverns"]] = -20, @@ -72,9 +66,7 @@ local zones = { [L["Tanaris"]] = 205, [L["The Temple of Atal'Hakkar"]] = 205, [L["Un'Goro Crater"]] = 205, - [L["Western Plaguelands"]] = 205, - [L["Shadowmoon Valley"]] = 280, - [L["Zangarmarsh"]] = 305, -- Burning Crusade + [L["Western Plaguelands"]] = 205, [L["Burning Steppes"]] = 330, [L["Deadwind Pass"]] = 330, [L["Eastern Plaguelands"]] = 330, @@ -83,6 +75,16 @@ local zones = { [L["Stratholme"]] = 330, [L["Winterspring"]] = 330, [L["Zul'Gurub"]] = 330, + -- Burning Crusade + [L["Azuremyst Isle"]] = -70, + [L["Bloodmyst Isle"]] = -20, + [L["Silvermoon City"]] = -20, + [L["The Exodar"]] = -20, + [L["Ghostlands"]] = -20, + [L["Eversong Woods"]] = -70, + [L["Hellfire Peninsula"]] = 280, + [L["Shadowmoon Valley"]] = 280, + [L["Zangarmarsh"]] = 305, [L["Terokkar Forest"]] = 355, [L["Nagrand"]] = 380, [L["Netherstorm"]] = 380, @@ -96,19 +98,21 @@ local zones = { [L["The Frozen Sea"]] = 480, } local subzones = { - ["Jaguero Isle"] = 205, - ["Bay of Storms"] = 330, - ["Hetaera's Clutch"] = 330, - ["Scalebeard's Cave"] = 330, - ["Jademir Lake"] = 330, - [L["Marshlight Lake"]] = 355, + ["Jaguero Isle"] = 205, + ["Bay of Storms"] = 330, + ["Hetaera's Clutch"] = 330, + ["Scalebeard's Cave"] = 330, + ["Jademir Lake"] = 330, + ["Silmyr Lake"] = 405, + [L["Marshlight Lake"]] = 355, [L["Sporewind Lake"]] = 355, - [L["Serpent Lake"]] = 355, + [L["Serpent Lake"]] = 355, [L["Lake Sunspring"]] = 395, - [L["Skysong Lake"]] = 395, + [L["Skysong Lake"]] = 395, [L["Blackwind Lake"]] = 405, - [L["Lake Ere'Noru"]] = 405, + [L["Lake Ere'Noru"]] = 405, [L["Lake Jorune"]] = 405, + ["Silmyr Lake"] = 405, } local fishingpoles = { @@ -175,9 +179,7 @@ local function UpdateCatchInfo() end local chance = ( - ( - db[char].fishingSkill + db[char].fishingBuff - ) - zoneSkill + db[char].fishingSkill + db[char].fishingBuff - zoneSkill ) * 0.01 + 0.05 if zoneSkill < 0 then @@ -455,9 +457,9 @@ fb.ADDON_LOADED = function(self, event, addon) InitializeFrame() end -fb.COMBAT_LOG_EVENT = UpdateSkill -fb.SKILL_LINES_CHANGED = UpdateSkill -fb.LOOT_OPENED = IncrementFishCount +fb.COMBAT_LOG_EVENT = UpdateFishingSkill +fb.SKILL_LINES_CHANGED = UpdateFishingSkill +fb.LOOT_READY = IncrementFishCount fb.ZONE_CHANGED_NEW_AREA = UpdateCatchInfo fb.ZONE_CHANGED = UpdateCatchInfo fb.UNIT_INVENTORY_CHANGED = CheckForFishingPole From 04ecd9367c03078c33f6da40efdf21c77d4d8ee5 Mon Sep 17 00:00:00 2001 From: Ulidan Date: Thu, 8 Jul 2021 22:38:57 +0300 Subject: [PATCH 17/22] Update fishy.lua 1. Added more locations. 2. Added total fishing skill. 3. Fixed some formats. --- fishy.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fishy.lua b/fishy.lua index 7742d4d..3017dc6 100755 --- a/fishy.lua +++ b/fishy.lua @@ -113,6 +113,11 @@ local subzones = { [L["Lake Ere'Noru"]] = 405, [L["Lake Jorune"]] = 405, ["Silmyr Lake"] = 405, + ["Skettis"] = 405, + ["Blackwind Lake"] = 405, + ["Terokk's Rest"] = 405, + ["Veil Ala'rak"] = 405, + ["Veil Harr'ik"] = 405, } local fishingpoles = { @@ -236,13 +241,13 @@ local function UpdateSkill(forceResetFishCounter) local fishNeeded = GetNumFishToLevel(skillRank) if skillRank ~= skillMaxRank then - skillRankText = string.format("%d/%d", skillRank, skillMaxRank) + skillRankText = string.format("%d(%d)", skillRank, skillMaxRank) fishNeededText = string.format(L["\n%d fish needed to skill up"], fishNeeded) end local skillModifierText = "" if skillModifier > 0 then - skillModifierText = string.format(" (+%d)", skillModifier) + skillModifierText = string.format("+%d = %d", skillModifier, skillRank+skillModifier) end Fishbringer.content:SetFormattedText( From 4b7c7c97e2a32635ab5f3684bea1bfcbe086aafe Mon Sep 17 00:00:00 2001 From: Ulidan Date: Wed, 14 Jul 2021 01:55:21 +0300 Subject: [PATCH 18/22] Changes and localizations 1. Changed fishing tables to be language insensitive. 3. Removed obsolete translations of said tables. 3. Added more translation files - used google translate. Recommend testing by local users. --- Fishbringer.toc | 6 + Localization.deDE.lua | 87 +------------- Localization.esES.lua | 27 +++++ Localization.frFR.lua | 27 +++++ Localization.ptBR.lua | 27 +++++ Localization.ruRU.lua | 93 +-------------- fishy.lua | 255 +++++++++++++++++++++++++----------------- 7 files changed, 242 insertions(+), 280 deletions(-) create mode 100644 Localization.esES.lua create mode 100644 Localization.frFR.lua create mode 100644 Localization.ptBR.lua diff --git a/Fishbringer.toc b/Fishbringer.toc index 104abd6..38cf210 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -9,8 +9,14 @@ ## SavedVariables: FishbringerDB ## Version: 2.5.1-2 +# localizations: localization.core.lua Localization.deDE.lua Localization.ruRU.lua +Localization.esES.lua +Localization.frFR.lua +Localization.ptBR.lua + +# main: fishy.lua diff --git a/Localization.deDE.lua b/Localization.deDE.lua index 8b41a71..cbba643 100644 --- a/Localization.deDE.lua +++ b/Localization.deDE.lua @@ -11,6 +11,7 @@ if namespace.locale == "deDE" then L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Fishbringer Datenbank zurücksetzen." --Anzeige auf Bildschirm + L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nKein fisch in dieser zone" L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d Angelskill benötigt zum Angeln\n(%d benötigt für 100%% Fangchance)" L["%d%% catch rate"] = "%d%% Fangchance" L["%s%s fishing skill%s"] = "%s%s Angelskill%s" @@ -18,95 +19,9 @@ if namespace.locale == "deDE" then L["%d fish caught at this level"] = "%d Fische auf diesem Level gefangen" -- Name des Angelperks / Name of the Fishingperk - L["Fishing"] = "Angeln" -- Login Message - L["Pack yer bags, we be leavin' fer fishin'!"] = "Pack deine Taschen, wir gehen angeln!" - -- Angelzonen / Fishingzones - - L["Dun Morogh"] = "Dun Morogh" - L["Durotar"] = "Durotar" - L["Elwynn Forest"] = "Wald von Elwynn" - L["Mulgore"] = "Mulgore" - L["Eversong Forest"] = "Immersangwald" - L["Azuremyst Isle"] = "Azurmythosinsel" - L["Teldrassil"] = "Teldrassil" - L["Tirisfal"] = "Tirisfal" - L["Orgrimmar"] = "Orgrimmar" - L["Ironforge"] = "Eisenschmiede" - L["Stormwind City"] = "Sturmwind" - L["Thunder Bluff"] = "Donnerfels" - L["Silvermoon City"] = "Silbermond" - L["The Exodar"] = "Die Exodar" - L["Darnassus"] = "Darnassus" - L["Undercity"] = "Unterstadt" - L["The Barrens"] = "Brachland" - L["Blackfathom Deeps"] = "Blackfathom-Tiefe" - L["Bloodmyst Isle"] = "Blutmythosinsel" - L["Darkshore"] = "Dunkelküste" - L["The Deadmines"] = "Die Todesminen" - L["Ghostlands"] = "Geisterlande" - L["Loch Modan"] = "Loch Modan" - L["Silverpine Forest"] = "Silberwald" - L["The Wailing Caverns"] = "Die Höhlen des Wehklagens" - L["Westfall"] = "Westfall" - L["Ashenvale"] = "Eschental" - L["Duskwood"] = "Dämmerwald" - L["Hillsbrad Foothills"] = "Vorgebirge des Hügellands" - L["Redridge Mountains"] = "Rotkammgebirge" - L["Stonetalon Mountains"] = "Steinkrallengebirge" - L["Wetlands"] = "Sumpfland" - L["Alterac Mountains"] = "Alteracgebirge" - L["Arathi Highlands"] = "Arathihochland" - L["Desolace"] = "Desolace" - L["Dustwallow Marsh"] = "Düstermarschen" - L["Scarlet Monastery"] = "Das scharlachrote Kloster" - L["Stranglethorn Vale"] = "Schlingendorntal" - L["Swamp of Sorrows"] = "Sümpfe des Elends" - L["Thousand Needles"] = "Tausend Nadeln" - L["Azshara"] = "Azshara" - L["Felwood"] = "Teufelswald" - L["Feralas"] = "Feralas" - L["The Hinterlands"] = "Hinterland" - L["Maraudon"] = "Maraudon" - L["Moonglade"] = "Mondlichtung" - L["Tanaris"] = "Tanaris" - L["The Temple of Atal'Hakkar"] = "Der Tempel von Atal'Hakkar" - L["Un'Goro Crater"] = "Un'Goro-Krater" - L["Western Plaguelands"] = "Westliche Pestländer" - L["Shadowmoon Valley"] = "Schattenmondtal" - L["Burning Steppes"] = "Brennende Steppe" - L["Deadwind Pass"] = "Gebirgspass der Todenwinde" - L["Eastern Plaguelands"] = "Östliche Pestländer" - L["Scholomance"] = "Scholomance" - L["Silithus"] = "Silithus" - L["Stratholme"] = "Stratholme" - L["Winterspring"] = "Winterspring" - L["Zul'Gurub"] = "Zul'Gurub" - --- Burning Crusade - L["Hellfire Peninsula"] = "Höllenfeuerhalbinsel" - L["Terokkar Forest"] = "Wälder von Terokkar" - L["Nagrand"] = "Nagrand" - L["Netherstorm"] = "Nethersturm" - L["Zangarmarsh"] = "Zangarmarschen" - -- Burning Crusade Subzones - L["Lake Sunspring"] = "Lake Sunspring" -- Nagrand - L["Marshlight Lake"] = "Sumpflichtsee" -- Zangarmarschen - L["Sporewind Lake"] = "Sporenwindsee" -- Zangarmarschen - L["Serpent Lake"] = "Schlangensee" -- Zangarmarschen - L["Blackwind Lake"] = "Schattenwindsee" -- Wälder von Terokarr - L["Lake Ere'Noru"] = "See von Ere'Noru" -- Wälder von Terokarr - L["Lake Jorune"] = "Jorunsee" -- Wälder von Terokarr - --- WOTLK - L["Borean Tundra"] = "Boreanische Tundra" - L["Dragonblight"] = "Drachenöde" - L["Howling Fjord"] = "Heulende Fjord" - L["Crystalsong Forest"] = "Kristallsangwald" - L["Dalaran"] = "Dalaran" - L["Sholazar Basin"] = "Sholazarbecken" - L["The Frozen Sea"] = "Die gefrorene See" - return end \ No newline at end of file diff --git a/Localization.esES.lua b/Localization.esES.lua new file mode 100644 index 0000000..7b34ccd --- /dev/null +++ b/Localization.esES.lua @@ -0,0 +1,27 @@ +local ADDON_NAME, namespace = ... +local L = namespace.L + +if namespace.locale == "esES" then + + --ShowHelp Function + L["Nat Pagle would be proud of you."] = "Nat Pagle estaría orgulloso de ti." + L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Alterna la visibilidad." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Recorre la alineación del texto." + L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Alterna la visibilidad del recuento de peces." + L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Restablece la base de datos de peces." + + --Fishbringer Overlay/Display Widget + L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nNo hay peces en esta zona" + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d habilidad necesaria para pescar\n(%d necesario para una tasa de captura del 100%%)" + L["%d%% catch rate"] = "%d%% tasa de captura" + L["%s%s fishing skill%s"] = "%s%s habilidad de pesca" + L["\n%d fish needed to skill up"] = "\n%d peces necesarios para mejorar" + L["%d fish caught at this level"] = "%d pescado capturado a este nivel" + + -- Angeln/Fishing - Name of the Fishing Perk + L["Fishing"] = "Pescar" + + -- Welcome Message on Login + L["Pack yer bags, we be leavin' fer fishin'!"] = "¡Prepara tus maletas, nos vamos 'a pescar'!" + +return end diff --git a/Localization.frFR.lua b/Localization.frFR.lua new file mode 100644 index 0000000..8ed59c2 --- /dev/null +++ b/Localization.frFR.lua @@ -0,0 +1,27 @@ +local ADDON_NAME, namespace = ... +local L = namespace.L + +if namespace.locale == "frFR" then + + --ShowHelp Function + L["Nat Pagle would be proud of you."] = "Nat Pagle serait fier de vous." + L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Bascule la visibilité." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Fait défiler l'alignement du texte." + L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Bascule la visibilité du nombre de poissons." + L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Réinitialise la base de données des poissons." + + --Fishbringer Overlay/Display Widget + L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nPas de poisson dans cette zone" + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d compétence nécessaire pour pêcher\n(%d nécessaire pour un taux de capture de 100%%)" + L["%d%% catch rate"] = "%d%% taux de capture" + L["%s%s fishing skill%s"] = "%s%s compétence de pêche" + L["\n%d fish needed to skill up"] = "\n%d рыб poisson nécessaire pour se perfectionner" + L["%d fish caught at this level"] = "%d poisson pêché à ce niveau" + + -- Angeln/Fishing - Name of the Fishing Perk + L["Fishing"] = "Pêche" + + -- Welcome Message on Login + L["Pack yer bags, we be leavin' fer fishin'!"] = "Faites vos valises, nous partons « à la pêche » !" + +return end diff --git a/Localization.ptBR.lua b/Localization.ptBR.lua new file mode 100644 index 0000000..91d9369 --- /dev/null +++ b/Localization.ptBR.lua @@ -0,0 +1,27 @@ +local ADDON_NAME, namespace = ... +local L = namespace.L + +if namespace.locale == "ptBR" then + + --ShowHelp Function + L["Nat Pagle would be proud of you."] = "Nat Pagle ficaria orgulhoso de você." + L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Alterna a visibilidade." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Percorre o alinhamento do texto." + L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Alterna a visibilidade da contagem de peixes." + L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Reinicia o banco de dados de peixes." + + --Fishbringer Overlay/Display Widget + L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nNenhum peixe nesta zona" + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d habilidade necessária para pescar\n(%d necessário para 100%% de taxa de captura)" + L["%d%% catch rate"] = "%d%% taxa de captura" + L["%s%s fishing skill%s"] = "%s%s habilidade de pesca" + L["\n%d fish needed to skill up"] = "\n%d peixes precisavam de habilidade" + L["%d fish caught at this level"] = "%d peixes capturados neste nível" + + -- Angeln/Fishing - Name of the Fishing Perk + L["Fishing"] = "pescaria" + + -- Welcome Message on Login + L["Pack yer bags, we be leavin' fer fishin'!"] = "Faça as malas, vamos partir 'para pescar'!" + +return end diff --git a/Localization.ruRU.lua b/Localization.ruRU.lua index f541e47..96e3a73 100644 --- a/Localization.ruRU.lua +++ b/Localization.ruRU.lua @@ -3,8 +3,6 @@ local L = namespace.L if namespace.locale == "ruRU" then - --*** Important Info: Don't change the Original Text - --ShowHelp Function L["Nat Pagle would be proud of you."] = "Нат Пэгл будет гордиться тобой." L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Переключает видимость." @@ -12,101 +10,18 @@ if namespace.locale == "ruRU" then L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Переключает видимость счетчика пойманной рыбы." L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Сбросить данные." - --Anzeige auf Bildschirm - Fishbringer Overlay/Display Widget + --Fishbringer Overlay/Display Widget + L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nВ этой зоне нет рыбы" L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d навыка требуется для рыбалки\n(%d требуется для 100%% успеха)" L["%d%% catch rate"] = "%d%% шанс поймать" L["%s%s fishing skill%s"] = "%s%s навык рыбной ловли" L["\n%d fish needed to skill up"] = "\n%d рыб осталось до повышения навыка" L["%d fish caught at this level"] = "%d рыб поймано на этом уровне" - -- Angeln/Fishing - Name of the Fishing Perk - put the localized name into the "" + -- Angeln/Fishing - Name of the Fishing Perk L["Fishing"] = "Рыбная ловля" - -- Welcome Message on Login - put the localized text into the "" + -- Welcome Message on Login L["Pack yer bags, we be leavin' fer fishin'!"] = "Пакуй снасти, валим рыбачить!" - -- Angelzonen/Fishing Zones - put the localized names into the "". Example: L["Dun Morogh"] = "Localized Name of the Zone" - L["Dun Morogh"] = "Дун Морог" - L["Durotar"] = "Дуротар" - L["Elwynn Forest"] = "Элвиннский лес" - L["Mulgore"] = "Мулгор" - L["Eversong Forest"] = "Леса Вечной Песни" - L["Azuremyst Isle"] = "Остров Лазурной Дымки" - L["Teldrassil"] = "Тельдрассил" - L["Tirisfal"] = "Тирисфаль" - L["Orgrimmar"] = "Оргриммар" - L["Ironforge"] = "Стальгорн" - L["Stormwind City"] = "Штормград" - L["Thunder Bluff"] = "Громовой Утес" - L["Silvermoon City"] = "Луносвет" - L["The Exodar"] = "Экзодар" - L["Darnassus"] = "Дарнас" - L["Undercity"] = "Подгород" - L["The Barrens"] = "Степи" - L["Blackfathom Deeps"] = "Непроглядная Пучина" - L["Bloodmyst Isle"] = "Остров Кровавой Дымки" - L["Darkshore"] = "Темные берега" - L["The Deadmines"] = "Мертвые копи" - L["Ghostlands"] = "Призрачные земли" - L["Loch Modan"] = "Лок Модан" - L["Silverpine Forest"] = "Серебряный бор" - L["The Wailing Caverns"] = "Пещеры Стенаний" - L["Westfall"] = "Западный Край" - L["Ashenvale"] = "Ясеневый лес" - L["Duskwood"] = "Сумеречный лес" - L["Hillsbrad Foothills"] = "Предгорья Хилсбрада" - L["Redridge Mountains"] = "Красногорье" - L["Stonetalon Mountains"] = "Когтистые горы" - L["Wetlands"] = "Болотина" - L["Alterac Mountains"] = "Альтеракские горы" - L["Arathi Highlands"] = "Нагорье Арати" - L["Desolace"] = "Пустоши" - L["Dustwallow Marsh"] = "Пылевые топи" - L["Scarlet Monastery"] = "Монастырь Алого ордена" - L["Stranglethorn Vale"] = "Тернистая долина" - L["Swamp of Sorrows"] = "Болото Печали" - L["Thousand Needles"] = "Тысяча Игл" - L["Azshara"] = "Азшара" - L["Felwood"] = "Оскверненный лес" - L["Feralas"] = "Фералас" - L["The Hinterlands"] = "Внутренние земли" - L["Maraudon"] = "Мародон" - L["Moonglade"] = "Лунная поляна" - L["Tanaris"] = "Танарис" - L["The Temple of Atal'Hakkar"] = "Храм Атал'Хаккара" - L["Un'Goro Crater"] = "Кратер Ун'Горо" - L["Western Plaguelands"] = "Западные Чумные земли" - L["Shadowmoon Valley"] = "Долина Призрачной Луны" - L["Burning Steppes"] = "Пылающие степи" - L["Deadwind Pass"] = "Перевал Мертвого Ветра" - L["Eastern Plaguelands"] = "Восточные Чумные земли" - L["Scholomance"] = "Некроситет" - L["Silithus"] = "Силитус" - L["Stratholme"] = "Стратхольм" - L["Winterspring"] = "Зимние Ключи" - L["Zul'Gurub"] = "Зул'Гуруб" - -- The Burning Crusade - L["Hellfire Peninsula"] = "Полуостров Адского Пламени - Темный портал" - L["Terokkar Forest"] = "Лес Тероккар" - L["Nagrand"] = "Награнд" - L["Netherstorm"] = "Пустоверть" - L["Zangarmarsh"] = "Зангартопь" - -- Burning Crusade Subzones - L["Lake Sunspring"] = "Озеро Солнечного Источника" -- Nagrand - L["Marshlight Lake"] = "Озеро Болотных Огоньков" -- Zangarmarschen - L["Sporewind Lake"] = "Озеро Спороветра" -- Zangarmarschen - L["Serpent Lake"] = "Змеиное озеро" -- Zangarmarschen - L["Blackwind Lake"] = "Озеро Черного Ветра" -- Wälder von Terokarr - L["Lake Ere'Noru"] = "Озеро Эре'Нору" -- Wälder von Terokarr - L["Lake Jorune"] = "Озеро Иорун" -- Wälder von Terokarr - -- Wrath of the Lich King - L["Borean Tundra"] = "Борейская тундра" - L["Dragonblight"] = "Драконий Погост" - L["Howling Fjord"] = "Ревущий фьорд" - L["Crystalsong Forest"] = "Лес Хрустальной Песни" - L["Dalaran"] = "Даларан" - L["Sholazar Basin"] = "Низина Шолазар" - L["The Frozen Sea"] = "Ледяное море" - - return end diff --git a/fishy.lua b/fishy.lua index 3017dc6..3c410d0 100755 --- a/fishy.lua +++ b/fishy.lua @@ -7,6 +7,7 @@ local ADDON_NAME, namespace = ... --localization local L = namespace.L --localization local version = GetAddOnMetadata(ADDON_NAME, "Version") local addoninfo = 'v'..version +local areaTable = {} fb:RegisterEvent"PLAYER_ENTERING_WORLD" @@ -23,103 +24,100 @@ local function Print(text) end local zones = { - [L["Dun Morogh"]] = -70, - [L["Durotar"]] = -70, - [L["Elwynn Forest"]] = -70, - [L["Mulgore"]] = -70, - [L["Teldrassil"]] = -70, - [L["Tirisfal Glades"]] = -70, - [L["Orgrimmar"]] = -20, - [L["Ironforge"]] = -20, - [L["Stormwind City"]] = -20, - [L["Thunder Bluff"]] = -20, - [L["Darnassus"]] = -20, - [L["Undercity"]] = -20, - [L["The Barrens"]] = -20, - [L["Blackfathom Deeps"]] = -20, - [L["Darkshore"]] = -20, - [L["The Deadmines"]] = -20, - [L["Loch Modan"]] = -20, - [L["Silverpine Forest"]] = -20, - [L["The Wailing Caverns"]] = -20, - [L["Westfall"]] = -20, - [L["Ashenvale"]] = 55, - [L["Duskwood"]] = 55, - [L["Hillsbrad Foothills"]] = 55, - [L["Redridge Mountains"]] = 55, - [L["Stonetalon Mountains"]] = 55, - [L["Wetlands"]] = 55, - [L["Alterac Mountains"]] = 130, - [L["Arathi Highlands"]] = 130, - [L["Desolace"]] = 130, - [L["Dustwallow Marsh"]] = 130, - [L["Scarlet Monastery"]] = 130, - [L["Stranglethorn Vale"]] = 130, - [L["Swamp of Sorrows"]] = 130, - [L["Thousand Needles"]] = 130, - [L["Azshara"]] = 205, - [L["Felwood"]] = 205, - [L["Feralas"]] = 205, - [L["The Hinterlands"]] = 205, - [L["Maraudon"]] = 205, - [L["Moonglade"]] = 205, - [L["Tanaris"]] = 205, - [L["The Temple of Atal'Hakkar"]] = 205, - [L["Un'Goro Crater"]] = 205, - [L["Western Plaguelands"]] = 205, - [L["Burning Steppes"]] = 330, - [L["Deadwind Pass"]] = 330, - [L["Eastern Plaguelands"]] = 330, - [L["Scholomance"]] = 330, - [L["Silithus"]] = 330, - [L["Stratholme"]] = 330, - [L["Winterspring"]] = 330, - [L["Zul'Gurub"]] = 330, - -- Burning Crusade - [L["Azuremyst Isle"]] = -70, - [L["Bloodmyst Isle"]] = -20, - [L["Silvermoon City"]] = -20, - [L["The Exodar"]] = -20, - [L["Ghostlands"]] = -20, - [L["Eversong Woods"]] = -70, - [L["Hellfire Peninsula"]] = 280, - [L["Shadowmoon Valley"]] = 280, - [L["Zangarmarsh"]] = 305, - [L["Terokkar Forest"]] = 355, - [L["Nagrand"]] = 380, - [L["Netherstorm"]] = 380, - -- Wrath of the Lich King - [L["Borean Tundra"]] = 380, - [L["Dragonblight"]] = 380, - [L["Howling Fjord"]] = 380, - [L["Crystalsong Forest"]] = 405, - [L["Dalaran"]] = 430, - [L["Sholazar Basin"]] = 430, - [L["The Frozen Sea"]] = 480, + [1411] = -70, + [1412] = -70, + [1413] = -20, + [1416] = 130, + [1417] = 130, + [1420] = -70, + [1421] = -20, + [1422] = 205, + [1423] = 330, + [1424] = 55, + [1425] = 205, + [1426] = -70, + [1428] = 330, + [1429] = -70, + [1430] = 330, + [1431] = 55, + [1432] = -20, + [1433] = 55, + [1434] = 130, + [1435] = 130, + [1436] = -20, + [1437] = 55, + [1438] = -70, + [1439] = -20, + [1440] = 55, + [1441] = 130, + [1442] = 55, + [1443] = 130, + [1444] = 205, + [1445] = 130, + [1446] = 205, + [1447] = 205, + [1448] = 205, + [1449] = 205, + [1450] = 205, + [1451] = 330, + [1452] = 330, + [1453] = -20, + [1454] = -20, + [1455] = -20, + [1456] = -20, + [1457] = -20, + [1458] = -20, + [1941] = -70, + [1942] = -20, + [1943] = -70, + [1944] = 280, + [1946] = 305, + [1947] = -20, + [1948] = 280, + [1950] = -20, + [1951] = 380, + [1952] = 355, + [1953] = 380, + [1954] = -20, } local subzones = { - ["Jaguero Isle"] = 205, - ["Bay of Storms"] = 330, - ["Hetaera's Clutch"] = 330, - ["Scalebeard's Cave"] = 330, - ["Jademir Lake"] = 330, - ["Silmyr Lake"] = 405, - [L["Marshlight Lake"]] = 355, - [L["Sporewind Lake"]] = 355, - [L["Serpent Lake"]] = 355, - [L["Lake Sunspring"]] = 395, - [L["Skysong Lake"]] = 395, - [L["Blackwind Lake"]] = 405, - [L["Lake Ere'Noru"]] = 405, - [L["Lake Jorune"]] = 405, - ["Silmyr Lake"] = 405, - ["Skettis"] = 405, - ["Blackwind Lake"] = 405, - ["Terokk's Rest"] = 405, - ["Veil Ala'rak"] = 405, - ["Veil Harr'ik"] = 405, + [297] = 205, + [718] = -20, --Wailing Caverns Entrance + [719] = -20, --BFD Entrance + [1112] = 330, + [1222] = 330, + [1227] = 330, + [1477] = 205, -- ST Entrance + [1977] = 330, -- ZG Entrance + [2100] = 205, --Maraudon Entrance + [3140] = 330, + [3614] = 395, + [3621] = 395, + [3653] = 355, + [3656] = 355, + [3658] = 355, + [3679] = 405, + [3690] = 405, + [3691] = 405, + [3692] = 405, + [3859] = 405, + [3974] = 405, + [3975] = 405, + [3976] = 405, +} +local instances = { + [36] = -20, + [43] = -20, + [48] = -20, + [109] = 205, + [309] = 309, + [329] = 330, + [349] = 205, + [548] = 405, + [1001] = 130, + [1004] = 130, + [1007] = 330, } - local fishingpoles = { [6256] = true, [6365] = true, @@ -161,13 +159,52 @@ local function ResetFishCounter(numFish) UpdateFishCount(false) end -local function UpdateCatchInfo() - local zoneText = GetSubZoneText() - local zoneSkill = subzones[zoneText] +local function populateAreaTable() + local areaName + for areaId=1,10500 do + areaName=C_Map.GetAreaInfo(areaId) + if areaName then + areaTable[areaName]=areaId + end + end +end - if not zoneSkill then +--[[ GetExploredAreaIDsAtPosition doesn't always work for many locations - UNRELIABLE +local function getPlayerAreaId() + local areaId + local unit = "Player" + local mapId = C_Map.GetBestMapForUnit(unit) + local mapPos = C_Map.GetPlayerMapPosition(mapId, unit) + areaIds = C_MapExplorationInfo.GetExploredAreaIDsAtPosition(mapId,mapPos) + if areaIds and areaIds[1] then + areaId = areaIds[1] + end + return areaId +end +--]] + +local function UpdateCatchInfo() + local zoneText + local zoneSkill + + if IsInInstance() then + local _,_,_,_,_,_,_,instanceId = GetInstanceInfo() + zoneSkill = instances[instanceId] zoneText = GetRealZoneText() - zoneSkill = zones[zoneText] + else + zoneText = GetSubZoneText() + if zoneText == "" then + zoneText = GetRealZoneText() + end + local areaId = areaTable[zoneText] + if areaId then + zoneSkill = subzones[areaId] + end + if not zoneSkill then + zoneText = GetRealZoneText() + local mapId = C_Map.GetBestMapForUnit("Player") + zoneSkill = zones[mapId] + end end -- Sometimes we can trigger this before the player is in any zone @@ -207,11 +244,19 @@ local function UpdateCatchInfo() else color = "ff40bf40" end - 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 - ) - Fishbringer.catchRate:SetFormattedText(L["%d%% catch rate"], chance * 100) + if zoneSkill == 0 then + Fishbringer.zoneInfo:SetFormattedText( + L["\124c%s%s\124r\nNo fish in this zone"], + color, zoneText, zoneSkill, maxZoneSkill, 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 + ) + Fishbringer.catchRate:SetFormattedText(L["%d%% catch rate"], chance * 100) + end end local function GetFishingSkill() @@ -330,7 +375,7 @@ local function InitializeDB(resetDatabase) db = {} FishbringerDB = db end - + populateAreaTable() if resetDatabase or not db[char] then db[char] = { fishingSkill = 0, From df59fe1fdfffafe7bcedefcc4db01e3641c9b17f Mon Sep 17 00:00:00 2001 From: Ulidan Date: Wed, 14 Jul 2021 02:04:13 +0300 Subject: [PATCH 19/22] Update Fishbringer.toc --- Fishbringer.toc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Fishbringer.toc b/Fishbringer.toc index 38cf210..0bceb4e 100755 --- a/Fishbringer.toc +++ b/Fishbringer.toc @@ -4,10 +4,13 @@ ## 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: The legendary Fishbringer, Guide of the Scarlet Highlord! Nat Pagle would be proud of you! -## Author: Kalerath, Fye (Localization Code & Bugfixes), leafoe (Russian Localization) +## 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: 2.5.1-2 +## Version: 2.5.1-3 # localizations: localization.core.lua From dd6e0b222d39b18351bcfc846c108178f13041f5 Mon Sep 17 00:00:00 2001 From: Ulidan Date: Wed, 14 Jul 2021 13:54:10 +0300 Subject: [PATCH 20/22] Classic Era compatibility Added classic Era Compatibility --- Fishbringer.toc => Fishbringer-BCC.toc | 49 ++++++++-------- Fishbringer-Classic.toc | 24 ++++++++ fishy.lua | 79 ++++++-------------------- 3 files changed, 65 insertions(+), 87 deletions(-) rename Fishbringer.toc => Fishbringer-BCC.toc (96%) mode change 100755 => 100644 create mode 100644 Fishbringer-Classic.toc diff --git a/Fishbringer.toc b/Fishbringer-BCC.toc old mode 100755 new mode 100644 similarity index 96% rename from Fishbringer.toc rename to Fishbringer-BCC.toc index 0bceb4e..4e23d17 --- a/Fishbringer.toc +++ b/Fishbringer-BCC.toc @@ -1,25 +1,24 @@ -## Interface: 20501 -## 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: 2.5.1-3 - -# localizations: -localization.core.lua -Localization.deDE.lua -Localization.ruRU.lua -Localization.esES.lua -Localization.frFR.lua -Localization.ptBR.lua - -# main: -fishy.lua - +## Interface: 20501 +## 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: 2.5.1-4 + +# 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-Classic.toc b/Fishbringer-Classic.toc new file mode 100644 index 0000000..a849b45 --- /dev/null +++ b/Fishbringer-Classic.toc @@ -0,0 +1,24 @@ +## Interface: 11307 +## 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: 2.5.1-4 + +# 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/fishy.lua b/fishy.lua index 3c410d0..ca44314 100755 --- a/fishy.lua +++ b/fishy.lua @@ -7,6 +7,9 @@ local ADDON_NAME, namespace = ... --localization 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==20501) local areaTable = {} @@ -390,12 +393,25 @@ 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 - local Fishbringer = CreateFrame("Frame", "Fishbringer", UIParent, "BackdropTemplate") + if classicEra then + local Fishbringer = classicEraCreateFrame() + elseif classicTBC then + local Fishbringer = classicTBCCreateFrame() + else + return + end Fishbringer:EnableMouse(true) Fishbringer:SetMovable(true) Fishbringer:SetUserPlaced(true) @@ -522,67 +538,6 @@ local function ShowHelp() Print(L["- /fishbringer reset - Resets the fish database."]) end -local function FishbringerMenu() - - --[[ - if FishrbingerUI then - return - end - - local FishbringerUI = CreateFrame("Frame", "FishbringerUI", UIParent, "BasicFrameTemplateWithInset") - FishbringerUI:SetSize(300, 400); - FishbringerUI:SetPoint("Center", UIParent, "Center"); - FishbringerUI:EnableMouse(true); - FishbringerUI:SetMovable(false); - FishbringerUI:RegisterForDrag("LeftButton") - FishbringerUI:SetScript("OnDragStart", FishbringerUI.StartMoving) - FishbringerUI:SetScript("OnDragStop", FishbringerUI.StopMovingOrSizing) - FishbringerUI:SetBackdrop({ - bgFile = "Interface\\ChatFrame\\ChatFrameBackground", - tile = true, - tileSize = 16, - insets = { - left = 4, - right = 4, - top = 4, - bottom = 4 - }, - }) - FishbringerUI:SetBackdropColor(0, 0, 0, .6) - FishbringerUI:Show(); - - FishbringerUI.title = FishbringerUI:CreateFontString(nil, "Overlay"); - FishbringerUI.title:SetFontObject("GameFontHighlight"); - FishbringerUI.title:SetPoint("Center", FishbringerUI.TitleBg, "Center", 5, 0); - FishbringerUI.title:SetText("|cFF00FF00Fishbringer v1.13.4"); - - tinsert(UISpecialFrames, FishbringerUI:GetName()) - - local MoveButton = CreateFrame("CheckButton", "MoveButton_GlobalName", FishbringerUI, "ChatConfigCheckButtonTemplate"); - MoveButton:SetPoint("TOPLEFT", 10, -60); - MoveButton_GlobalNameText:SetText("Window Moveable"); - MoveButton.tooltip = "Let's move the Window...or not?"; - MoveButton:SetScript("OnClick", - function() - if FishbringerUI:IsMovable == false then - FishbringerUI:SetMovable(true) - else - FishbringerUI:SetMovable(false) - end - end - ); - - local ToggleButton = CreateFrame("CheckButton", "ToggleButton_GlobalName", FishbringerUI, "ChatConfigCheckButtonTemplate"); - ToggleButton:SetPoint("TOPLEFT", 10, -30); - ToggleButton_GlobalNameText:SetText("Show/Hide the Fishing Widget"); - ToggleButton.tooltip = "Toggles the Widget visibility."; - ToggleButton:SetScript("OnClick", - function() - Toggle(); - end - ); --]] -end - SlashCmdList["FISHBRINGER"] = function(arg) if arg == "align" then return CycleAlignment() From 097563a2aac8665cdd87885769957228c4ce7530 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Mon, 5 Dec 2022 13:45:55 +0100 Subject: [PATCH 21/22] Updated to Ulidians Fork :) --- Fishbringer-BCC.toc | 48 +++++++++---------- Fishbringer-Classic.toc | 48 +++++++++---------- Fishbringer-Wrath.toc | 24 ++++++++++ Fishbringer.toc | 10 ++++ fishy.lua | 104 +++++++++++++++++++++++++--------------- 5 files changed, 148 insertions(+), 86 deletions(-) create mode 100644 Fishbringer-Wrath.toc create mode 100644 Fishbringer.toc diff --git a/Fishbringer-BCC.toc b/Fishbringer-BCC.toc index 4e23d17..eb30977 100644 --- a/Fishbringer-BCC.toc +++ b/Fishbringer-BCC.toc @@ -1,24 +1,24 @@ -## Interface: 20501 -## 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: 2.5.1-4 - -# main: -localization.core.lua -fishy.lua - -# localizations: -Localization.deDE.lua -Localization.ruRU.lua -Localization.esES.lua -Localization.frFR.lua -Localization.ptBR.lua +## Interface: 20504 +## 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.2 + +# 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-Classic.toc b/Fishbringer-Classic.toc index a849b45..9114b77 100644 --- a/Fishbringer-Classic.toc +++ b/Fishbringer-Classic.toc @@ -1,24 +1,24 @@ -## Interface: 11307 -## 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: 2.5.1-4 - -# main: -localization.core.lua -fishy.lua - -# localizations: -Localization.deDE.lua -Localization.ruRU.lua -Localization.esES.lua -Localization.frFR.lua -Localization.ptBR.lua +## Interface: 11403 +## 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.2 + +# 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-Wrath.toc b/Fishbringer-Wrath.toc new file mode 100644 index 0000000..51327bb --- /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.2 + +# 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 new file mode 100644 index 0000000..4967ac9 --- /dev/null +++ b/Fishbringer.toc @@ -0,0 +1,10 @@ +## 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.4 + +# main: +localization.core.lua + +# This file is here for compatibility with CurseForge only. it has no function whatsoever \ No newline at end of file diff --git a/fishy.lua b/fishy.lua index ca44314..b24c6bf 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==20501) +local classicEra = (interface>10000 and interface<12000) +local classicTBC = (interface>20000 and interface<30000) +local classicWrath = (interface>30000 and interface<40000) local areaTable = {} @@ -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" @@ -27,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, @@ -103,6 +115,7 @@ local subzones = { [3690] = 405, [3691] = 405, [3692] = 405, + [3979] = 480, [3859] = 405, [3974] = 405, [3975] = 405, @@ -116,7 +129,7 @@ local instances = { [309] = 309, [329] = 330, [349] = 205, - [548] = 405, + [548] = 130, [1001] = 130, [1004] = 130, [1007] = 330, @@ -131,14 +144,26 @@ local fishingpoles = { [19970] = true, [25978] = true, [44050] = true, + [45120] = true, + [45858] = true, + [45991] = true, + [45992] = true, } local function GetNumFishToLevel(skillRank) - if skillRank <= 75 then - return 1 + local classicScale=25 + local expScale=75 + local numFishToLevel + if skillRank <= 300 then + numFishToLevel=math.ceil(skillRank / classicScale)-2 + if numFishToLevel < 1 then + numFishToLevel = 1 + end else - return math.ceil((skillRank - 75) / 25) + numFishToLevel=math.ceil(skillRank/expScale)+5 end + + return numFishToLevel end local function UpdateFishCount(shouldIncrement) @@ -152,8 +177,16 @@ 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) @@ -204,12 +237,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 @@ -223,7 +255,7 @@ local function UpdateCatchInfo() maxZoneSkill = zoneSkill + 95 end - local chance = ( + FishbringerDB.chance = ( db[char].fishingSkill + db[char].fishingBuff - zoneSkill ) * 0.01 + 0.05 @@ -231,18 +263,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" @@ -250,15 +282,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 @@ -288,9 +320,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 = "" @@ -393,25 +431,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 - 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) @@ -502,7 +529,7 @@ local function InitializeFrame() end end -function UpdateFishingSkill() +local function UpdateFishingSkill() return UpdateSkill(false) end @@ -526,6 +553,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 bc95b7e52310587e82bb2413e4bc0b8f04732860 Mon Sep 17 00:00:00 2001 From: Godot-Fye <47419231+Godot-Fye@users.noreply.github.com> Date: Mon, 18 Sep 2023 07:41:30 +0200 Subject: [PATCH 22/22] Add files via upload Fixed for zones without a zone ID (As the SW-IF tram). Includes some visual changes I've been working on. Added an option to disable the color logo. Credits for this Update go to the Curseforge Fishbringer Contributor Lotimar: https://legacy.curseforge.com/members/Lotimar/projects --- Fishbringer-BCC.toc | 2 +- Fishbringer-Classic.toc | 2 +- Fishbringer-Wrath.toc | 2 +- Localization.esES.lua | 54 ++++++++++++++++++++--------------------- Localization.frFR.lua | 54 ++++++++++++++++++++--------------------- Localization.ptBR.lua | 54 ++++++++++++++++++++--------------------- fishy.lua | 50 +++++++++++++++++++++++++++++--------- 7 files changed, 122 insertions(+), 96 deletions(-) diff --git a/Fishbringer-BCC.toc b/Fishbringer-BCC.toc index eb30977..3ab49b5 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.2 +## Version: 3.0.3 # main: localization.core.lua diff --git a/Fishbringer-Classic.toc b/Fishbringer-Classic.toc index 9114b77..8d850ed 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.2 +## Version: 3.0.3 # main: localization.core.lua diff --git a/Fishbringer-Wrath.toc b/Fishbringer-Wrath.toc index 51327bb..6cd7e09 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.2 +## Version: 3.0.3 # main: localization.core.lua diff --git a/Localization.esES.lua b/Localization.esES.lua index 7b34ccd..31ddbca 100644 --- a/Localization.esES.lua +++ b/Localization.esES.lua @@ -1,27 +1,27 @@ -local ADDON_NAME, namespace = ... -local L = namespace.L - -if namespace.locale == "esES" then - - --ShowHelp Function - L["Nat Pagle would be proud of you."] = "Nat Pagle estaría orgulloso de ti." - L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Alterna la visibilidad." - L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Recorre la alineación del texto." - L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Alterna la visibilidad del recuento de peces." - L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Restablece la base de datos de peces." - - --Fishbringer Overlay/Display Widget - L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nNo hay peces en esta zona" - L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d habilidad necesaria para pescar\n(%d necesario para una tasa de captura del 100%%)" - L["%d%% catch rate"] = "%d%% tasa de captura" - L["%s%s fishing skill%s"] = "%s%s habilidad de pesca" - L["\n%d fish needed to skill up"] = "\n%d peces necesarios para mejorar" - L["%d fish caught at this level"] = "%d pescado capturado a este nivel" - - -- Angeln/Fishing - Name of the Fishing Perk - L["Fishing"] = "Pescar" - - -- Welcome Message on Login - L["Pack yer bags, we be leavin' fer fishin'!"] = "¡Prepara tus maletas, nos vamos 'a pescar'!" - -return end +local ADDON_NAME, namespace = ... +local L = namespace.L + +if namespace.locale == "esES" then + + --ShowHelp Function + L["Nat Pagle would be proud of you."] = "Nat Pagle estaría orgulloso de ti." + L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Alterna la visibilidad." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Recorre la alineación del texto." + L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Alterna la visibilidad del recuento de peces." + L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Restablece la base de datos de peces." + + --Fishbringer Overlay/Display Widget + L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nNo hay peces en esta zona" + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d habilidad necesaria para pescar\n(%d necesario para una tasa de captura del 100%%)" + L["%d%% catch rate"] = "%d%% tasa de captura" + L["%s%s fishing skill%s"] = "%s%s habilidad de pesca" + L["\n%d fish needed to skill up"] = "\n%d peces necesarios para mejorar" + L["%d fish caught at this level"] = "%d pescado capturado a este nivel" + + -- Angeln/Fishing - Name of the Fishing Perk + L["Fishing"] = "Pescar" + + -- Welcome Message on Login + L["Pack yer bags, we be leavin' fer fishin'!"] = "¡Prepara tus maletas, nos vamos 'a pescar'!" + +return end diff --git a/Localization.frFR.lua b/Localization.frFR.lua index 8ed59c2..58eb134 100644 --- a/Localization.frFR.lua +++ b/Localization.frFR.lua @@ -1,27 +1,27 @@ -local ADDON_NAME, namespace = ... -local L = namespace.L - -if namespace.locale == "frFR" then - - --ShowHelp Function - L["Nat Pagle would be proud of you."] = "Nat Pagle serait fier de vous." - L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Bascule la visibilité." - L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Fait défiler l'alignement du texte." - L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Bascule la visibilité du nombre de poissons." - L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Réinitialise la base de données des poissons." - - --Fishbringer Overlay/Display Widget - L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nPas de poisson dans cette zone" - L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d compétence nécessaire pour pêcher\n(%d nécessaire pour un taux de capture de 100%%)" - L["%d%% catch rate"] = "%d%% taux de capture" - L["%s%s fishing skill%s"] = "%s%s compétence de pêche" - L["\n%d fish needed to skill up"] = "\n%d рыб poisson nécessaire pour se perfectionner" - L["%d fish caught at this level"] = "%d poisson pêché à ce niveau" - - -- Angeln/Fishing - Name of the Fishing Perk - L["Fishing"] = "Pêche" - - -- Welcome Message on Login - L["Pack yer bags, we be leavin' fer fishin'!"] = "Faites vos valises, nous partons « à la pêche » !" - -return end +local ADDON_NAME, namespace = ... +local L = namespace.L + +if namespace.locale == "frFR" then + + --ShowHelp Function + L["Nat Pagle would be proud of you."] = "Nat Pagle serait fier de vous." + L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Bascule la visibilité." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Fait défiler l'alignement du texte." + L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Bascule la visibilité du nombre de poissons." + L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Réinitialise la base de données des poissons." + + --Fishbringer Overlay/Display Widget + L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nPas de poisson dans cette zone" + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d compétence nécessaire pour pêcher\n(%d nécessaire pour un taux de capture de 100%%)" + L["%d%% catch rate"] = "%d%% taux de capture" + L["%s%s fishing skill%s"] = "%s%s compétence de pêche" + L["\n%d fish needed to skill up"] = "\n%d рыб poisson nécessaire pour se perfectionner" + L["%d fish caught at this level"] = "%d poisson pêché à ce niveau" + + -- Angeln/Fishing - Name of the Fishing Perk + L["Fishing"] = "Pêche" + + -- Welcome Message on Login + L["Pack yer bags, we be leavin' fer fishin'!"] = "Faites vos valises, nous partons « à la pêche » !" + +return end diff --git a/Localization.ptBR.lua b/Localization.ptBR.lua index 91d9369..f43d92d 100644 --- a/Localization.ptBR.lua +++ b/Localization.ptBR.lua @@ -1,27 +1,27 @@ -local ADDON_NAME, namespace = ... -local L = namespace.L - -if namespace.locale == "ptBR" then - - --ShowHelp Function - L["Nat Pagle would be proud of you."] = "Nat Pagle ficaria orgulhoso de você." - L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Alterna a visibilidade." - L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Percorre o alinhamento do texto." - L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Alterna a visibilidade da contagem de peixes." - L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Reinicia o banco de dados de peixes." - - --Fishbringer Overlay/Display Widget - L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nNenhum peixe nesta zona" - L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d habilidade necessária para pescar\n(%d necessário para 100%% de taxa de captura)" - L["%d%% catch rate"] = "%d%% taxa de captura" - L["%s%s fishing skill%s"] = "%s%s habilidade de pesca" - L["\n%d fish needed to skill up"] = "\n%d peixes precisavam de habilidade" - L["%d fish caught at this level"] = "%d peixes capturados neste nível" - - -- Angeln/Fishing - Name of the Fishing Perk - L["Fishing"] = "pescaria" - - -- Welcome Message on Login - L["Pack yer bags, we be leavin' fer fishin'!"] = "Faça as malas, vamos partir 'para pescar'!" - -return end +local ADDON_NAME, namespace = ... +local L = namespace.L + +if namespace.locale == "ptBR" then + + --ShowHelp Function + L["Nat Pagle would be proud of you."] = "Nat Pagle ficaria orgulhoso de você." + L["- /fishbringer show - Toggles visibility."] = "- /fishbringer show - Alterna a visibilidade." + L["- /fishbringer align - Cycles through text alignment."] = "- /fishbringer align - Percorre o alinhamento do texto." + L["- /fishbringer count - Toggles fish count visibility."] = "- /fishbringer count - Alterna a visibilidade da contagem de peixes." + L["- /fishbringer reset - Resets the fish database."] = "- /fishbringer reset - Reinicia o banco de dados de peixes." + + --Fishbringer Overlay/Display Widget + L["\124c%s%s\124r\nNo fish in this zone"] = "\124c%s%s\124r\nNenhum peixe nesta zona" + L["\124c%s%s\124r\n%d skill needed to fish\n(%d needed for 100%% catch rate)"] = "\124c%s%s\124r\n%d habilidade necessária para pescar\n(%d necessário para 100%% de taxa de captura)" + L["%d%% catch rate"] = "%d%% taxa de captura" + L["%s%s fishing skill%s"] = "%s%s habilidade de pesca" + L["\n%d fish needed to skill up"] = "\n%d peixes precisavam de habilidade" + L["%d fish caught at this level"] = "%d peixes capturados neste nível" + + -- Angeln/Fishing - Name of the Fishing Perk + L["Fishing"] = "pescaria" + + -- Welcome Message on Login + L["Pack yer bags, we be leavin' fer fishin'!"] = "Faça as malas, vamos partir 'para pescar'!" + +return end diff --git a/fishy.lua b/fishy.lua index b24c6bf..735e86b 100755 --- a/fishy.lua +++ b/fishy.lua @@ -160,7 +160,7 @@ local function GetNumFishToLevel(skillRank) numFishToLevel = 1 end else - numFishToLevel=math.ceil(skillRank/expScale)+5 + numFishToLevel=math.ceil((skillRank-315)/expScale)+10 end return numFishToLevel @@ -238,8 +238,10 @@ local function UpdateCatchInfo() end if not zoneSkill then local mapId = C_Map.GetBestMapForUnit("Player") - zoneText = C_Map.GetMapInfo(mapId).name - zoneSkill = zones[mapId] + if mapId then + zoneText = C_Map.GetMapInfo(mapId).name + zoneSkill = zones[mapId] + end end end -- Sometimes we can trigger this before the player is in any zone @@ -324,7 +326,11 @@ local function UpdateSkill(forceResetFishCounter) if skillRank ~= skillMaxRank then skillRankText = string.format("%d(%d)", skillRank, skillMaxRank) if fishNeeded>1 then - strFishNeeded = string.format("%d-%d",fishNeeded-1, fishNeeded) + if fishNeeded<10 then + strFishNeeded = string.format("%d-%d",fishNeeded-1, fishNeeded) + else + strFishNeeded = string.format("%d-%d",fishNeeded-1, fishNeeded+1) + end else strFishNeeded = string.format("%d", fishNeeded) end @@ -426,11 +432,32 @@ local function InitializeDB(resetDatabase) maxFishingSkill = 0, isShown = false, isFishCountShown = true, - alignment = "RIGHT" + alignment = "RIGHT", + isGradiant = true, } end end +local function setTitleText() + + local name + if db[char].isGradiant == nil then + db[char].isGradiant = true + end + if db[char].isGradiant then + name = "|cff0000ffF|cff0049ffi|cff0069ffs|cff0083ffh|cff0099ffb|cff00acffr|cff00bfffi|cff00d0ffn|cff00e1ffg|cff00f0ffe|cff00ffffr" + else + name = "Fishbringer" + end + Fishbringer.title:SetText(name) + +end + +local function toggleColor() + db[char].isGradiant=not db[char].isGradiant + setTitleText() +end + local function InitializeFrame() -- Frame madness if Fishbringer then @@ -479,14 +506,9 @@ local function InitializeFrame() title:SetJustifyH(db[char].alignment) title:SetFont(FONT, 16) title:SetShadowOffset(1, -1) - local name - if random(100) < 5 then - name = "Corrupted Fishbringer" - else - name = "Fishbringer" - end - title:SetText(name) + Fishbringer.title = title + setTitleText() local zoneInfo = Fishbringer:CreateFontString(nil, "OVERLAY") zoneInfo:SetHeight(50) @@ -564,6 +586,7 @@ local function ShowHelp() Print(L["- /fishbringer align - Cycles through text alignment."]) Print(L["- /fishbringer count - Toggles fish count visibility."]) Print(L["- /fishbringer reset - Resets the fish database."]) + Print(L["- /fishbringer color - Enables/disables gradient color."]) end SlashCmdList["FISHBRINGER"] = function(arg) @@ -578,6 +601,9 @@ SlashCmdList["FISHBRINGER"] = function(arg) UpdateSkill(true) UpdateCatchInfo() return + elseif arg == "color" then + toggleColor() + return end return ShowHelp() end