From 983f432e7784916ec3de5c632c58bc4e1b3b3df6 Mon Sep 17 00:00:00 2001 From: ggargani Date: Wed, 5 Oct 2016 10:45:42 +0200 Subject: [PATCH] If Broker is not loaded, manages the Garrison Report addition --- GarrisonCommander.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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)) -- 1.7.9.5