Restores mission page when canceling
Alar of Daggerspine [10-30-15 - 14:37]
Restores mission page when canceling
Signed-off-by: Alar of Daggerspine <alar@aspide.it>
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