TestMission debug method was failing for missing mission
Alar of Daggerspine [11-23-15 - 20:43]
TestMission debug method was failing for missing mission
Signed-off-by: Alar of Daggerspine <alar@aspide.it>
diff --git a/MatchMaker.lua b/MatchMaker.lua
index 3879939..4fb66b9 100644
--- a/MatchMaker.lua
+++ b/MatchMaker.lua
@@ -42,6 +42,9 @@ end
function addon:MissionScore(mission)
if (mission) then
local totalTimeString, totalTimeSeconds, isMissionTimeImproved, successChance, partyBuffs, isEnvMechanicCountered, xpBonus, materialMultiplier,goldMultiplier = G.GetPartyMissionInfo(mission.missionID)
+ if not totalTimeString then
+ return formatScore(0,1,0,0,false,0)
+ end
local x = tonumber(mission.xp)
if x and x >0 then
x= xpBonus/mission.xp*100