From 34e125875f2e6e6d6327acd3ffdaa84f5e5de926 Mon Sep 17 00:00:00 2001 From: Alar of Daggerspine Date: Fri, 30 Oct 2015 15:37:56 +0100 Subject: [PATCH] Restores mission page when canceling Signed-off-by: Alar of Daggerspine --- MissionCompletion.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/MissionCompletion.lua b/MissionCompletion.lua index 319cad8..060272d 100644 --- a/MissionCompletion.lua +++ b/MissionCompletion.lua @@ -111,7 +111,7 @@ function module:MissionComplete(this,button,skiprescheck) missions=G.GetCompleteMissions(followerType) shipyard=addon:GetModule("ShipYard") local missionsFrame=followerType==LE_FOLLOWER_TYPE_GARRISON_6_0 and GMFMissions or GSFMissions - + local panel=followerType==LE_FOLLOWER_TYPE_GARRISON_6_0 and GMF or GSF if (missions and #missions > 0) then this:SetEnabled(false) missionsFrame.CompleteDialog.BorderFrame.ViewButton:SetEnabled(false) -- Disabling standard Blizzard Completion @@ -145,7 +145,7 @@ function module:MissionComplete(this,button,skiprescheck) print(name,current,qt,cap) --@end-debug@ current=current+qt - if current+qt > cap then + if current+qt > (cap*0.8) then message=message.."\n"..format(L["Capped %1$s. Spend at least %2$d of them"],name,current-cap) stop =true end @@ -157,8 +157,9 @@ function module:MissionComplete(this,button,skiprescheck) end, function() this:SetEnabled(true) - missionsFrame:GetParent():Hide() missionsFrame.CompleteDialog.BorderFrame.ViewButton:SetEnabled(true) + panel:Hide() + end ) return -- 1.7.9.5