Quantcast

Fixed: Was lagging when zoning inside Garrison

Alar of Daggerspine [12-01-14 - 14:19]
Fixed: Was lagging when zoning inside Garrison
Fixed: Sometimes clicking on a mission button opened the wrong mission
page

Signed-off-by: Alar of Daggerspine <alar@aspide.it>
Filename
GarrisonCommander.lua
GarrisonCommander.toc
RelNotes.lua
diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua
index be13fbb..1d4b4f5 100644
--- a/GarrisonCommander.lua
+++ b/GarrisonCommander.lua
@@ -148,6 +148,7 @@ function addon:TooltipAdder(missionID,skipTT)
 	if (not skipTT) then GameTooltip:AddLine("ID:" .. tostring(missionID)) end
 --@end-debug@
 	local perc=select(4,C_Garrison.GetPartyMissionInfo(missionID))
+	self:GetRunningMissionData()
 	local q=self:GetDifficultyColor(perc)
 	if (not skipTT) then GameTooltip:AddDoubleLine(GARRISON_MISSION_SUCCESS,format(GARRISON_MISSION_PERCENT_CHANCE,perc),nil,nil,nil,q.r,q.g,q.b) end
 	local buffed=new()
@@ -457,7 +458,6 @@ function addon:AddPerc(b,...)
 				b.Success:SetFontObject("GameFontNormalLarge2")
 			end
 			b.Success:SetPoint("BOTTOMLEFT",b.Title,"TOPLEFT",0,3)
-			b.Perc=-1
 		end
 		if (not b.NotEnough) then
 			b.NotEnough=b:CreateFontString()
@@ -471,8 +471,10 @@ function addon:AddPerc(b,...)
 			b.NotEnough:SetText("(".. GARRISON_PARTY_NOT_FULL_TOOLTIP .. ")")
 			b.NotEnough:SetTextColor(C:Red())
 		end
-
-		if (b.Perc==Perc) then return end
+		if (Perc <0 and not b:IsMouseOver()) then
+			self:TooltipAdder(missionID,true)
+			Perc=successes[missionID] or -2
+		end
 		if (Perc>=0) then
 			if (masterplan) then
 				b.Success:SetFormattedText(GARRISON_MISSION_PERCENT_CHANCE,successes[missionID])
@@ -547,16 +549,17 @@ function addon:Init()
 		masterplan=true
 		self:SecureHook("GarrisonMissionList_Update","RestoreTooltip")
 	end
-	self:HookScript(GMFMissions,"OnShow","SetUp")
+	--self:HookScript(GMFMissions,"OnShow","SetUp")
 	self:HookScript(GMF,"OnHide","CleanUp")
-	self:HookScript(GMF.MissionTab.MissionPage.CloseButton,"OnClick","SetUp")
+	--self:HookScript(GMF.MissionTab.MissionPage.CloseButton,"OnClick","SetUp")
 	self:HookScript(GMF.MissionComplete,"OnHide","SetUp")
+	--self:HookScript(GMFFollowers,"OnHide","SetUp")
 	self:ApplyMOVEPANEL(self:GetBoolean("MOVEPANEL"))
 	self:RegisterEvent("GARRISON_MISSION_BONUS_ROLL_LOOT","SetDirty")
 	self:RegisterEvent("GARRISON_MISSION_FINISHED","SetDirty")
 	self:RegisterEvent("GARRISON_MISSION_COMPLETE_RESPONSE","SetDirty")
 	self:RegisterEvent("GARRISON_MISSION_BONUS_ROLL_COMPLETE","SetDirty")
-	self:RegisterEvent("GARRISON_MISSION_LIST_UPDATE","SetUp")
+	self:RegisterEvent("GARRISON_MISSION_LIST_UPDATE","SetDirty")
 	self:RegisterEvent("GARRISON_MISSION_STARTED","SetDirty")
 end

diff --git a/GarrisonCommander.toc b/GarrisonCommander.toc
index 9534881..ded0447 100644
--- a/GarrisonCommander.toc
+++ b/GarrisonCommander.toc
@@ -4,7 +4,7 @@
 ## Notes-itIT: Ti aiuta a scegliere il giusto seguace per la giusta missione
 ## Author: Alar of Daggerspine
 ## Version: @project-version@ @project-abbreviated-hash@
-## X-Version: 1.1.3
+## X-Version: 1.1.4
 ## X-Revision: @project-abbreviated-hash@
 ## eMail: alar@aspide.it
 ## URL: http://wow.aspide.it
diff --git a/RelNotes.lua b/RelNotes.lua
index 4442846..de198e3 100644
--- a/RelNotes.lua
+++ b/RelNotes.lua
@@ -17,6 +17,10 @@ self:Wiki([[
 * for In mission follower reports remaining time
 * final success chance (optionally considering only available followers)
 ]])
+self:RelNotes(1,1,4,[[
+Fixed: Was lagging when zoning inside Garrison
+Fixed: Sometimes clicking on a mission button opened the wrong mission page
+]])
 self:RelNotes(1,1,3,[[
 Fixed: When used for a long session of mission management, GarrisonCommander could starve with memory. Now it never go over 1M
 Feature: Preview of 1.2.0: Chance of success is now permanently displayed on every mission. In this version it get updated ONLY when you hover on it