/
local function ShowResearch(tt) |
tt:AddLine(ORDER_HALL_TALENT_TITLE) |
local researching = false |
local talents = C_Garrison.GetTalentTrees(garType, classID)[1] |
for i,v in ipairs(talents) do |
if v.isBeingResearched then |
tt:AddDoubleLine(v.name, SecondsToTime(v.researchTimeRemaining), 1, 1, 1, 1, 1, 1) |
researching = true |
break |
local talentIDS = C_Garrison.GetTalentTreeIDsByClassID(garType, classID) |
for i,v in ipairs(talentIDS) do |
local _,_,tree = C_Garrison.GetTalentTreeInfoForID(garType, v) |
for j, talent in ipairs(tree) do |
if talent.isBeingResearched then |
tt:AddDoubleLine(talent.name, SecondsToTime(talent.researchTimeRemaining), 1, 1, 1, 1, 1, 1) |
researching = true |
--break |
end |
end |
end |
if not researching then |
end |
end |
local override |
local function OverrideCommandBar() |
if OrderHallCommandBar and not override then |
OrderHallCommandBar:Hide() --just in case |
OrderHallCommandBar.Show = OrderHallCommandBar.Hide |
OrderHallCommandBar:HookScript("OnMouseUp", function(self, btn) --just in case |
if btn == "RightButton" then |
self:Hide() |
end |
end) |
override = true |
end |
end |
local f = CreateFrame("Frame") |
f:RegisterEvent("PLAYER_LOGIN") |
f:RegisterEvent("GARRISON_UPDATE") |
f:RegisterEvent("ADDON_LOADED") |
local function RegisterEvents() |
f:RegisterUnitEvent("UNIT_PHASE", "player") |
f:RegisterEvent("GARRISON_TALENT_COMPLETE") |
f:RegisterEvent("PLAYER_ENTERING_WORLD") |
end |
local override |
local function OverrideCommandBar() |
if OrderHallCommandBar and not override then |
OrderHallCommandBar:Hide() --just in case |
OrderHallCommandBar.Show = OrderHallCommandBar.Hide |
OrderHallCommandBar:HookScript("OnMouseUp", function(self, btn) --just in case |
self:Hide() |
end) |
override = true |
end |
end |
f:SetScript("OnEvent", function(self, event, arg1) |
if event == "PLAYER_LOGIN" then |
currency = C_Garrison.GetCurrencyTypes(garType) |
## Interface: 70000 |
## Interface: 70200 |
## Title: Broker_ClassHall |
## Author: Seerah |
## Version: 1.0 |
## Version: 1.0.1 |
## Notes: Hides the class hall command bar and moves its data to a LibDataBroker plugin. |
Broker_ClassHall.lua |