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()