Quantcast

Tested also on 6.2

Alar of Daggerspine [06-18-15 - 11:28]
Tested also on 6.2

Signed-off-by: Alar of Daggerspine <alar@aspide.it>
Filename
MatchMaker.lua
MissionCache.lua
MissionControl.lua
diff --git a/MatchMaker.lua b/MatchMaker.lua
index c59c821..60d439c 100644
--- a/MatchMaker.lua
+++ b/MatchMaker.lua
@@ -63,7 +63,7 @@ function addon:xMissionScore(mission)
 			end
 		end
 		local t=isMissionTimeImproved and 1 or 0
-		return formatScore(successChance,r,x,t,mission.maxable and self:GetBoolean("MAXRES"),self:GetNUmber("MAXRESCHANCE"))
+		return formatScore(successChance,r,x,t,mission.maxable and self:GetBoolean("MAXRES"),self:GetNumber("MAXRESCHANCE"))
 	else
 		return formatScore(0,1,0,0,false,0)
 	end
diff --git a/MissionCache.lua b/MissionCache.lua
index b7effe6..627bcb3 100644
--- a/MissionCache.lua
+++ b/MissionCache.lua
@@ -73,7 +73,9 @@ function addon:GetMissionData(missionID,key,default)
 		self:Print("Could not find info for mission",missionID,G.GetMissionName(missionID))
 	end
 --@end-debug@
-
+	if (mission.class=="retry" or not mission.globalXp) then
+		AddExtraData(mission)
+	end
 	if (key==nil) then
 		return mission
 	end
@@ -97,7 +99,7 @@ function addon:GetMissionData(missionID,key,default)
 		mission.basePerc=select(4,G.GetPartyMissionInfo(missionID))
 		return mission.basePerc
 	else
-		AddExtraData(mission)
+		--AddExtraData(mission)
 		return mission[key] or default
 	end
 end
@@ -129,6 +131,10 @@ function AddExtraData(mission)
 				mission.itemLevel=655
 			elseif v.itemID~=120205 then -- xp item
 				local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount,itemEquipLoc, itemTexture, itemSellPrice = GetItemInfo(v.itemID)
+				if (not itemName) then
+					mission.class="retry"
+					return
+				end
 				if itemTexture:lower()==rushOrders then
 					mission.rush=1
 				elseif itemName and (not v.quantity or v.quantity==1) and not v.followerXP then
diff --git a/MissionControl.lua b/MissionControl.lua
index 5fd8db8..9acc4bc 100644
--- a/MissionControl.lua
+++ b/MissionControl.lua
@@ -248,7 +248,7 @@ local tItems = {
 	{t = 'Enable/Disable other rewards.', i = "Interface\\ICONS\\INV_Box_02", key = 'generic'}
 }
 if (ns.toc >=60200) then
-	tinsert(tItems,{t = 'Enable/Disable oil awards.', i= 'Interface\\Icons\\garrison_oil', key = 'oil'},3)
+	tinsert(tItems,3,{t = 'Enable/Disable oil awards.', i= 'Interface\\Icons\\garrison_oil', key = 'oil'})
 end
 local tOrder={1,2,3,4,5,6,7}
 local chestTexture