Quantcast

Fix: Was not using specific cap when called from Mission Control

Alar of Daggerspine [05-09-16 - 08:57]
Fix: Was not using specific cap when called from Mission Control
Filename
MatchMaker.lua
diff --git a/MatchMaker.lua b/MatchMaker.lua
index 4fb66b9..008352a 100644
--- a/MatchMaker.lua
+++ b/MatchMaker.lua
@@ -281,13 +281,10 @@ function addon:MCMatchMaker(missionID,party,skipEpic,cap)
 	local mission=type(missionID)=="table" and missionID or self:GetMissionData(missionID)
 	missionID=mission.missionID
 	if (not party) then party=addon:GetParty(missionID) end
-	useCap=true
-	currentCap=cap
-
 --@debug@
-print("Using cap data:",useCap,currentCap)
+print("Using cap data:",cap)
 --@end-debug@
-	MatchMaker(self,mission,party,false)
+	MatchMaker(self,mission,party,false,true,cap)
 	if (skipEpic) then
 		if (self:GetMissionData(missionID,'class')=='xp') then
 			for i=1,#party.members do
@@ -301,12 +298,12 @@ print("Using cap data:",useCap,currentCap)
 	end
 	return party.perc
 end
-function addon:MatchMaker(missionID,party,includeBusy)
+function addon:MatchMaker(missionID,party,includeBusy,useCap,currentCap)
 	local mission=type(missionID)=="table" and missionID or self:GetMissionData(missionID)
 	missionID=mission.missionID
 	if (not party) then party=addon:GetParty(missionID) end
-	useCap=self:GetBoolean("MAXRES")
-	currentCap= self:GetNumber("MAXRESCHANCE")
+	useCap=useCap or self:GetBoolean("MAXRES")
+	currentCap=currentCap or self:GetNumber("MAXRESCHANCE")
 	MatchMaker(self,mission,party,includeBusy)
 	return party.perc
 end