If Broker is not loaded, manages the Garrison Report addition
ggargani [10-05-16 - 08:45]
If Broker is not loaded, manages the Garrison Report addition
diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua
index 79cea13..d4419fa 100644
--- a/GarrisonCommander.lua
+++ b/GarrisonCommander.lua
@@ -504,6 +504,29 @@ function addon:OnInitialized()
--@end-debug@
self:Trigger("MSORT")
LoadAddOn("GarrisonCommander-Broker")
+ if (not IsAddOnLoaded("GarrisonCommander-Broker")) then
+ GarrisonLandingPageMinimapButton:HookScript("OnEnter",function(this)
+ if this.description==MINIMAP_ORDER_HALL_LANDING_PAGE_TOOLTIP then
+ GameTooltip:AddLine(WARDROBE_NEXT_VISUAL_KEY .. " " .. MINIMAP_GARRISON_LANDING_PAGE_TOOLTIP)
+ end
+ GameTooltip:Show()
+ end
+ )
+ GarrisonLandingPageMinimapButton:RegisterForClicks("LEFTBUTTONUP","RIGHTBUTTONUP")
+ GarrisonLandingPageMinimapButton:SetScript("OnClick",
+ function (this,button)
+ if (GarrisonLandingPage and GarrisonLandingPage:IsShown()) then
+ HideUIPanel(GarrisonLandingPage);
+ else
+ if button=="RightButton" then
+ ShowGarrisonLandingPage(2)
+ else
+ ShowGarrisonLandingPage(C_Garrison.GetLandingPageGarrisonType());
+ end
+ end
+ end
+ )
+ end
--@debug@
-- assert(self:GetAgeColor(1/0))
-- assert(self:GetAgeColor(0/0))