Gold/xp mixed missions were taken as xp only
Alar of Daggerspine [11-23-15 - 20:44]
Gold/xp mixed missions were taken as xp only
Signed-off-by: Alar of Daggerspine <alar@aspide.it>
diff --git a/MissionCache.lua b/MissionCache.lua
index b7076ff..25329a4 100644
--- a/MissionCache.lua
+++ b/MissionCache.lua
@@ -79,9 +79,11 @@ function module:AddExtraData(mission)
local value=c.func(c,k,v)
if value then
mission[c.key]=mission[c.key]+value
- mission.class=c.key
- mission.maxable=c.maxable
- mission.mat=c.mat
+ if not mission.class or mission.class=="xp" then
+ mission.class=c.key
+ mission.maxable=c.maxable
+ mission.mat=c.mat
+ end
break
end
end
@@ -391,11 +393,8 @@ classes={
function addon:GetRewardClasses()
return classes
end
-function addon:TestMission(id)
- local rewards=G.GetMissionRewardInfo(id)
- for id,reward in pairs(rewards) do
- for _,v in pairs(classes) do
- print(v.key,v.func(v,id,reward))
- end
- end
+function addon:TestMissionExtra(id)
+ local data={missionID=id}
+ module:AddExtraData(data)
+ return data
end