Quantcast

Fix: backported fixes for OrderHallCommander

Alar of Runetotem [01-24-17 - 09:42]
Fix: backported fixes for OrderHallCommander
Filename
.project
OrderHallCommander/OrderHallCommander.toc
OrderHallCommander/autocomplete.lua
OrderHallCommander/missionlist.lua
diff --git a/.project b/.project
index c89c49c..a928868 100644
--- a/.project
+++ b/.project
@@ -19,4 +19,15 @@
 	<natures>
 		<nature>org.eclipse.koneki.ldt.nature</nature>
 	</natures>
+	<filteredResources>
+		<filter>
+			<id>1485246518169</id>
+			<name></name>
+			<type>26</type>
+			<matcher>
+				<id>org.eclipse.ui.ide.multiFilter</id>
+				<arguments>1.0-name-matches-false-false-OrderHallCommander</arguments>
+			</matcher>
+		</filter>
+	</filteredResources>
 </projectDescription>
diff --git a/OrderHallCommander/OrderHallCommander.toc b/OrderHallCommander/OrderHallCommander.toc
index 289abdf..c2b9edf 100644
--- a/OrderHallCommander/OrderHallCommander.toc
+++ b/OrderHallCommander/OrderHallCommander.toc
@@ -30,6 +30,7 @@
 ## X-eMail: alar@aspide.it
 ## X-Date: 2017-01-21T5:43:38Z
 ## X-Embeds: LibInit
+## X-GotWith: GarrisonCommander
 embeds.xml
 localization.lua
 OrderHallCommander.xml
diff --git a/OrderHallCommander/autocomplete.lua b/OrderHallCommander/autocomplete.lua
index 2b778f5..7060953 100644
--- a/OrderHallCommander/autocomplete.lua
+++ b/OrderHallCommander/autocomplete.lua
@@ -164,7 +164,7 @@ function module:Events(on)
 	end
 end
 function module:CloseReport()
-	addon:ResetParties()
+	addon:ScheduleTimer("HardRefreshMissions",0.1)
 	if report then pcall(report.Close,report) report=nil end
 	print(pcall(OHF.CloseMissionComplete(OHF)))
 end
@@ -491,7 +491,7 @@ function module:MissionsPrintResults(success)
 		followers=true
 		if v~=0 then
 			if v>0 then
-				local b=addon:GetFollowerData(k,'qLevel',0)
+				local b=addon:GetFollowerData(k,'qLevel',0) or 0
 				local c=rewards.followerQLevel[k] or 0
 				report:AddFollower(k,v, b>c,rewards.followerPortrait[k],	rewards.followerName[k])
 			else
diff --git a/OrderHallCommander/missionlist.lua b/OrderHallCommander/missionlist.lua
index 4819868..f332eb8 100644
--- a/OrderHallCommander/missionlist.lua
+++ b/OrderHallCommander/missionlist.lua
@@ -199,6 +199,9 @@ function addon:ApplySORTMISSION(value)
 	module:SortMissions()
 end
 function addon:HardRefreshMissions()
+--@debug@
+	print("Called hard refresh")
+--@end-debug@
 	self:RebuildAllCaches()
 	collectgarbage()
 	self:RefreshMissions()
@@ -262,6 +265,7 @@ end

 function module:InitialSetup(this)
 	if type(addon.db.global.warn01_seen)~="number" then	addon.db.global.warn01_seen =0 end
+	if type(addon.db.global.warn02_seen)~="number" then	addon.db.global.warn02_seen =0 end
 	if GetAddOnEnableState(UnitName("player"),"GarrisonCommander") > 0 then
 		if addon.db.global.warn02_seen  < 3 then
 			addon.db.global.warn02_seen=addon.db.global.warn02_seen+1
@@ -603,12 +607,14 @@ function module:AdjustMissionTooltip(this,...)

 end
 function module:PostMissionClick(this,button)
-	addon:Print(button)
 	local mission=this.info or this.missionInfo -- callable also from mission page
+--@debug@
+	addon:Print(button)
 	if button=="MiddleButton" then
 		addon:TestParty(mission.missionID)
 		return
 	end
+--@end-debug@
 	addon:GetMissionpageModule():FillMissionPage(mission,parties[mission.missionID])
 end
 do