View Single Post
06-05-10, 11:06 AM   #3
Grimsin
A Molten Giant
 
Grimsin's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2006
Posts: 990
Here is a final version, you would of course have to setup the variables part but otherwise cut and paste. Full functioning, what it does is it turns off all the quest tracking and objectives on the WorldMap when you enter combat then turns it all back on according to what you had selected before going into combat. It will also close the Map apon entering combat, this was done so that if you had the map in fullsize mode it would close and resize it to small mode so that you could then reopen while in combat if need be.

This will fix taint issues in DHUD, PocketPlot and others and of course can be found in the GrimUI to fix my own worldmap button problem

In theory should fix any taint issues with any addons call to the worldmap. Should alleviate tainting on addons calling worldmap frame for position functions. In theory...


lua Code:
  1. --##############################################################################
  2. --##    WorldMapBlobFrame and Combat taint on WorldMap toggles fix    START   ##
  3. --##############################################################################
  4.  
  5. local GUIWorldMapEvents = CreateFrame("Frame", nil, UIParent)
  6. GUIWorldMapEvents:RegisterEvent("PLAYER_ENTERING_WORLD")
  7. GUIWorldMapEvents:RegisterEvent("PLAYER_REGEN_ENABLED")
  8. GUIWorldMapEvents:RegisterEvent("PLAYER_REGEN_DISABLED")
  9.  
  10. GUIWorldMapEvents:SetScript("OnEvent", function(self)
  11.     local CurrentTrackState = WorldMapQuestShowObjectives:GetChecked()
  12.    
  13.     if event == "PLAYER_ENTERING_WORLD" then
  14.         ShowUIPanel(WorldMapFrame)
  15.         HideUIPanel(WorldMapFrame)
  16.    
  17.     elseif event == "PLAYER_REGEN_DISABLED" then
  18.        
  19.          
  20.         if CurrentTrackState == 1 then
  21.         GrimUIData.WorldMapQuestTrack = true
  22.         elseif CurrentTrackState == nil then
  23.         GrimUIData.WorldMapQuestTrack = false
  24.         end
  25.        
  26.         HideUIPanel(WorldMapFrame)
  27.         WorldMap_ToggleSizeDown()
  28.         WatchFrame.showObjectives = nil;
  29.         WorldMapQuestShowObjectives:SetChecked(false)
  30.         WorldMapQuestShowObjectives:Hide()
  31.         WorldMapTrackQuest:Hide()
  32.         WorldMapTitleButton:Hide()
  33.         WorldMapFrameSizeUpButton:Hide()
  34.         WorldMapBlobFrame:Hide()
  35.         WorldMapPOIFrame:Hide()
  36.        
  37.         WorldMapFrameSizeUpButton.Show = GrimUI.Dummy
  38.         WorldMapQuestShowObjectives.Show = GrimUI.Dummy
  39.         WorldMapTrackQuest.Show = GrimUI.Dummy
  40.         WorldMapTitleButton.Show = GrimUI.Dummy
  41.         WorldMapBlobFrame.Show = GrimUI.Dummy
  42.         WorldMapPOIFrame.Show = GrimUI.Dummy
  43.        
  44.        
  45.         WatchFrame_Update();
  46.    
  47.     elseif event == "PLAYER_REGEN_ENABLED" then
  48.        
  49.         WorldMapFrameSizeUpButton.Show = WorldMapFrameSizeUpButton:Show()
  50.         WorldMapQuestShowObjectives.Show = WorldMapQuestShowObjectives:Show()
  51.         WorldMapTrackQuest.Show = WorldMapTrackQuest:Show()
  52.         WorldMapTitleButton.Show = WorldMapTitleButton:Show()
  53.         WorldMapBlobFrame.Show = WorldMapBlobFrame:Show()
  54.         WorldMapPOIFrame.Show = WorldMapPOIFrame:Show()
  55.        
  56.  
  57.         WorldMapQuestShowObjectives:Show()
  58.         WorldMapTitleButton:Show()
  59.         WorldMapFrameSizeUpButton:Show()
  60.        
  61.        
  62.         if GrimUIData.WorldMapQuestTrack == true then
  63.            
  64.             WatchFrame.showObjectives = true
  65.             WorldMapQuestShowObjectives:SetChecked(true)
  66.            
  67.             WorldMapTrackQuest:Show()
  68.             WorldMapBlobFrame:Show()
  69.             WorldMapPOIFrame:Show()
  70.            
  71.             WatchFrame_Update();
  72.         end
  73.        
  74.         if GrimUIData.WorldMapQuestTrack == false then
  75.            
  76.             WatchFrame.showObjectives = nil
  77.             WorldMapQuestShowObjectives:SetChecked(false)
  78.         end
  79.        
  80.        
  81.        
  82.        
  83.  
  84.     end
  85. end)
  86.  
  87. --############################################################################
  88. --##    WorldMapBlobFrame and Combat taint on WorldMap toggles fix    END   ##
  89. --############################################################################
__________________
"Are we there yet?"

GrimUI
[SIGPIC][/SIGPIC]
  Reply With Quote