Skip to content

Commit

Permalink
Classic Era compatibility
Browse files Browse the repository at this point in the history
Added classic Era Compatibility
  • Loading branch information
Ulidan committed Jul 14, 2021
1 parent df59fe1 commit dd6e0b2
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 87 deletions.
49 changes: 24 additions & 25 deletions Fishbringer.toc → Fishbringer-BCC.toc
100755 → 100644
Original file line number Diff line number Diff line change
@@ -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
24 changes: 24 additions & 0 deletions Fishbringer-Classic.toc
Original file line number Diff line number Diff line change
@@ -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
79 changes: 17 additions & 62 deletions fishy.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}


Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit dd6e0b2

Please sign in to comment.