Quantcast

Fixe error when showing architect table

Giovanni Gargani [07-20-16 - 14:26]
Fixe error when showing architect table
Filename
BuildingPage.lua
GarrisonCommander.lua
diff --git a/BuildingPage.lua b/BuildingPage.lua
index 216ed14..d7653ae 100644
--- a/BuildingPage.lua
+++ b/BuildingPage.lua
@@ -10,6 +10,7 @@ Plot=framde del piedistallino
 Icon e IconRing contenuto e nordo dell'iconcina
 --]]
 local me,ns=...
+local pp=print
 ns.Configure()
 local addon=addon
 local GBF=GarrisonBuildingFrame
@@ -53,7 +54,8 @@ function module:AddFollowerToPlot(plot)
 		return frame:Hide()
 	end
 	if plot.followerTooltip then
-		local followerName, level, quality, displayID, followerID, garrFollowerID, status, portraitIconID = G.GetFollowerInfoForBuilding(plot.plotID)
+		pp(plot.plotID)
+		local followerName, level, quality, followerID, garrFollowerID, status, portraitIconID = G.GetFollowerInfoForBuilding(plot.plotID)
 		if followerName then
 			if (level == GARRISON_FOLLOWER_MAX_LEVEL) then
 				level=G.GetFollowerItemLevelAverage(followerID)
@@ -68,7 +70,10 @@ function module:AddFollowerToPlot(plot)
 			info.level=level
 			info.portraitIconID=portraitIconID
 			info.displayID=portraitIconID
-			GarrisonMissionFrame_SetFollowerPortrait(frame.PortraitFrame, info, false);
+			info.followerTypeID=_G.LE_FOLLOWER_TYPE_GARRISON_6_0
+			GMF:SetFollowerPortrait(frame.PortraitFrame, info, false)
+
+
 			frame.PortraitFrame.Empty:Hide()
 			del(info)
 		else
diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua
index 2c88571..53b4597 100644
--- a/GarrisonCommander.lua
+++ b/GarrisonCommander.lua
@@ -2130,16 +2130,7 @@ print("Unable to find follower",followerID)
 		frame.PortraitFrame.LevelBorder:SetWidth(58);
 		showItemLevel = false;
 	end
---[===[@non-debug@
-	local rc,message= pcall(GarrisonMissionFrame_SetFollowerPortrait,frame.PortraitFrame, info, false);
---@end-non-debug@]===]
---@debug@
-	if toc<70000 then
-		GarrisonMissionFrame_SetFollowerPortrait(frame.PortraitFrame, info, false)
-	else
-		GMF:SetFollowerPortrait(frame.PortraitFrame, info, false)
-	end
---@end-debug@
+	GMF:SetFollowerPortrait(frame.PortraitFrame, info, false)
 	-- Counters icon
 	if (frame.Name and frame.Threats) then
 		if (missionID and not GMFMissions.showInProgress) then