/
else |
GameTooltip:SetScript("OnShow", function(self) METAMAP_TT_NAME = GameTooltipTextLeft1:GetText(); end); |
end |
-- executed to late: |
-- hooksecurefunc(GameTooltip,"Show", function(self) METAMAP_TT_NAME = GameTooltipTextLeft1:GetText(); end); |
--# hooksecurefunc(GameTooltip,"Show", function(self) METAMAP_TT_NAME = GameTooltipTextLeft1:GetText(); end); |
--WorldMapFrame:HookScript("OnUpdate", function () MetaMapWorldMapFrame_OnUpdate() end); |
hooksecurefunc(WorldMapFrame, "Show", MetaMapTopFrame_OnShow); |
hooksecurefunc("WorldMapZoomOutButton_OnClick", MetaMap_WorldMapZoomOutButton_OnClick); |
QuestMapFrame:HookScript("OnMouseUp", MetaMap_QuestMapFrame_OnMouseUp); |
-- hooksecurefunc("QuestMapFrame_CloseQuestDetails", MetaMap_QuestMapFrame_CloseQuestDetails); |
--# hooksecurefunc("QuestMapFrame_CloseQuestDetails", MetaMap_QuestMapFrame_CloseQuestDetails); |
QuestMapFrame.DetailsFrame.BackButton:HookScript("OnClick", MetaMap_QuestMapFrameDetailsFrameBackButton_OnClick); |
WorldMapScrollFrame:HookScript("OnMouseWheel", MetaMap_WorldMapScrollFrame_OnMouseWheel); |
hooksecurefunc("WorldMapScrollFrame_OnPan", MetaMap_WorldMapScrollFrame_OnPan); |
end |
local WORLD_MAP_UPDATE_event_look = false; |
-- skip the required delay for map changes in case of a zone change |
local MetaMap_ZONE_CHANGE = false; |
function MetaMap_OnEvent(self, event, ...) |
local arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11 = ...; |
if (event == "ADDON_LOADED" and arg1 == "MetaMap") then |
if (not MetaMap_VarsLoaded) then return; end |
MetaMap_Debug_Print("WORLD_MAP_UPDATE", true); |
WORLD_MAP_UPDATE_event_restart = false; |
-- in case look is active, save map data for later execution |
if ( WorldMapFrame:IsVisible() and not MetaMapOptions.MapChange and WORLD_MAP_UPDATE_event_look ) then |
if ( WorldMapFrame:IsVisible() and not MetaMapOptions.MapChange and (WORLD_MAP_UPDATE_event_look or WORLD_MAP_UPDATE_event_restart) ) then |
MetaMap_SavedLook = MetaMap_SaveCurrentMapData(); |
end |
-- look the routine, that only one instance is running at time |
if ( WORLD_MAP_UPDATE_event_look ) then return; end |
if ( WORLD_MAP_UPDATE_event_look or WORLD_MAP_UPDATE_event_restart ) then return; end |
WORLD_MAP_UPDATE_event_look = true; |
if ( WorldMapFrame:IsVisible() ) then |
end |
end |
if ( next(MetaMap_SavedMap) ) then |
MetaMap_SavedMapTime = MetaMap_time + 2.0; |
if ( not MetaMap_ZONE_CHANGE ) then MetaMap_SavedMapTime = MetaMap_time + 2.0; end |
if ( MetaMap_SavedQuestID ~= -1 ) then |
QuestMapFrame_ShowQuestDetails(MetaMap_SavedQuestID); |
end |
MetaMap_Debug_Print("ZONE_CHANGED", true); |
if (not MetaMap_VarsLoaded) then return; end |
MetaMap_ZONE_CHANGE = true; |
MetaMap_SetMapToCurrentZone(self, true); |
MetaMap_ZONE_CHANGE = false; |
MetaMap_MiniNote_OnUpdate(0); |
if (MetaMapOptions.UsePOI) then |
-- trigger the event WORLD_MAP_UPDATE if requested |
if ( WORLD_MAP_UPDATE_event_restart ) then |
if ( (MetaMap_SavedMapTime == 0) or (MetaMap_SavedMapTime - 1.0 < MetaMap_time) ) then |
WORLD_MAP_UPDATE_event_restart = false; |
MetaMap_OnEvent(self, "WORLD_MAP_UPDATE"); |
return; |
end |
## Interface: 70100 |
## Version: 7.1.0.1 |
## Version: 7.1.0.2 |
## Title: MetaMap |
## Author: MetaHawk |
## Author for Fan Update 3.0: Charroux |