Blizzard_WorldMap/Blizzard_WorldMap.lua

Blizzard_WorldMap/Blizzard_WorldMap.lua (9.0.2.36710; unchanged since 9.0.2.36665)
  1. WorldMapMixin = {};
  2. local TITLE_CANVAS_SPACER_FRAME_HEIGHT = 67;
  3. function WorldMapMixin:SetupTitle()
  4. self.BorderFrame:SetTitle(MAP_AND_QUEST_LOG);
  5. self.BorderFrame.Bg:SetParent(self);
  6. self.BorderFrame.TopTileStreaks:Hide();
  7. self.BorderFrame:SetPortraitToAsset([[Interface\QuestFrame\UI-QuestLog-BookIcon]]);
  8. end
  9. function WorldMapMixin:SynchronizeDisplayState()
  10. if self:IsMaximized() then
  11. self.BorderFrame.TitleText:SetText(WORLD_MAP);
  12. GameTooltip:Hide();
  13. self.BlackoutFrame:Show();
  14. MaximizeUIPanel(self);
  15. else
  16. self.BorderFrame.TitleText:SetText(MAP_AND_QUEST_LOG);
  17. self.BlackoutFrame:Hide();
  18. RestoreUIPanelArea(self);
  19. end
  20. end
  21. function WorldMapMixin:Minimize()
  22. self.isMaximized = false;
  23. self:SetSize(self.minimizedWidth, self.minimizedHeight);
  24. SetUIPanelAttribute(self, "bottomClampOverride", nil);
  25. UpdateUIPanelPositions(self);
  26. self.BorderFrame:SetBorder("PortraitFrameTemplateMinimizable");
  27. self.BorderFrame:SetPortraitShown(true);
  28. self.BorderFrame.Tutorial:Show();
  29. self.NavBar:SetPoint("TOPLEFT", self.TitleCanvasSpacerFrame, "TOPLEFT", 64, -25);
  30. self:SynchronizeDisplayState();
  31. self:OnFrameSizeChanged();
  32. end
  33. function WorldMapMixin:Maximize()
  34. self.isMaximized = true;
  35. self.BorderFrame:SetBorder("ButtonFrameTemplateNoPortraitMinimizable");
  36. self.BorderFrame:SetPortraitShown(false);
  37. self.BorderFrame.Tutorial:Hide();
  38. self.NavBar:SetPoint("TOPLEFT", self.TitleCanvasSpacerFrame, "TOPLEFT", 8, -25);
  39. self:UpdateMaximizedSize();
  40. self:SynchronizeDisplayState();
  41. self:OnFrameSizeChanged();
  42. end
  43. function WorldMapMixin:SetupMinimizeMaximizeButton()
  44. self.minimizedWidth = 702;
  45. self.minimizedHeight = 534;
  46. self.questLogWidth = 290;
  47. local function OnMaximize()
  48. self:HandleUserActionMaximizeSelf();
  49. end
  50. self.BorderFrame.MaximizeMinimizeFrame:SetOnMaximizedCallback(OnMaximize);
  51. local function OnMinimize()
  52. self:HandleUserActionMinimizeSelf();
  53. end
  54. self.BorderFrame.MaximizeMinimizeFrame:SetOnMinimizedCallback(OnMinimize);
  55. end
  56. function WorldMapMixin:IsMaximized()
  57. return self.isMaximized;
  58. end
  59. function WorldMapMixin:OnLoad()
  60. UIPanelWindows[self:GetName()] = { area = "left", pushable = 0, xoffset = 0, yoffset = 0, whileDead = 1, minYOffset = 0, maximizePoint = "TOP" };
  61. MapCanvasMixin.OnLoad(self);
  62. self:SetupTitle();
  63. self:SetupMinimizeMaximizeButton();
  64. self:SetShouldZoomInOnClick(false);
  65. self:SetShouldPanOnClick(false);
  66. self:SetShouldNavigateOnClick(true);
  67. self:SetShouldZoomInstantly(true);
  68. self:AddStandardDataProviders();
  69. self:AddOverlayFrames();
  70. self:RegisterEvent("VARIABLES_LOADED");
  71. self:RegisterEvent("DISPLAY_SIZE_CHANGED");
  72. self:RegisterEvent("UI_SCALE_CHANGED");
  73. self:RegisterEvent("WORLD_MAP_OPEN");
  74. self:RegisterEvent("WORLD_MAP_CLOSE");
  75. self:AttachQuestLog();
  76. self:UpdateSpacerFrameAnchoring();
  77. end
  78. function WorldMapMixin:OnEvent(event, ...)
  79. MapCanvasMixin.OnEvent(self, event, ...);
  80. if event == "VARIABLES_LOADED" then
  81. if self:ShouldBeMinimized() then
  82. self:Minimize();
  83. else
  84. self:Maximize();
  85. end
  86. elseif event == "DISPLAY_SIZE_CHANGED" or event == "UI_SCALE_CHANGED" then
  87. if self:IsMaximized() then
  88. self:UpdateMaximizedSize();
  89. end
  90. elseif event == "WORLD_MAP_OPEN" then
  91. local mapID = ...;
  92. OpenWorldMap(mapID);
  93. elseif event == "WORLD_MAP_CLOSE" then
  94. HideUIPanel(self);
  95. end
  96. end
  97. function WorldMapMixin:AddStandardDataProviders()
  98. self:AddDataProvider(CreateFromMixins(MapExplorationDataProviderMixin));
  99. self:AddDataProvider(CreateFromMixins(MapHighlightDataProviderMixin));
  100. self:AddDataProvider(CreateFromMixins(WorldMap_EventOverlayDataProviderMixin));
  101. self:AddDataProvider(CreateFromMixins(StorylineQuestDataProviderMixin));
  102. self:AddDataProvider(CreateFromMixins(BattlefieldFlagDataProviderMixin));
  103. self:AddDataProvider(CreateFromMixins(BonusObjectiveDataProviderMixin));
  104. self:AddDataProvider(CreateFromMixins(VehicleDataProviderMixin));
  105. self:AddDataProvider(CreateFromMixins(EncounterJournalDataProviderMixin));
  106. self:AddDataProvider(CreateFromMixins(FogOfWarDataProviderMixin));
  107. self:AddDataProvider(CreateFromMixins(DeathMapDataProviderMixin));
  108. self:AddDataProvider(CreateFromMixins(QuestBlobDataProviderMixin));
  109. self:AddDataProvider(CreateFromMixins(ScenarioDataProviderMixin));
  110. self:AddDataProvider(CreateFromMixins(VignetteDataProviderMixin));
  111. self:AddDataProvider(CreateFromMixins(QuestDataProviderMixin));
  112. self:AddDataProvider(CreateFromMixins(InvasionDataProviderMixin));
  113. self:AddDataProvider(CreateFromMixins(GossipDataProviderMixin));
  114. self:AddDataProvider(CreateFromMixins(FlightPointDataProviderMixin));
  115. self:AddDataProvider(CreateFromMixins(PetTamerDataProviderMixin));
  116. self:AddDataProvider(CreateFromMixins(DigSiteDataProviderMixin));
  117. self:AddDataProvider(CreateFromMixins(GarrisonPlotDataProviderMixin));
  118. self:AddDataProvider(CreateFromMixins(DungeonEntranceDataProviderMixin));
  119. self:AddDataProvider(CreateFromMixins(BannerDataProvider));
  120. self:AddDataProvider(CreateFromMixins(ContributionCollectorDataProviderMixin));
  121. self:AddDataProvider(CreateFromMixins(MapLinkDataProviderMixin));
  122. self:AddDataProvider(CreateFromMixins(SelectableGraveyardDataProviderMixin));
  123. self:AddDataProvider(CreateFromMixins(AreaPOIDataProviderMixin));
  124. self:AddDataProvider(CreateFromMixins(MapIndicatorQuestDataProviderMixin));
  125. self:AddDataProvider(CreateFromMixins(QuestSessionDataProviderMixin));
  126. self:AddDataProvider(CreateFromMixins(WaypointLocationDataProviderMixin));
  127. if IsGMClient() then
  128. self:AddDataProvider(CreateFromMixins(WorldMap_DebugDataProviderMixin));
  129. end
  130. local areaLabelDataProvider = CreateFromMixins(AreaLabelDataProviderMixin); -- no pins
  131. areaLabelDataProvider:SetOffsetY(-10);
  132. self:AddDataProvider(areaLabelDataProvider);
  133. local groupMembersDataProvider = CreateFromMixins(GroupMembersDataProviderMixin);
  134. self:AddDataProvider(groupMembersDataProvider);
  135. local worldQuestDataProvider = CreateFromMixins(WorldMap_WorldQuestDataProviderMixin);
  136. worldQuestDataProvider:SetMatchWorldMapFilters(true);
  137. worldQuestDataProvider:SetUsesSpellEffect(true);
  138. worldQuestDataProvider:SetCheckBounties(true);
  139. worldQuestDataProvider:SetMarkActiveQuests(true);
  140. self:AddDataProvider(worldQuestDataProvider);
  141. local pinFrameLevelsManager = self:GetPinFrameLevelsManager();
  142. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_MAP_EXPLORATION");
  143. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_EVENT_OVERLAY");
  144. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_GARRISON_PLOT");
  145. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_FOG_OF_WAR");
  146. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_QUEST_BLOB");
  147. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_SCENARIO_BLOB");
  148. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_MAP_HIGHLIGHT");
  149. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_DEBUG", 4);
  150. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_DIG_SITE");
  151. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_DUNGEON_ENTRANCE");
  152. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_FLIGHT_POINT");
  153. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_INVASION");
  154. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_PET_TAMER");
  155. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_SELECTABLE_GRAVEYARD");
  156. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_GOSSIP");
  157. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_AREA_POI");
  158. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_DEBUG");
  159. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_MAP_LINK");
  160. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_ENCOUNTER");
  161. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_CONTRIBUTION_COLLECTOR");
  162. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_VIGNETTE", 200);
  163. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_STORY_LINE");
  164. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_SCENARIO");
  165. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_WORLD_QUEST", 500);
  166. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_WORLD_QUEST_PING");
  167. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_ACTIVE_QUEST", C_QuestLog.GetMaxNumQuests());
  168. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_SUPER_TRACKED_QUEST");
  169. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_VEHICLE_BELOW_GROUP_MEMBER");
  170. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_BONUS_OBJECTIVE");
  171. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_BATTLEFIELD_FLAG");
  172. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_WAYPOINT_LOCATION");
  173. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_GROUP_MEMBER");
  174. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_VEHICLE_ABOVE_GROUP_MEMBER");
  175. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_CORPSE");
  176. pinFrameLevelsManager:AddFrameLevel("PIN_FRAME_LEVEL_AREA_POI_BANNER");
  177. end
  178. function WorldMapMixin:AddOverlayFrames()
  179. self:AddOverlayFrame("WorldMapFloorNavigationFrameTemplate", "FRAME", "TOPLEFT", self:GetCanvasContainer(), "TOPLEFT", -15, 2);
  180. self:AddOverlayFrame("WorldMapTrackingOptionsButtonTemplate", "DROPDOWNTOGGLEBUTTON", "TOPRIGHT", self:GetCanvasContainer(), "TOPRIGHT", -4, -2);
  181. self:AddOverlayFrame("WorldMapTrackingPinButtonTemplate", "BUTTON", "TOPRIGHT", self:GetCanvasContainer(), "TOPRIGHT", -36, -2);
  182. self:AddOverlayFrame("WorldMapBountyBoardTemplate", "FRAME", nil, self:GetCanvasContainer());
  183. self:AddOverlayFrame("WorldMapActionButtonTemplate", "FRAME", nil, self:GetCanvasContainer());
  184. self:AddOverlayFrame("WorldMapZoneTimerTemplate", "FRAME", "BOTTOM", self:GetCanvasContainer(), "BOTTOM", 0, 20);
  185. self:AddOverlayFrame("WorldMapThreatFrameTemplate", "FRAME", "BOTTOMLEFT", self:GetCanvasContainer(), "BOTTOMLEFT", 0, 0);
  186. self.NavBar = self:AddOverlayFrame("WorldMapNavBarTemplate", "FRAME");
  187. self.NavBar:SetPoint("TOPLEFT", self.TitleCanvasSpacerFrame, "TOPLEFT", 64, -25);
  188. self.NavBar:SetPoint("BOTTOMRIGHT", self.TitleCanvasSpacerFrame, "BOTTOMRIGHT", -4, 9);
  189. self.SidePanelToggle = self:AddOverlayFrame("WorldMapSidePanelToggleTemplate", "BUTTON", "BOTTOMRIGHT", self:GetCanvasContainer(), "BOTTOMRIGHT", -2, 1);
  190. end
  191. function WorldMapMixin:OnMapChanged()
  192. MapCanvasMixin.OnMapChanged(self);
  193. self:RefreshOverlayFrames();
  194. self:RefreshQuestLog();
  195. if C_MapInternal then
  196. C_MapInternal.SetDebugMap(self:GetMapID());
  197. end
  198. end
  199. function WorldMapMixin:OnShow()
  200. local mapID = MapUtil.GetDisplayableMapForPlayer();
  201. self:SetMapID(mapID);
  202. MapCanvasMixin.OnShow(self);
  203. self:ResetZoom();
  204. DoEmote("READ", nil, true);
  205. PlaySound(SOUNDKIT.IG_QUEST_LOG_OPEN);
  206. PlayerMovementFrameFader.AddDeferredFrame(self, .5, 1.0, .5, function() return GetCVarBool("mapFade") and not self:IsMouseOver() end);
  207. self.BorderFrame.Tutorial:CheckAndShowTooltip();
  208. local miniWorldMap = GetCVarBool("miniWorldMap");
  209. local maximized = self:IsMaximized();
  210. if miniWorldMap ~= maximized then
  211. if miniWorldMap then
  212. self.BorderFrame.MaximizeMinimizeFrame:Minimize();
  213. else
  214. self.BorderFrame.MaximizeMinimizeFrame:Maximize();
  215. end
  216. end
  217. self:TriggerEvent("WorldMapOnShow");
  218. end
  219. function WorldMapMixin:OnHide()
  220. MapCanvasMixin.OnHide(self);
  221. CancelEmote();
  222. PlaySound(SOUNDKIT.IG_QUEST_LOG_CLOSE);
  223. PlayerMovementFrameFader.RemoveFrame(self);
  224. self.BorderFrame.Tutorial:CheckAndHideHelpInfo();
  225. self:OnUIClose();
  226. self:TriggerEvent("WorldMapOnHide");
  227. C_Map.CloseWorldMapInteraction();
  228. end
  229. function WorldMapMixin:RefreshOverlayFrames()
  230. if self.overlayFrames then
  231. for i, frame in ipairs(self.overlayFrames) do
  232. frame:Refresh();
  233. end
  234. end
  235. end
  236. function WorldMapMixin:AddOverlayFrame(templateName, templateType, anchorPoint, relativeFrame, relativePoint, offsetX, offsetY)
  237. local frame = CreateFrame(templateType, nil, self, templateName);
  238. if anchorPoint then
  239. frame:SetPoint(anchorPoint, relativeFrame, relativePoint, offsetX, offsetY);
  240. end
  241. frame.relativeFrame = relativeFrame or self;
  242. if not self.overlayFrames then
  243. self.overlayFrames = { };
  244. end
  245. tinsert(self.overlayFrames, frame);
  246. return frame;
  247. end
  248. function WorldMapMixin:SetOverlayFrameLocation(frame, location)
  249. frame:ClearAllPoints();
  250. if location == Enum.MapOverlayDisplayLocation.BottomLeft then
  251. frame:SetPoint("BOTTOMLEFT", frame.relativeFrame, 15, 15);
  252. elseif location == Enum.MapOverlayDisplayLocation.TopLeft then
  253. frame:SetPoint("TOPLEFT", frame.relativeFrame, 15, -15);
  254. elseif location == Enum.MapOverlayDisplayLocation.BottomRight then
  255. frame:SetPoint("BOTTOMRIGHT", frame.relativeFrame, -18, 15);
  256. elseif location == Enum.MapOverlayDisplayLocation.TopRight then
  257. frame:SetPoint("TOPRIGHT", frame.relativeFrame, -15, -15);
  258. end
  259. end
  260. function WorldMapMixin:UpdateMaximizedSize()
  261. assert(self:IsMaximized());
  262. local parentWidth, parentHeight = self:GetParent():GetSize();
  263. local SCREEN_BORDER_PIXELS = 30;
  264. parentWidth = parentWidth - SCREEN_BORDER_PIXELS;
  265. local spacerFrameHeight = TITLE_CANVAS_SPACER_FRAME_HEIGHT;
  266. local unclampedWidth = ((parentHeight - spacerFrameHeight) * self.minimizedWidth) / (self.minimizedHeight - spacerFrameHeight);
  267. local clampedWidth = math.min(parentWidth, unclampedWidth);
  268. local unclampedHeight = parentHeight;
  269. local clampHeight = ((parentHeight - spacerFrameHeight) * (clampedWidth / unclampedWidth)) + spacerFrameHeight;
  270. self:SetSize(math.floor(clampedWidth), math.floor(clampHeight));
  271. SetUIPanelAttribute(self, "bottomClampOverride", (unclampedHeight - clampHeight) / 2);
  272. UpdateUIPanelPositions(self);
  273. self:OnFrameSizeChanged();
  274. end
  275. function WorldMapMixin:UpdateSpacerFrameAnchoring()
  276. if self.QuestLog and self.QuestLog:IsShown() then
  277. self.TitleCanvasSpacerFrame:SetPoint("BOTTOMRIGHT", self, "TOPRIGHT", -3 - self.questLogWidth, -TITLE_CANVAS_SPACER_FRAME_HEIGHT);
  278. else
  279. self.TitleCanvasSpacerFrame:SetPoint("BOTTOMRIGHT", self, "TOPRIGHT", -3, -TITLE_CANVAS_SPACER_FRAME_HEIGHT);
  280. end
  281. self:OnFrameSizeChanged();
  282. end
  283. --[[ Help Plate ]] --
  284. WorldMapTutorialMixin = { }
  285. function WorldMapTutorialMixin:OnLoad()
  286. self.helpInfo = {
  287. FramePos = { x = 4, y = -40 },
  288. FrameSize = { width = 985, height = 500 },
  289. [1] = { ButtonPos = { x = 350, y = -180 }, HighLightBox = { x = 0, y = -30, width = 695, height = 464 }, ToolTipDir = "DOWN", ToolTipText = WORLD_MAP_TUTORIAL1 },
  290. [2] = { ButtonPos = { x = 350, y = 16 }, HighLightBox = { x = 50, y = 16, width = 645, height = 44 }, ToolTipDir = "DOWN", ToolTipText = WORLD_MAP_TUTORIAL4 },
  291. };
  292. end
  293. function WorldMapTutorialMixin:OnHide()
  294. self:CheckAndHideHelpInfo();
  295. end
  296. function WorldMapTutorialMixin:CheckAndShowTooltip()
  297. if (not NewPlayerExperience or not NewPlayerExperience.IsActive) and not GetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_WORLD_MAP_FRAME) then
  298. if not HelpPlate_IsShowing(self.helpInfo) then
  299. HelpPlate_ShowTutorialPrompt(self.helpInfo, self);
  300. SetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_WORLD_MAP_FRAME, true);
  301. end
  302. end
  303. end
  304. function WorldMapTutorialMixin:CheckAndHideHelpInfo()
  305. if HelpPlate_IsShowing(self.helpInfo) then
  306. HelpPlate_Hide();
  307. end
  308. if HelpPlateTooltip_IsShowing(self.helpInfo) then
  309. HelpPlate_TooltipHide();
  310. SetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_WORLD_MAP_FRAME, false);
  311. end
  312. end
  313. function WorldMapTutorialMixin:ToggleHelpInfo()
  314. local mapFrame = self:GetParent():GetParent();
  315. if ( mapFrame.QuestLog:IsShown() ) then
  316. self.helpInfo[3] = { ButtonPos = { x = 810, y = -180 }, HighLightBox = { x = 700, y = 16, width = 285, height = 510 }, ToolTipDir = "DOWN", ToolTipText = WORLD_MAP_TUTORIAL2 };
  317. else
  318. self.helpInfo[3] = nil;
  319. end
  320. if ( not HelpPlate_IsShowing(self.helpInfo) and mapFrame:IsShown()) then
  321. HelpPlate_Show(self.helpInfo, mapFrame, self, true);
  322. SetCVarBitfield("closedInfoFrames", LE_FRAME_TUTORIAL_WORLD_MAP_FRAME, true);
  323. else
  324. HelpPlate_Hide(true);
  325. end
  326. end
  327. -- ============================================ QUEST LOG ===============================================================================
  328. function WorldMapMixin:AttachQuestLog()
  329. QuestMapFrame:SetParent(self);
  330. QuestMapFrame:SetFrameStrata("HIGH");
  331. QuestMapFrame:ClearAllPoints();
  332. QuestMapFrame:SetPoint("TOPRIGHT", -3, -25);
  333. QuestMapFrame:SetPoint("BOTTOMRIGHT", -3, 3);
  334. QuestMapFrame:Hide();
  335. self.QuestLog = QuestMapFrame;
  336. end
  337. function WorldMapMixin:SetHighlightedQuestID(questID)
  338. self:TriggerEvent("SetHighlightedQuestID", questID);
  339. end
  340. function WorldMapMixin:ClearHighlightedQuestID()
  341. self:TriggerEvent("ClearHighlightedQuestID");
  342. end
  343. function WorldMapMixin:SetFocusedQuestID(questID)
  344. self:TriggerEvent("SetFocusedQuestID", questID);
  345. end
  346. function WorldMapMixin:ClearFocusedQuestID()
  347. self:TriggerEvent("ClearFocusedQuestID");
  348. end
  349. function WorldMapMixin:PingQuestID(questID)
  350. if self:IsVisible() then
  351. self:TriggerEvent("PingQuestID", questID);
  352. end
  353. end
  354. -- ============================================ GLOBAL API ===============================================================================
  355. function ToggleQuestLog()
  356. WorldMapFrame:HandleUserActionToggleQuestLog();
  357. end
  358. function ToggleWorldMap()
  359. WorldMapFrame:HandleUserActionToggleSelf();
  360. end
  361. function OpenWorldMap(mapID)
  362. WorldMapFrame:HandleUserActionOpenSelf(mapID);
  363. end
  364. function OpenQuestLog(mapID)
  365. WorldMapFrame:HandleUserActionOpenQuestLog(mapID);
  366. end