Fix chat spam while hovering on mission buttons
Giovanni Gargani [06-27-16 - 20:52]
Fix chat spam while hovering on mission buttons
diff --git a/GarrisonCommander.lua b/GarrisonCommander.lua
index edeb09b..bc93bbb 100644
--- a/GarrisonCommander.lua
+++ b/GarrisonCommander.lua
@@ -3182,6 +3182,23 @@ function addon:HookedGMFMissionsListScroll_update(frame)
self:HookedGarrisonMissionList_Update(frame,false)
end
end
+function addon:GarrisonMissionPageFollowerFrame_OnEnter(this)
+ local f=this:GetParent()
+ if f then
+--@debug@
+ print(f:GetName(),f.missionInfo)
+--@end-debug@
+ if not f.missionInfo then
+ f.missionInfo={missionID=0}
+ end
+ end
+ local rc,message=pcall(GarrisonMissionPageFollowerFrame_OnEnter,this)
+--@debug@
+ if not rc then
+ print("Error:",message)
+ end
+--@end-debug@
+end
do local lasttime=0
function addon:HookedGarrisonMissionList_Update(t,...)
collectgarbage('step',200)
@@ -3230,4 +3247,5 @@ if toc <70000 then
end
addon:SafeSecureHook(GMF,"SelectTab","GarrisonMissionFrame_SelectTab")
addon:SafeRawHookScript(GMF.MissionTab.MissionPage.CloseButton,"OnClick","GarrisonMissionPageOnClose")
+_G.GarrisonCommander=addon
_G.GAC=addon
\ No newline at end of file
diff --git a/GarrisonCommander.xml b/GarrisonCommander.xml
index 17632a8..1643a78 100644
--- a/GarrisonCommander.xml
+++ b/GarrisonCommander.xml
@@ -118,22 +118,8 @@
<OnDragStart/>
<OnDragStop />
<OnReceiveDrag/>
- <!--OnEnter function="GarrisonMissionPageFollowerFrame_OnEnter"/-->
<OnEnter>
- local f=self:GetParent()
- if f then
- for i,v in pairs(f) do
- print(i,type(v),v)
- end
- print(f:GetName(),f.missionInfo)
- if not f.missionInfo then
- f.missionInfo={missionID=131}
- end
- end
- local rc,message=pcall(GarrisonMissionPageFollowerFrame_OnEnter,self)
- if not rc then
- print("Error:",message)
- end
+ GarrisonCommander:GarrisonMissionPageFollowerFrame_OnEnter(self)
</OnEnter>
<OnLeave function="GarrisonMissionPageFollowerFrame_OnLeave"/>
<OnMouseUp />