WoWInterface SVN Broker_ClassHall

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

trunk/Broker_ClassHall/Broker_ClassHall.lua
81,12 → 81,15
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
122,12 → 125,25
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")
135,18 → 151,6
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)
trunk/Broker_ClassHall/Broker_ClassHall.toc
1,7 → 1,7
## 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
\ No newline at end of file