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