From 1d2ab23d0d321f3f14f09fd0294583bf34e0dfce Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:34:10 +1100 Subject: [PATCH 01/20] Fix blizzard visual bug that overlaps the follower acquisition text and armor/weapon pLevels for uncollected followers --- FollowerPage.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/FollowerPage.lua b/FollowerPage.lua index 3547341..45b5a42 100644 --- a/FollowerPage.lua +++ b/FollowerPage.lua @@ -249,6 +249,11 @@ function module:ShowUpgradeButtons(force) for i=used,#b do b[i]:Hide() end + -- fix Blizzard UI Bug + if followerInfo and not followerInfo.isCollected then + GarrisonFollowerPage_SetItem(gf.ItemWeapon) + GarrisonFollowerPage_SetItem(gf.ItemArmor) + end end function module:DelayedRefresh(delay) if GMF.FollowerTab:IsShown() then -- 1.7.9.5 From 0a06a5cae061536030c57d921edc04aba80a9c8b Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:34:51 +1100 Subject: [PATCH 02/20] Fix hiding of corner textures for option frame --- GarrisonCommander.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index 9b6348a..cdd977e 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -1177,7 +1177,7 @@ function addon:CreateHeader(module,MOVEPANEL,PIN) --@end-alpha@ -- Removing wood corner. I do it here to not derive an xml frame. This shoud play better with ui extensions GCF.CloseButton:Hide() - for _,f in pairs({GCF:GetRegions()}) do + for _,f in pairs({GCF.GarrCorners:GetRegions()}) do if (f:GetObjectType()=="Texture" and f:GetAtlas()=="Garr_WoodFrameCorner") then f:Hide() end end local main=module:GetMain() -- 1.7.9.5 From 0859780f335dc579b9c4cd70b15bac850da1b37a Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:36:01 +1100 Subject: [PATCH 03/20] Allow armor and weapon upgrades to be applied to inactive followers --- FollowerPage.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/FollowerPage.lua b/FollowerPage.lua index 45b5a42..4b5f393 100644 --- a/FollowerPage.lua +++ b/FollowerPage.lua @@ -151,10 +151,9 @@ function module:ShowUpgradeButtons(force) end local followerID=gf.followerID local followerInfo = followerID and G.GetFollowerInfo(followerID); --- gf.ItemWeapon.itemLevel=674 --- gf.ItemArmor.itemLevel=674 - local overTheTop=(gf.ItemWeapon.itemLevel + gf.ItemArmor.itemLevel) >=(GARRISON_FOLLOWER_MAX_ITEM_LEVEL *2) - if (not overTheTop and followerInfo and followerInfo.isCollected and not followerInfo.status and followerInfo.level == GARRISON_FOLLOWER_MAX_LEVEL ) then + + local canUpgrade = followerInfo and followerInfo.isCollected and gf.ItemWeapon.itemLevel + gf.ItemArmor.itemLevel < GARRISON_FOLLOWER_MAX_ITEM_LEVEL * 2 + if canUpgrade and (not followerInfo.status or followerInfo.status == GARRISON_FOLLOWER_INACTIVE) and followerInfo.isMaxLevel then ClearOverrideBindings(gf) local binded={} local currentType="" -- 1.7.9.5 From 3d77348b50f36818ec01bcfb465ca9e4df8d5b66 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:39:08 +1100 Subject: [PATCH 04/20] Fix upgrades still showing when moving from a follower that has an upgrade available to an uncollected follower (requires previous commit) --- GarrisonCommander.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index cdd977e..c02b712 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -1349,8 +1349,8 @@ print("Click") end if (frame.info.isCollected) then self:ScheduleTimer("HookedGarrisonFollowerButton_UpdateCounters",0.2,GMF,frame,frame.info,false) - self:GetModule("FollowerPage"):ShowUpgradeButtons() end + self:GetModule("FollowerPage"):ShowUpgradeButtons() end -- Shamelessly stolen from Blizzard Code -- Appears when hovering on menaces in mission button -- 1.7.9.5 From 1cd17f84c6907894ea602c073b2d4a24a08664d0 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:41:17 +1100 Subject: [PATCH 05/20] Change armor pLevel/weapon pLevel/xp placement so they are always inside the button they belong to. This may conflict with Master Plan's placement of the same, but as these can be turned off in either addon, this shouldn't be a problem --- GarrisonCommander.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index c02b712..46bf130 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -1296,10 +1296,11 @@ end function addon:RenderFollowerPageFollowerButton(frame,follower,showCounters) if not frame.GCWep then frame.GCWep=frame:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall") - frame.GCWep:SetPoint("BOTTOMLEFT",frame.Name,"TOPLEFT",0,2) + frame.GCWep:SetPoint("LEFT",frame.ILevel,"RIGHT",5,0) frame.GCArm=frame:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall") - frame.GCArm:SetPoint("TOPLEFT",frame.GCWep,"TOPRIGHT") + frame.GCArm:SetPoint("LEFT",frame.GCWep,"RIGHT",5,0) frame.GCXp=frame:CreateFontString(nil,"ARTWORK","GameFontHighlightSmall") + frame.GCXp:SetPoint("BOTTOMRIGHT",frame,"BOTTOMRIGHT",-5,5) end if not follower.isCollected or type(follower.followerID)=="number" or follower.isTroop then frame.GCXp:Hide() @@ -1326,16 +1327,13 @@ function addon:RenderFollowerPageFollowerButton(frame,follower,showCounters) frame.GCArm:SetTextColor(c2.r,c2.g,c2.b) frame.GCWep:Show() frame.GCArm:Show() - frame.GCXp:SetPoint("LEFT",frame.GCArm,"RIGHT",2,0) else frame.GCWep:Hide() frame.GCArm:Hide() - frame.GCXp:SetPoint("LEFT",frame.Name,"LEFT",0,20) end else frame.GCWep:Hide() frame.GCArm:Hide() - frame.GCXp:SetPoint("LEFT",frame.Name,"LEFT",0,20) end end function addon:HookedGarrisonFollowerListButton_OnClick(frame,button) -- 1.7.9.5 From 76b487b7dfb2c3f89dc02ba823580d39972539c8 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:41:49 +1100 Subject: [PATCH 06/20] Use existing boolean for test --- GarrisonCommander.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index 46bf130..612a001 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -1318,7 +1318,7 @@ function addon:RenderFollowerPageFollowerButton(frame,follower,showCounters) frame.GCXp:Hide() end if self:GetToggle("ILV") then - if (follower.level >= GARRISON_FOLLOWER_MAX_LEVEL) then + if follower.isMaxLevel then local c1=ITEM_QUALITY_COLORS[self:GetAnyData(follower.followerTypeID,follower.followerID,"weaponQuality" ,1)] local c2=ITEM_QUALITY_COLORS[self:GetAnyData(follower.followerTypeID,follower.followerID,"armorQuality" ,1)] frame.GCWep:SetFormattedText("W:%3d",self:GetAnyData(follower.followerTypeID,follower.followerID,"weaponItemLevel",600)) -- 1.7.9.5 From 40a7d1965263760e248c085de5ba9d11e446e8da Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:42:41 +1100 Subject: [PATCH 07/20] Fix last follower mission list button sometimes being about half the size of the rest by setting the button to fullwidth before attaching it to the list --- GarrisonCommander.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index 612a001..c0280f3 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -1512,8 +1512,8 @@ do if mission and party and #party.members >= G.GetMissionMaxFollowers(missionID) then local mb=AceGUI:Create("GMCMissionButton") mb:SetScale(0.6) - ml:PushChild(mb,missionID) mb:SetFullWidth(true) + ml:PushChild(mb,missionID) mb:SetMission(mission,party,false,"followers") mb:SetCallback("OnClick",MissionOnClick) prog=prog+1 -- 1.7.9.5 From ff68bfad4c8ffabcf9a8249652574e740f07c248 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:44:03 +1100 Subject: [PATCH 08/20] Fix last mission button sometimes being too wide by setting the button to fullwidth before attaching it to the list --- MissionControl.lua | 2 +- ShipControl.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MissionControl.lua b/MissionControl.lua index 059d6e4..97ac92e 100644 --- a/MissionControl.lua +++ b/MissionControl.lua @@ -248,8 +248,8 @@ do end party.missionID=missionID tinsert(GMC.list.Parties,party) - GMC.list.widget:PushChild(mb,missionID) mb:SetFullWidth(true) + GMC.list.widget:PushChild(mb,missionID) mb:SetMission(self:GetMissionData(missionID),party,false,"control") mb:Blacklist(blacklist[missionID]) mb:SetCallback("OnClick",leftclick) diff --git a/ShipControl.lua b/ShipControl.lua index c145788..4a4ae7e 100644 --- a/ShipControl.lua +++ b/ShipControl.lua @@ -301,8 +301,8 @@ do end party.missionID=missionID tinsert(GMC.list.Parties,party) - GMC.list.widget:PushChild(mb,missionID) mb:SetFullWidth(true) + GMC.list.widget:PushChild(mb,missionID) mb:SetMission(self:GetMissionData(missionID),party,false,"control") mb:Blacklist(blacklist[missionID]) mb:SetCallback("OnClick",leftclick) -- 1.7.9.5 From 0a934429777c171ffb0422ad9309d2139b8c63f8 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:45:10 +1100 Subject: [PATCH 09/20] Fix lua error when clicking on one of the traits in the trait filter --- GarrisonCommander.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GarrisonCommander.xml b/GarrisonCommander.xml index d455748..72adc49 100644 --- a/GarrisonCommander.xml +++ b/GarrisonCommander.xml @@ -426,7 +426,7 @@ - PlaySound("igMainMenuOptionCheckBoxOn"); + PlaySound(SOUNDKIT.IG_MAINMENU_OPTION_CHECKBOX_ON); local searchBox = GarrisonMissionFrameFollowers.SearchBox local searchString = searchBox:GetText(); if (searchString == self.name) then -- 1.7.9.5 From 0af70acd9c2685d34ba007400476b5118dbd2e02 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:45:51 +1100 Subject: [PATCH 10/20] Change location of mission success percentage so that it doesn't stick out of the side of the map for some missions --- ShipYard.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShipYard.lua b/ShipYard.lua index e667ae1..d470eae 100644 --- a/ShipYard.lua +++ b/ShipYard.lua @@ -172,7 +172,7 @@ function module:HookedGarrisonShipyardMap_SetupBonus(missionList,frame,mission) if mission.inProgress then return end i=i+1 addendum=CreateFrame("Frame",nil,frame) - addendum:SetPoint("TOPLEFT",frame,"TOPRIGHT",-10,-15) + addendum:SetPoint("TOP",frame,"BOTTOM",0,10) --@debug@ addendum:EnableMouse(true) addendum:SetScript("OnEnter",function(frame) module:TTDump(frame,mission) end) -- 1.7.9.5 From 040bfec01748860f9c5bddcceeb8d6c4da3521ab Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:47:02 +1100 Subject: [PATCH 11/20] Fix Mission Control tab so that it doesn't move and overlap the Help tab when opening and closing the options panel Fix Quickrun tab so that it doesn't move when opening and closing the option panel --- ShipYard.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ShipYard.lua b/ShipYard.lua index d470eae..97bf66e 100644 --- a/ShipYard.lua +++ b/ShipYard.lua @@ -295,7 +295,7 @@ print("Doing one time initialization for",this:GetName(),...) tabMC:SetNormalTexture("Interface\\ICONS\\ACHIEVEMENT_GUILDPERK_WORKINGOVERTIME.blp") tabMC:SetScript("OnClick",function(this,...) module:OpenMissionControlTab() end) tabMC:Show() - tabMC:SetPoint('TOPLEFT',GSF,'TOPRIGHT',0,0) + tabMC:SetPoint('TOPLEFT',GCS,'TOPRIGHT',0,-60) local tabQ=CreateFrame("Button",nil,GSF,"SpellBookSkillLineTabTemplate") GSF.tabQ=tabQ tabQ.tooltip=L["Automatically process completed missions and schedules new ones."].."\n".. @@ -305,7 +305,7 @@ print("Doing one time initialization for",this:GetName(),...) tabQ:SetPushedTexture("Interface\\ICONS\\Ability_Rogue_Sprint.blp") tabQ:Show() tabQ:SetScript("OnClick",function(this,button) addon:RunQuick() end) - tabQ:SetPoint('TOPLEFT',GSF,'TOPRIGHT',0,-210) + tabQ:SetPoint('TOPLEFT',GCS,'TOPRIGHT',0,-210) GSF.FollowerStatusInfo=GSF.BorderFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal") GSF.ResourceInfo=GSF.BorderFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal") -- 1.7.9.5 From 17d16e01f0fe59d1283da097c048d7d18220a75d Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:53:08 +1100 Subject: [PATCH 12/20] Fix lua errors from Blizzard code that now expects the mission list to be a specific number of frames up the frame stack when generating tooltips instead of calling it directly by name. These tooltips haven't worked for a couple of years. --- GarrisonCommander.lua | 4 ---- 1 file changed, 4 deletions(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index c0280f3..795c13f 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -3050,8 +3050,6 @@ function addon:AddShipsToButton(button,mission,missionID,bigscreen) local bg=CreateFrame("Button",nil,button,"GarrisonCommanderMissionButton") bg:SetPoint("RIGHT") bg.button=button - bg:SetScript("OnEnter",function(this) GarrisonMissionButton_OnEnter(this.button) end) - bg:SetScript("OnLeave",function() GameTooltip:FadeOut() end) bg:RegisterForClicks("AnyUp") bg:SetScript("OnClick",function(...) self:OnClick_GCMissionButton(...) end) button.gcPANEL=bg @@ -3067,8 +3065,6 @@ function addon:AddFollowersToButton(button,mission,missionID,bigscreen,numReward local bg=CreateFrame("Button",nil,button,"GarrisonCommanderMissionButton") bg:SetPoint("RIGHT") bg.button=button - bg:SetScript("OnEnter",function(this) pcall(GarrisonMissionButton_OnEnter,this.button) end) - bg:SetScript("OnLeave",function() GameTooltip:FadeOut() end) bg:RegisterForClicks("AnyUp") bg:SetScript("OnClick",function(...) self:OnClick_GCMissionButton(...) end) button.gcPANEL=bg -- 1.7.9.5 From 8d015ba8ec0f96339e07576b6e09cae3001fef3b Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Mon, 18 Mar 2019 03:57:57 +1100 Subject: [PATCH 13/20] Modify scrollframe to stop mission buttons overlapping frame border, also stops list expanding over title when missions are being sent. --- Widgets.lua | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Widgets.lua b/Widgets.lua index e9f4274..48a1130 100644 --- a/Widgets.lua +++ b/Widgets.lua @@ -289,15 +289,12 @@ local function GMCLayer() self:ReleaseChildren() self.scroll=nil end - self.scroll=AceGUI:Create("ScrollFrame") - local scroll=self.scroll - self:AddChild(scroll) - scroll:SetLayout("List") -- probably? + local scroll = AceGUI:Create("ScrollFrame") + scroll:SetLayout("List") scroll:SetFullWidth(true) scroll:SetFullHeight(true) - scroll:SetPoint("TOPLEFT",self.title,"BOTTOMLEFT",0,0) - scroll:SetPoint("TOPRIGHT",self.title,"BOTTOMRIGHT",0,0) - scroll:SetPoint("BOTTOM",self.content,"BOTTOM",0,0) + self:AddChild(scroll) + self.scroll = scroll end ---@function [parent=#GMCLayer] local function Constructor() @@ -326,8 +323,9 @@ local function GMCLayer() local content = CreateFrame("Frame",nil,frame) widget.content = content content.obj = self - content:SetPoint("TOPLEFT",title,"BOTTOMLEFT") - content:SetPoint("BOTTOMRIGHT") + content:SetPoint("TOPLEFT",title,"BOTTOMLEFT",6,0) + content:SetPoint("TOPRIGHT",title,"BOTTOMRIGHT",-6,0) + content:SetPoint("BOTTOM",0,6) AceGUI:RegisterAsContainer(widget) return widget end -- 1.7.9.5 From 2aa6103b3fefb8b85288b71f3f0b99226036b805 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Sun, 24 Mar 2019 15:06:19 +1100 Subject: [PATCH 14/20] Remove unused variable --- GarrisonCommander.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index 795c13f..a9dcb87 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -1504,7 +1504,6 @@ do if (tContains(party.members,followerID)) then tinsert(partyIndex,missionID) end end table.sort(partyIndex,function(a,b) return parties[a].perc > parties[b].perc end) - local prog=1 for i=1,#partyIndex do local missionID=partyIndex[i] local party=parties[missionID] @@ -1516,7 +1515,6 @@ do ml:PushChild(mb,missionID) mb:SetMission(mission,party,false,"followers") mb:SetCallback("OnClick",MissionOnClick) - prog=prog+1 end end del(partyIndex) -- 1.7.9.5 From c04ddbc73166722f1c3950adb489590832584408 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Sun, 24 Mar 2019 15:08:33 +1100 Subject: [PATCH 15/20] Reduce icon size in reward tooltip to match text size --- GarrisonCommander.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index a9dcb87..df5f625 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -2672,7 +2672,7 @@ function addon:AddRewardExtraTooltip(this,...) local _1,l,_3,_4,_5,_6,_7,_8,_9,t=GetItemInfo(k) local buy,source=self:GetMarketValue(l or k) if l then - tip:AddDoubleLine(format("|T%s:32|t %s %3.2f%%",t,l,c/total*100), + tip:AddDoubleLine(format("|T%s:16|t %s %3.2f%%",t,l,c/total*100), --tip:AddDoubleLine(format("link:%s %s",t,l), GetMoneyString(buy) .. ' ' .. source) else -- 1.7.9.5 From 97da26aa5a762a8b6eb6682b6a8a76b515e3cb59 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Sun, 24 Mar 2019 15:10:25 +1100 Subject: [PATCH 16/20] Update to TSM4 API for auction house prices --- MissionCache.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MissionCache.lua b/MissionCache.lua index bb5c2e6..f28116b 100644 --- a/MissionCache.lua +++ b/MissionCache.lua @@ -66,9 +66,9 @@ function module:OnInitialized() addon.AuctionPrices=true appraisers.ATR=Atr_GetAuctionBuyout end - if _G.TSMAPI then + if _G.TSMAPI_FOUR then addon.AuctionPrices=true - appraisers.TSM=function(itemlink) return TSMAPI:GetItemValue(itemlink,"DBMarket") end + appraisers.TSM=function(itemlink) return TSMAPI_FOUR.CustomPrice.GetItemPrice(itemlink,"DBMarket") end end if _G.TUJMarketInfo then addon.AuctionPrices=true -- 1.7.9.5 From d3827193c1a36eaadbc6b32ef948a8102d83a254 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Sun, 24 Mar 2019 15:13:51 +1100 Subject: [PATCH 17/20] Use localisation for processing missions. Isn't as flashy, but looks cleaner and works for translations --- MissionControl.lua | 4 ++-- ShipControl.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MissionControl.lua b/MissionControl.lua index 97ac92e..994d7b0 100644 --- a/MissionControl.lua +++ b/MissionControl.lua @@ -222,7 +222,7 @@ do timeElapsed=0.5 else local missionID=aMissions[currentMission] - GMC.list.widget:SetFormattedTitle("Processing mission %d of %d (%s)",currentMission,#aMissions,G.GetMissionName(missionID)) + GMC.list.widget:SetFormattedTitle(L["Processing mission %d of %d"], currentMission, #aMissions) local class=self:GetMissionData(missionID,"class") --print(C("Processing ","Red"),missionID,addon:GetMissionData(missionID,"name")) local minimumChance=0 @@ -302,13 +302,13 @@ function module:OnClick_Start(this,button) return end this:Disable() - GMC.list.widget:SetTitleColor(C.Green()) self:CreateMissionList(aMissions) wipe(GMCUsedFollowers) wipe(GMC.list.Parties) self:RefreshFollowerStatus() if (#aMissions>0) then GMC.list.widget:SetFormattedTitle(L["Processing mission %d of %d"],1,#aMissions) + GMC.list.widget:SetTitleColor(C.Yellow()) else GMC.list.widget:SetTitle("No mission matches your criteria") GMC.list.widget:SetTitleColor(C.Red()) diff --git a/ShipControl.lua b/ShipControl.lua index 4a4ae7e..3c168e9 100644 --- a/ShipControl.lua +++ b/ShipControl.lua @@ -264,7 +264,7 @@ do missionID=nextMissionID nextMissionID=OILRIG end - GMC.list.widget:SetFormattedTitle("Processing mission %d of %d (%s)",currentMission,#aMissions,G.GetMissionName(missionID)) + GMC.list.widget:SetFormattedTitle(L["Processing mission %d of %d"], currentMission, #aMissions) local class=self:GetMissionData(missionID,"class") --print(C("Processing ","Red"),missionID,addon:GetMissionData(missionID,"name")) local minimumChance=0 @@ -355,13 +355,13 @@ function module:OnClick_Start(this,button) return end this:Disable() - GMC.list.widget:SetTitleColor(C.Green()) self:CreateMissionList(aMissions) wipe(GMCUsedFollowers) wipe(GMC.list.Parties) shipyard:RefreshFollowerStatus() if (#aMissions>0) then GMC.list.widget:SetFormattedTitle(L["Processing mission %d of %d"],1,#aMissions) + GMC.list.widget:SetTitleColor(C.Yellow()) else GMC.list.widget:SetTitle("No mission matches your criteria") GMC.list.widget:SetTitleColor(C.Red()) -- 1.7.9.5 From 55e7b35290f51cad42443e9fe6eebd769b6d2e56 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Sun, 24 Mar 2019 16:55:08 +1100 Subject: [PATCH 18/20] Add status message while sending out missions. Requires localisation to be added. --- MissionControl.lua | 4 ++++ ShipControl.lua | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/MissionControl.lua b/MissionControl.lua index 994d7b0..e265e22 100644 --- a/MissionControl.lua +++ b/MissionControl.lua @@ -268,6 +268,8 @@ function module:OnClick_Run(this,button) do local elapsed=0 local co=coroutine.wrap(self.RunMission) + GMC.list.widget:SetFormattedTitle(L["Sending..."]) + GMC.list.widget:SetTitleColor(C.Yellow()) self:Unhook(GMC.runButton,'OnUpdate') self:RawHookScript(GMC.runButton,'OnUpdate',function(this,ts) elapsed=elapsed+ts @@ -276,6 +278,8 @@ function module:OnClick_Run(this,button) local rc=co(self) if (not rc) then self:Unhook(GMC.runButton,'OnUpdate') + GMC.list.widget:SetTitle(READY) + GMC.list.widget:SetTitleColor(C.Green()) --GMC.logoutButton:Enable() if not ns.quick and addon:GetBoolean("AUTOLOGOUT") then addon:LogoutPopout(5) diff --git a/ShipControl.lua b/ShipControl.lua index 3c168e9..9a0d5f4 100644 --- a/ShipControl.lua +++ b/ShipControl.lua @@ -321,6 +321,8 @@ function module:OnClick_Run(this,button) do local elapsed=0 local co=coroutine.wrap(self.RunMission) + GMC.list.widget:SetFormattedTitle(L["Sending..."]) + GMC.list.widget:SetTitleColor(C.Yellow()) self:Unhook(GMC.runButton,'OnUpdate') self:RawHookScript(GMC.runButton,'OnUpdate',function(this,ts) elapsed=elapsed+ts @@ -329,6 +331,8 @@ function module:OnClick_Run(this,button) local rc=co(self) if (not rc) then self:Unhook(GMC.runButton,'OnUpdate') + GMC.list.widget:SetTitle(READY) + GMC.list.widget:SetTitleColor(C.Green()) --GMC.logoutButton:Enable() if not ns.quick and addon:GetBoolean("SAUTOLOGOUT") then addon:LogoutPopup(5) -- 1.7.9.5 From a7547ffb193864570bc8ede64a6dc7db48d17aa2 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Sun, 24 Mar 2019 17:07:07 +1100 Subject: [PATCH 19/20] Remove auto logout code --- GarrisonCommander.lua | 5 ++--- MissionControl.lua | 17 ----------------- ShipControl.lua | 18 +----------------- ShipYard.lua | 1 - quick.lua | 46 ---------------------------------------------- 5 files changed, 3 insertions(+), 84 deletions(-) diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index df5f625..bcdebbc 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -1661,7 +1661,7 @@ function addon:AddMenu() local menu,size if GMF.MissionTab:IsVisible() then self.currentmenu=GMF.MissionTab - menu,size=self:CreateOptionsLayer(MP and 'CKMP' or nil,'BIGSCREEN','MSORT','MAXRES','MAXRESCHANCE','IGM','IGP','NOFILL','USEFUL','NOTOOLTIP','MOVEPANEL','AUTOLOGOUT') + menu,size=self:CreateOptionsLayer(MP and 'CKMP' or nil,'BIGSCREEN','MSORT','MAXRES','MAXRESCHANCE','IGM','IGP','NOFILL','USEFUL','NOTOOLTIP','MOVEPANEL') elseif GMF.FollowerTab:IsVisible() then local missionlist=ns.bigscreen or self:GetBoolean("FOLLOWERMISSIONLIST") self.currentmenu=GMF.FollowerTab @@ -1674,7 +1674,7 @@ function addon:AddMenu() self:RenderFollowerPageMissionList(nil,GMF.FollowerTab.followerID) elseif GMF.MissionControlTab:IsVisible() then self.currentmenu=GMF.MissionControlTab - menu,size=self:CreateOptionsLayer('BIGSCREEN','GCMINLEVEL','GCMINUPGRADE','MINXPLEVEL','MINGOLD','GCSKIPRARE','GCSKIPEPIC','USEFUL','NOTOOLTIP','AUTOLOGOUT') + menu,size=self:CreateOptionsLayer('BIGSCREEN','GCMINLEVEL','GCMINUPGRADE','MINXPLEVEL','MINGOLD','GCSKIPRARE','GCSKIPEPIC','USEFUL','NOTOOLTIP') else self.currentmenu=nil menu,size=self:CreateOptionsLayer('BIGSCREEN') @@ -1754,7 +1754,6 @@ function addon:ScriptGarrisonMissionFrame_OnShow(...) self:Trigger("MSORT") self:Trigger("CKMP") if IsControlKeyDown() then - self:EnableAutoLogout() self:ScheduleTimer("RunQuick",0.1,true) end self:RawHook(GMFMissions,"UpdateMissions","OnUpdateMissions",true) diff --git a/MissionControl.lua b/MissionControl.lua index e265e22..432cb50 100644 --- a/MissionControl.lua +++ b/MissionControl.lua @@ -264,7 +264,6 @@ end function module:OnClick_Run(this,button) local GMC=GMF.MissionControlTab this:Disable() - --GMC.logoutButton:Disable() do local elapsed=0 local co=coroutine.wrap(self.RunMission) @@ -280,11 +279,6 @@ function module:OnClick_Run(this,button) self:Unhook(GMC.runButton,'OnUpdate') GMC.list.widget:SetTitle(READY) GMC.list.widget:SetTitleColor(C.Green()) - --GMC.logoutButton:Enable() - if not ns.quick and addon:GetBoolean("AUTOLOGOUT") then - addon:LogoutPopout(5) - end - addon:missionDone() ns.quick=false end end @@ -791,7 +785,6 @@ function module:BuildFlags() addon:AddSlider("MINGOLD",50,1,1000,L["Minimum Gold Value"],L["Gold missions wich returns less than this amount are ignored"]) addon:AddToggle("GCSKIPEPIC",settings.skipEpic,L["Ignore epic for xp missions."],L["IF you have a Salvage Yard you probably dont want to have this one checked"]) addon:AddToggle("GCSKIPRARE",settings.skipRare,L["Ignore rare missions"],L["Rare missions will not be considered"]) - --addon:AddToggle("AUTOLOGOUT",false,L["Auto Logout"],L["Automatically logout after sending missions"]) addon:SetBoolean("AUTOLOGOUT",false) end function module:BuildDuration() @@ -875,16 +868,6 @@ function module:BuildMissionList() GMC.runButton:SetScript('OnClick',function(this,button) self:OnClick_Run(this,button) end) GMC.runButton:Disable() GMC.runButton:SetPoint('TOPRIGHT',-10,25) --- GMC.logoutButton=CreateFrame('BUTTON', nil,ml.widget.frame, 'GameMenuButtonTemplate') --- GMC.logoutButton:SetText(LOGOUT) --- GMC.logoutButton:SetWidth(ns.bigscreen and 148 or 90) --- GMC.logoutButton:SetScript("OnClick",function() --- GMF:Hide() --- module:Popup(LOGOUT) --- module:ScheduleTimer(Logout,0.5) --- end --- ) --- GMC.logoutButton:SetPoint('TOP',0,25) return ml end diff --git a/ShipControl.lua b/ShipControl.lua index 9a0d5f4..8d644f1 100644 --- a/ShipControl.lua +++ b/ShipControl.lua @@ -317,7 +317,6 @@ end function module:OnClick_Run(this,button) local GMC=GSF.MissionControlTab this:Disable() - --GMC.logoutButton:Disable() do local elapsed=0 local co=coroutine.wrap(self.RunMission) @@ -333,11 +332,6 @@ function module:OnClick_Run(this,button) self:Unhook(GMC.runButton,'OnUpdate') GMC.list.widget:SetTitle(READY) GMC.list.widget:SetTitleColor(C.Green()) - --GMC.logoutButton:Enable() - if not ns.quick and addon:GetBoolean("SAUTOLOGOUT") then - addon:LogoutPopup(5) - end - addon:shipyardDone() ns.quick=false end end @@ -797,7 +791,7 @@ function module:BuildFlags() addon:AddSlider("SGCMINLEVEL",settings.minLevel,535,715,L["Item minimum level"],L['Minimum requested level for equipment rewards'],15) addon:AddToggle("SGCSKIPEPIC",settings.skipEpic,L["Ignore epic for xp missions."],L["IF you have a Salvage Yard you probably dont want to have this one checked"]) addon:AddToggle("SGCRIG",settings.rig,L["Oil Rig."],L["Always send Oil Rig: Pickup mission as last mission if available"]) - addon:AddToggle("SAUTOLOGOUT",false,L["Auto Logout"],L["Automatically logout after sending missions"]) + addon:SetBoolean("SAUTOLOGOUT",false) addon:Trigger('SGCMINLEVEL') addon:Trigger('SGCSKIPEPIC') @@ -883,16 +877,6 @@ function module:BuildMissionList() GMC.runButton:SetScript('OnClick',function(this,button) self:OnClick_Run(this,button) end) GMC.runButton:Disable() GMC.runButton:SetPoint('TOPRIGHT',-10,25) - --GMC.logoutButton=CreateFrame('BUTTON', nil,ml.widget.frame, 'GameMenuButtonTemplate') - --GMC.logoutButton:SetText(LOGOUT) - --GMC.logoutButton:SetWidth(ns.bigscreen and 148 or 90) - --GMC.logoutButton:SetScript("OnClick",function() - -- GSF:Hide() - -- module:Popup(LOGOUT) - -- module:ScheduleTimer(Logout,0.5) - -- end - --) - --GMC.logoutButton:SetPoint('TOP',0,25) return ml end diff --git a/ShipYard.lua b/ShipYard.lua index 97bf66e..ff93390 100644 --- a/ShipYard.lua +++ b/ShipYard.lua @@ -346,7 +346,6 @@ function module:ScriptGarrisonShipyardFrame_OnShow() self:RefreshCurrency() self:RefreshFollowerStatus() if IsControlKeyDown() then - self:EnableAutoLogout() self:ScheduleTimer("RunQuick",0.1,true) end end diff --git a/quick.lua b/quick.lua index 8dbc2aa..3136083 100644 --- a/quick.lua +++ b/quick.lua @@ -5,15 +5,12 @@ local _G=_G local GMF=GMF local GSF=GSF local qm=addon:NewSubModule("Quick") --#qm -local missionDone -local shipyardDone local format=format local ipairs=ipairs local NavalDomination={ Alliance=39068, Horde=39246 } -local autologout=false local questid=NavalDomination[UnitFactionGroup("player")] function qm:OnInitialized() ns.step="none" @@ -22,12 +19,6 @@ local watchdog=0 local function HasShipTable() return ns.quests[39068] or ns.quests[39246] -- Naval Domination end -function addon:missionDone() - missionDone=true -end -function addon:shipyardDone() - shipyardDone=true -end -- backported from LibInit 41 function addon:Popup(msg,timeout,OnAccept,OnCancel,data,StopCasting) @@ -85,45 +76,11 @@ function addon:LogoutTimer(dialog,elapsed) text:SetFormattedText(StaticPopupDialogs[which].text, ceil(timeleft / 60), MINUTES); end end -function addon:LogoutPopup(timeout) - local msg='' - if addon:HasSalvageYard() then - local salvage=0 - local freeSlots=0 - for i=0,NUM_BAG_SLOTS do - freeSlots=freeSlots+(GetContainerNumFreeSlots(i) or 0) - end - for _,id in ipairs(ns.allSalvages) do - salvage=salvage+(GetItemCount(id) or 0) - end - if salvage > 5 then - timeout=timeout+5 - msg=format(L["You have %d items to salvage"],salvage) - if freeSlots < 5 then - msg=msg .. format(L[" and only %d free slots in your bags"],freeSlots) - end - msg=C(msg,'green').."\n" - local popup=addon:Popup(msg,timeout or 10, - function(dialog,data,data2) - StaticPopup_Hide("LIBINIT_POPUP") - end - ) - end - end -end function qm:RunQuick() local completeButton=GMF:IsVisible() and GarrisonCommanderQuickMissionComplete or GCQuickShipMissionCompletionButton local main=GMF:IsVisible() and GMF or GSF if not ns.quick then HideUIPanel(main) - if not G.HasShipyard() then - shipyardDone=true - end - if missionDone and shipyardDone then - addon:LogoutPopup(5) - else - autologout=false - end return end while not qm.Mission do @@ -149,9 +106,6 @@ function qm:RunQuick() end end -function addon:EnableAutoLogout() - autologout=true -end function addon:RunQuick(force) local main=GMF:IsVisible() and GMF or GSF if main.tabMC:GetChecked() then -- 1.7.9.5 From 036cd83a256163c71e653a0179c9239675e03f17 Mon Sep 17 00:00:00 2001 From: WildCard_25 Date: Sun, 24 Mar 2019 17:12:04 +1100 Subject: [PATCH 20/20] Remove Order Hall code --- FollowerCache.lua | 24 +--------- GarrisonCommander.lua | 37 ++++----------- GarrisonCommander.toc | 1 - Init.lua | 125 ------------------------------------------------- MatchMaker.lua | 29 +----------- MissionCache.lua | 18 +------ MissionCompletion.lua | 9 ---- 7 files changed, 14 insertions(+), 229 deletions(-) diff --git a/FollowerCache.lua b/FollowerCache.lua index 4a41532..8ee8723 100644 --- a/FollowerCache.lua +++ b/FollowerCache.lua @@ -20,13 +20,11 @@ local tostring=tostring local GetItemInfo=GetItemInfo local LE_FOLLOWER_TYPE_GARRISON_6_0=_G.LE_FOLLOWER_TYPE_GARRISON_6_0 local LE_FOLLOWER_TYPE_SHIPYARD_6_2=_G.LE_FOLLOWER_TYPE_SHIPYARD_6_2 -local LE_FOLLOWER_TYPE_GARRISON_7_0=_G.LE_FOLLOWER_TYPE_GARRISON_7_0 local maxrank=_G.GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY[LE_FOLLOWER_TYPE_GARRISON_6_0]*1000+GARRISON_FOLLOWER_MAX_LEVEL -local maxrankoh=_G.GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY[LE_FOLLOWER_TYPE_GARRISON_7_0]*1000+110 local module=addon:NewSubClass('FollowerCache') --#module local cache={} --#cache local followerTypes={} -local cacheTypes={LE_FOLLOWER_TYPE_GARRISON_6_0,LE_FOLLOWER_TYPE_SHIPYARD_6_2,LE_FOLLOWER_TYPE_GARRISON_7_0} +local cacheTypes={LE_FOLLOWER_TYPE_GARRISON_6_0,LE_FOLLOWER_TYPE_SHIPYARD_6_2} local EMPTY={} local GMCUsedFollowers={} local GMCUsedFollowersCount=0 @@ -50,12 +48,9 @@ print(event,...) self.caches[LE_FOLLOWER_TYPE_SHIPYARD_6_2]:OnEvent(event,...) elseif self.caches[LE_FOLLOWER_TYPE_GARRISON_6_0].cache[followerID].followerID then self.caches[LE_FOLLOWER_TYPE_GARRISON_6_0]:OnEvent(event,...) - elseif self.caches[LE_FOLLOWER_TYPE_GARRISON_7_0].cache[followerID].followerID then - self.caches[LE_FOLLOWER_TYPE_GARRISON_7_0]:OnEvent(event,...) else self.caches[LE_FOLLOWER_TYPE_GARRISON_6_0]:Wipe() self.caches[LE_FOLLOWER_TYPE_SHIPYARD_6_2]:Wipe() - self.caches[LE_FOLLOWER_TYPE_GARRISON_7_0]:Wipe() end end @@ -65,12 +60,6 @@ function cache:new(type) return rc end function cache:OnEvent(event,followerType,followerID) ---@debug@ - if followerType==LE_FOLLOWER_TYPE_GARRISON_7_0 and ns.ignoreHall then - return - end -print(event,followerType,followerID) ---@end-debug@ if event=="GARRISON_FOLLOWER_UPGRADED" or event=="GARRISON_FOLLOWER_XP_CHANGED" then if (self.cache[followerID]) then self.cache[followerID]['level']=G.GetFollowerLevel(followerID) @@ -154,9 +143,6 @@ function cache:AddExtraData(follower) follower.coloredname=C(follower.name,tostring(follower.quality)) follower.fullname=format("%3d %s",follower.rank,follower.coloredname) follower.maxed=follower.qLevel>=maxrank - if follower.followerTypeID==LE_FOLLOWER_TYPE_GARRISON_7_0 then - follower.maxed=follower.qLevel>=maxrankoh - end local weaponItemID, weaponItemLevel, armorItemID, armorItemLevel = G.GetFollowerItems(follower.followerID); follower.weaponItemID=weaponItemID follower.weaponItemLevel=weaponItemLevel @@ -241,15 +227,10 @@ function addon:GetAnyData(followerType,...) end if followerType== LE_FOLLOWER_TYPE_SHIPYARD_6_2 then return self:GetShipData(...) - elseif followerType== LE_FOLLOWER_TYPE_GARRISON_7_0 then - return self:GetHeroData(...) else return self:GetFollowerData(...) end end -function addon:GetHeroData(followerID,key,default) - return module.caches[LE_FOLLOWER_TYPE_GARRISON_7_0]:GetFollowerData(followerID,key,default) -end function addon:GetFollowerData(followerID,key,default) return module.caches[LE_FOLLOWER_TYPE_GARRISON_6_0]:GetFollowerData(followerID,key,default) end @@ -268,9 +249,6 @@ end function addon:GetShipsIterator(func) return module.caches[LE_FOLLOWER_TYPE_SHIPYARD_6_2]:GetFollowersIterator(func) end -function addon:GetHeroesIterator(func) - return module.caches[LE_FOLLOWER_TYPE_GARRISON_7_0]:GetFollowersIterator(func) -end function addon:GetAnyIterator(followerTypeID,func) return module.caches[followerTypeID]:GetFollowersIterator(func) end diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua index bcdebbc..599ae66 100644 --- a/GarrisonCommander.lua +++ b/GarrisonCommander.lua @@ -29,10 +29,8 @@ local minHeight local addon=addon --#addon local LE_FOLLOWER_TYPE_GARRISON_6_0=_G.LE_FOLLOWER_TYPE_GARRISON_6_0 local LE_FOLLOWER_TYPE_SHIPYARD_6_2=_G.LE_FOLLOWER_TYPE_SHIPYARD_6_2 -local LE_FOLLOWER_TYPE_GARRISON_7_0=_G.LE_FOLLOWER_TYPE_GARRISON_7_0 local LE_GARRISON_TYPE_6_0=_G.LE_GARRISON_TYPE_6_0 local LE_GARRISON_TYPE_6_2=_G.LE_GARRISON_TYPE_6_2 -local LE_GARRISON_TYPE_7_0=_G.LE_GARRISON_TYPE_7_0 ns.bigscreen=true local tprint=print local backdrop = { @@ -97,7 +95,6 @@ local GARRISON_MISSION_PERCENT_CHANCE="%d%%"-- GARRISON_MISSION_PERCENT_CHANCE --local GARRISON_CURRENCY=GARRISON_CURRENCY --824 local LE_FOLLOWER_TYPE_GARRISON_6_0=LE_FOLLOWER_TYPE_GARRISON_6_0 local LE_FOLLOWER_TYPE_SHIPYARD_6_2=LE_FOLLOWER_TYPE_SHIPYARD_6_2 -local LE_FOLLOWER_TYPE_GARRISON_7_0=LE_FOLLOWER_TYPE_GARRISON_7_0 local GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY=GARRISON_FOLLOWER_MAX_UPGRADE_QUALITY[LE_FOLLOWER_TYPE_GARRISON_6_0] --local GARRISON_FOLLOWER_MAX_LEVEL=GARRISON_FOLLOWER_MAX_LEVEL -- 100 @@ -388,14 +385,10 @@ function addon:OnInitialized() ns.custom={ [LE_FOLLOWER_TYPE_GARRISON_6_0]=addon, [LE_FOLLOWER_TYPE_SHIPYARD_6_2]=self:GetModule("ShipYard"), - --[LE_FOLLOWER_TYPE_GARRISON_7_0]=self:GetModule("OrderHall"), - --[LE_FOLLOWER_TYPE_GARRISON_8_0]=self:GetModule("BFA"), - } self:SafeRegisterEvent("GARRISON_MISSION_COMPLETE_RESPONSE") self:SafeRegisterEvent("GARRISON_MISSION_NPC_CLOSED") self:SafeRegisterEvent("GARRISON_MISSION_STARTED") - self:SafeRegisterEvent("ADDON_LOADED") self:SafeRegisterEvent("QUEST_TURNED_IN") for _,b in ipairs(GMF.MissionTab.MissionList.listScroll.buttons) do local scale=0.8 @@ -1960,7 +1953,6 @@ local fakeframe={} local mainframes={ [LE_FOLLOWER_TYPE_GARRISON_6_0]="GarrisonMissionFrame", [LE_FOLLOWER_TYPE_SHIPYARD_6_2]="GarrisonShipyardFrame", - [LE_FOLLOWER_TYPE_GARRISON_7_0]="OrderHallMissionFrame", } function addon:FillMissionPage(missionInfo) @@ -1968,7 +1960,7 @@ function addon:FillMissionPage(missionInfo) if type(missionInfo)=="number" then missionInfo=self:GetMissionData(missionInfo) end if not missionInfo then return end local missionType=missionInfo.followerTypeID - if missionType==LE_FOLLOWER_TYPE_SHIPYARD_6_2 or missionType==LE_FOLLOWER_TYPE_GARRISON_7_0 then + if missionType==LE_FOLLOWER_TYPE_SHIPYARD_6_2 then if not missionInfo.canStart then return end end local main=_G[mainframes[missionType]] @@ -1976,9 +1968,6 @@ function addon:FillMissionPage(missionInfo) local missionpage=main:GetMissionPage() local stage=main.MissionTab.MissionPage.Stage local missionenv=stage.MissionInfo.MissionEnv - if missionType==LE_FOLLOWER_TYPE_GARRISON_7_0 then - missionenv=stage.MissionInfo.MissionTime - end if not stage.MissionSeen then if not stage.expires then stage.expires=stage:CreateFontString() @@ -2732,20 +2721,16 @@ function addon:ScriptGarrisonMissionButton_OnEnter(this, button) GameTooltip:AddLine(GARRISON_MISSION_AVAILABILITY); GameTooltip:AddLine(this.info.offerTimeRemaining, 1, 1, 1); end - if not this.hall then - if (blacklist[this.info.missionID]) then - GameTooltip:AddDoubleLine(L["Blacklisted"],L["Right-Click to remove from blacklist"],1,0.125,0.125,C:Green()) - GameTooltip:AddLine(L["Blacklisted missions are ignored in Mission Control"]) - else - GameTooltip:AddDoubleLine(L["Not blacklisted"],L["Right-Click to blacklist"],0.125,1.0,0.125,C:Red()) - end + if (blacklist[this.info.missionID]) then + GameTooltip:AddDoubleLine(L["Blacklisted"],L["Right-Click to remove from blacklist"],1,0.125,0.125,C:Green()) + GameTooltip:AddLine(L["Blacklisted missions are ignored in Mission Control"]) + else + GameTooltip:AddDoubleLine(L["Not blacklisted"],L["Right-Click to blacklist"],0.125,1.0,0.125,C:Red()) end - addon:AddFollowersToTooltip(this.info.missionID,this.hall and LE_FOLLOWER_TYPE_GARRISON_7_0 or LE_FOLLOWER_TYPE_GARRISON_6_0) - if not this.hall then - if not C_Garrison.IsOnGarrisonMap() and not GMF:IsVisible() then - GameTooltip:AddLine(" "); - GameTooltip:AddLine(GARRISON_MISSION_TOOLTIP_RETURN_TO_START, nil, nil, nil, 1); - end + addon:AddFollowersToTooltip(this.info.missionID,LE_FOLLOWER_TYPE_GARRISON_6_0) + if not C_Garrison.IsOnGarrisonMap() and not GMF:IsVisible() then + GameTooltip:AddLine(" "); + GameTooltip:AddLine(GARRISON_MISSION_TOOLTIP_RETURN_TO_START, nil, nil, nil, 1); end end --@debug@ @@ -2809,8 +2794,6 @@ function addon:DrawSlimButton(source,frame,progressing,bigscreen) local numRewards=self:AddRewards(frame, mission.rewards, mission.numRewards); if mission.followerTypeID==LE_FOLLOWER_TYPE_GARRISON_6_0 then self:AddFollowersToButton(frame,mission,missionID,bigscreen,numRewards) - elseif mission.followerTypeID==LE_FOLLOWER_TYPE_GARRISON_7_0 then - self:AddFollowersToButton(frame,mission,missionID,false,numRewards) elseif mission.followerTypeID==LE_FOLLOWER_TYPE_SHIPYARD_6_2 then self:AddShipsToButton(frame,mission,missionID,bigscreen,numRewards) end diff --git a/GarrisonCommander.toc b/GarrisonCommander.toc index bcccc9f..6c3106f 100644 --- a/GarrisonCommander.toc +++ b/GarrisonCommander.toc @@ -47,7 +47,6 @@ FollowerRecruiting.lua BuildingPage.lua ShipYard.lua ShipControl.lua -OrderHall.lua quick.lua RelNotes.lua #@do-not-package@ diff --git a/Init.lua b/Init.lua index e3cae0f..20b4b70 100644 --- a/Init.lua +++ b/Init.lua @@ -378,128 +378,3 @@ function ns.Configure() end setfenv(2, ENV) end -function addon:EventADDON_LOADED(event,AddOn) - if AddOn~="Blizzard_OrderHallUI" then return end - self:UnregisterEvent("ADDON_LOADED") - ns.GHF=_G.OrderHallMissionFrame - ns.GHFMissions=ns.GHF.MissionTab.MissionList - ENV.GHF=ns.GHF - ENV.GHFMissions=ns.GHFMissions - self:GetModule("OrderHall"):OnInitialize() -end --- Order Hall data -local fake={} -local data={ - Upgrades={ - 136412, - 137207, - 137208, - - }, - Xp={ - 141028 - }, - Equipment={ - 'Success Chance Increase', - 139816, - 139801, - 139802, - 140572, - 140571, - 140573, - 140581, - 140582, - 140583, - 'Mission Time Reduction', - 139813, - 139814, - 139799, - 'Combat Ally Bonus', - 139792, - 139808, - 139809, - 139795, - 139811, - 139812, - 'Troop Affinity', - 139875, - 139876, - 139877, - 139878, - 139835, - 139836, - 139837, - 139838, - 139863, - 139864, - 139865, - 139866, - 139847, - 139848, - 139849, - 139850, - 139843, - 139844, - 139845, - 139846, - 139859, - 139860, - 139861, - 139862, - 139867, - 139868, - 139869, - 139870, - 139871, - 139872, - 139873, - 139874, - 139831, - 139832, - 139833, - 139834, - 139839, - 139840, - 139841, - 139842, - 139855, - 139856, - 139857, - 139858, - 139851, - 139852, - 139853, - 139854, - 'Legendary Equipment', - 139830, - 139828, - 139829, - 139827, - 139825, - 139826, - 139821, - 139804, - 139819, - 139824, - 139823, - 139822, - 'Consumables', - 140749, - 139419, - 140760, - 139428, - 139177, - 139420, - 138883, - 139376, - 138418, - 138412, - 139670 - }, -} -function addon:GetData(key) - key=key or "none" - return data[key] or fake -end - - diff --git a/MatchMaker.lua b/MatchMaker.lua index 001b5ef..81430fb 100644 --- a/MatchMaker.lua +++ b/MatchMaker.lua @@ -25,7 +25,6 @@ local GARRISON_CURRENCY=GARRISON_CURRENCY local GARRISON_SHIP_OIL_CURRENCY=GARRISON_SHIP_OIL_CURRENCY local LE_FOLLOWER_TYPE_GARRISON_6_0=_G.LE_FOLLOWER_TYPE_GARRISON_6_0 -- 1 local LE_FOLLOWER_TYPE_SHIPYARD_6_2=_G.LE_FOLLOWER_TYPE_SHIPYARD_6_2 -- 2 -local LE_FOLLOWER_TYPE_GARRISON_7_0=_G.LE_FOLLOWER_TYPE_GARRISON_7_0 -- 4 local dbg local useCap=false local currentCap=100 @@ -220,7 +219,6 @@ local function MatchMaker(self,mission,party,includeBusy,onlyBest) local filterOut=filters[class] or filters.other filters.skipMaxed=self:GetBoolean("IGP") local followerType=mission.followerTypeID - local hallMission=followerType==LE_FOLLOWER_TYPE_GARRISON_7_0 if followerType==LE_FOLLOWER_TYPE_SHIPYARD_6_2 then filters.skipMaxed=false end @@ -238,11 +236,7 @@ local function MatchMaker(self,mission,party,includeBusy,onlyBest) if self:IsFollowerAvailableForMission(followerID,filters.skipBusy) then if P:AddFollower(followerID) then local score,chance=self:FollowerScore(mission,followerID) - if hallMission and self:GetHeroData(followerID,'isTroop') then - tinsert(troops,format("%s@%s@%s",score,followerID,self:GetAnyData(missionTypeID,followerID,'fullname'))) - else - tinsert(scores,format("%s@%s@%s",score,followerID,self:GetAnyData(missionTypeID,followerID,'fullname'))) - end + tinsert(scores,format("%s@%s@%s",score,followerID,self:GetAnyData(missionTypeID,followerID,'fullname'))) P:RemoveFollower(followerID) end end @@ -288,26 +282,7 @@ local function MatchMaker(self,mission,party,includeBusy,onlyBest) --@end-debug@ end if mission.numFollowers > 1 then - if missionTypeID== LE_FOLLOWER_TYPE_GARRISON_7_0 then - local nf=#scores - local nt=#troops - local total=#GHFMissions.availableMissions - local maxtroops=0 - if total==1 then - AddMoreFollowers(self,mission,scores) - AddMoreFollowers(self,mission,troops) - else - local mm=math.floor((nt+nt)/3) - if mm==1 then - maxtroops=0 - else - maxtroops=1 - end - AddMoreFollowers(self,mission,troops,false,maxtroops) - end - else - AddMoreFollowers(self,mission,scores) - end + AddMoreFollowers(self,mission,scores) end end if P:FreeSlots() > 0 then diff --git a/MissionCache.lua b/MissionCache.lua index f28116b..9216dc3 100644 --- a/MissionCache.lua +++ b/MissionCache.lua @@ -14,7 +14,6 @@ local GARRISON_SHIP_OIL_CURRENCY=GARRISON_SHIP_OIL_CURRENCY local GARRISON_FOLLOWER_MAX_LEVEL=GARRISON_FOLLOWER_MAX_LEVEL local LE_FOLLOWER_TYPE_GARRISON_6_0=_G.LE_FOLLOWER_TYPE_GARRISON_6_0 local LE_FOLLOWER_TYPE_SHIPYARD_6_2=_G.LE_FOLLOWER_TYPE_SHIPYARD_6_2 -local LE_FOLLOWER_TYPE_GARRISON_7_0=_G.LE_FOLLOWER_TYPE_GARRISON_7_0 local GMF=GMF local GSF=GSF local GMFMissions=GMFMissions @@ -122,12 +121,6 @@ function module:GetMission(id,noretry) elseif type=="p" then mission=GMFMissions.inProgressMissions[ix] if mission and mission.missionID==id then return mission end - elseif type=="ha" then - mission=GHFMissions.availableMissions[ix] - if mission and mission.missionID==id then return mission end - elseif type=="hp" then - mission=GHFMissions.inProgressMissions[ix] - if mission and mission.missionID==id then return mission end elseif type=="s" then mission=GSFMissions.missions[ix] if mission and mission.missionID==id then return mission end @@ -138,10 +131,6 @@ function module:GetMission(id,noretry) scan(GMFMissions.availableMissions,'a') scan(GMFMissions.inProgressMissions,'p') scan(GSFMissions.missions,'s') - if GHFMissions and not ns.ignoreHall then - scan(GHFMissions.availableMissions,'ha') - scan(GHFMissions.inProgressMissions,'hp') - end return self:GetMission(id,true) end function module:AddExtraData(mission) @@ -258,7 +247,7 @@ print("Iterator called, list is",list) end,list,0 end function module:OnAllGarrisonMissions(func,inProgress,missionType) - local m=(missionType and missionType==LE_FOLLOWER_TYPE_GARRISON_7_0) and GHFMissions or GMFMissions + local m=GMFMissions local list=inProgress and m.inProgressMissions or m.availableMissions if type(list)=='table' then local tmp=new() @@ -473,11 +462,6 @@ classes[LE_FOLLOWER_TYPE_SHIPYARD_6_2]={ newMissionType('itemLevel',L['Item Tokens'],'INV_Bracer_Cloth_Reputation_C_01',false,false,nil,0), newMissionType('other',L['Other rewards'],'INV_Box_02',false,false,nil,0), } -classes[LE_FOLLOWER_TYPE_GARRISON_7_0]={ - newMissionType('xp',L['Follower experience'],'XPBonus_icon',false,false,nil,0), - newMissionType('gold',BONUS_ROLL_REWARD_MONEY,'inv_misc_coin_01',false,false,nil,0), - newMissionType('other',L['Other rewards'],'INV_Box_02',false,false,nil,0), -} function addon:GetRewardClasses(followerType) followerType=followerType or LE_FOLLOWER_TYPE_GARRISON_6_0 return classes[followerType] diff --git a/MissionCompletion.lua b/MissionCompletion.lua index fa03197..25f80fc 100644 --- a/MissionCompletion.lua +++ b/MissionCompletion.lua @@ -5,16 +5,13 @@ local shipyard local _G=_G local GMF=GMF local GSF=GSF -local GHF=GHF local GMFMissions=GarrisonMissionFrameMissions local GSFMissions=GarrisonMissionFrameMissions -local GHFMissions=GarrisonMissionFrameMissions local GARRISON_CURRENCY=GARRISON_CURRENCY local GARRISON_SHIP_OIL_CURRENCY=_G.GARRISON_SHIP_OIL_CURRENCY local SEAL_CURRENCY=994 local LE_FOLLOWER_TYPE_GARRISON_6_0=_G.LE_FOLLOWER_TYPE_GARRISON_6_0 -- 1 local LE_FOLLOWER_TYPE_SHIPYARD_6_2=_G.LE_FOLLOWER_TYPE_SHIPYARD_6_2 -- 2 -local LE_FOLLOWER_TYPE_GARRISON_7_0=_G.LE_FOLLOWER_TYPE_GARRISON_7_0 -- 4 local pairs=pairs local format=format local strsplit=strsplit @@ -93,7 +90,6 @@ function module:MissionsCleanup() -- Re-enable "view" button fmissions.CompleteDialog.BorderFrame.ViewButton:SetEnabled(true) module:OpenLastTab() - if panel==GHF then return end f:UpdateMissions() f:CheckCompleteMissions() end @@ -120,11 +116,6 @@ function module:CloseReport() print "Garr close mission" --@end-debug@ GMF:CloseMissionComplete() - elseif GHF and GHF:IsVisible() then - --@debug@ - print "Hall close mission" - --@end-debug@ - GHF:CloseMissionComplete() end addon:OpenMissionsTab() addon:RefreshParties() -- 1.7.9.5