WoWInterface SVN BrokerItemRack

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 12 to Rev 13
    Reverse comparison

Rev 12 → Rev 13

trunk/Broker_ItemRack/Broker_ItemRack.toc
7,7 → 7,7
## X-Embeds: Ace3
## X-Category: Miscellaneous
## SavedVariables: Broker_ItemRackConfig
## Version: 1.7
## Version: 1.8
 
embeds.xml
LibDataBroker-1.1.lua
trunk/Broker_ItemRack/Broker_ItemRack.lua
11,31 → 11,26
local dataobj = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Broker_ItemRack", {type = "data source", label = "Broker ItemRack", icon = "Interface\\Addons\\Broker_ItemRack\\Broker_ItemRack", text = L["<no outfit>"]})
local BRItemRack = CreateFrame("Frame", "Broker_ItemRack")
 
BRItemRack:RegisterEvent("VARIABLES_LOADED")
BRItemRack:RegisterEvent("PLAYER_ENTERING_WORLD");
BRItemRack:RegisterEvent("UNIT_INVENTORY_CHANGED");
BRItemRack:RegisterEvent("ADDON_LOADED")
 
BRItemRack:SetScript("OnEvent", function(self, event, arg1, ...)
 
if event == "ADDON_LOADED" then
if IsAddOnLoaded("ItemRackOptions") then
if event == "ADDON_LOADED" and arg1 == "ItemRackOptions" then
hooksecurefunc(ItemRackOpt, "SaveSet", BRItemRack_Update)
BRItemRack:UnregisterEvent("ADDON_LOADED")
end
if IsAddOnLoaded("Broker_ItemRack") then BRItemRack:UnregisterEvent("ADDON_LOADED") end
end
 
if event == "VARIABLES_LOADED" then
 
if event == "ADDON_LOADED" and arg1 == "Broker_ItemRack" then
if not Broker_ItemRackConfig then
-- initialize default configuration
Broker_ItemRackConfig = {
MenuOrientation = "VERTICAL"
}
end
 
end
-- set enable events to whatever value ItemRack assigns
Broker_ItemRackConfig.EnableEvents = ItemRackUser.EnableEvents or "ON"
 
end
 
if ((event == "UNIT_INVENTORY_CHANGED") and (arg1 == "player")) or event == "PLAYER_ENTERING_WORLD" then
87,6 → 82,11
function dataobj.OnLeave() GameTooltip:Hide() end
 
function dataobj.OnEnter(self)
-- ensure that our savedvar will always have the correct value
if ItemRackUser and ItemRackUser.EnableEvents then
Broker_ItemRackConfig.EnableEvents = ItemRackUser.EnableEvents
end
 
GameTooltip:SetOwner(self, "ANCHOR_NONE")
GameTooltip:SetPoint(GetTipAnchor(self))
GameTooltip:ClearLines()
121,7 → 121,7
ItemRack.ToggleEvents()
if ItemRackUser and ItemRackUser.EnableEvents then
Broker_ItemRackConfig.EnableEvents = ItemRackUser.EnableEvents
end
end
return
end