Mercurial > wow > whistle-master
comparison WhistleMaster.lua @ 12:5be6dcc0f0cd
Fix for bug on LOD of blizzard's world map
Added tooltip to ItemRef
| author | Vynn <mischivin@gmail.com> |
|---|---|
| date | Fri, 09 Dec 2016 14:59:12 -0500 |
| parents | 148e87d347f5 |
| children | 63bf46cfbd3c |
comparison
equal
deleted
inserted
replaced
| 11:a9acaf28b21a | 12:5be6dcc0f0cd |
|---|---|
| 11 WhistleLoc:SetSize(64, 64) | 11 WhistleLoc:SetSize(64, 64) |
| 12 WhistleLoc:SetPoint("CENTER", 0, 0) | 12 WhistleLoc:SetPoint("CENTER", 0, 0) |
| 13 WhistleLoc:Show() | 13 WhistleLoc:Show() |
| 14 | 14 |
| 15 WM_ClosestNode = nil | 15 WM_ClosestNode = nil |
| 16 | |
| 17 --[[local Rotate = WhistleLoc:CreateTexture() | |
| 18 Rotate:SetTexture("Interface\minimap\UI-Minimap-Ping-Rotate") | |
| 19 Rotate:SetPoint("CENTER") | |
| 20 Rotate:SetSize(48, 48) | |
| 21 Rotate:SetVertexColor(0.9, 0.1, 0.1) | |
| 22 | |
| 23 local Ring = WhistleLoc:CreateTexture() | |
| 24 Ring:SetTexture("Interface\minimap\UI-Minimap-Ping-Center") | |
| 25 Ring:SetPoint("CENTER") | |
| 26 Ring:SetSize(32, 32) | |
| 27 Ring:SetVertexColor(0.9, 0.1, 0.1)]] | |
| 28 | |
| 29 | |
| 30 | |
| 31 | 16 |
| 32 local function GetDistance(nX, nY) | 17 local function GetDistance(nX, nY) |
| 33 local pX, pY = GetPlayerMapPosition("player") | 18 local pX, pY = GetPlayerMapPosition("player") |
| 34 | 19 |
| 35 local dX = pX - nX | 20 local dX = pX - nX |
| 79 UpdateWhistleMaster() | 64 UpdateWhistleMaster() |
| 80 end | 65 end |
| 81 if ( (mapVisible) and not WorldMapFrame:IsVisible() ) then | 66 if ( (mapVisible) and not WorldMapFrame:IsVisible() ) then |
| 82 mapVisible = false | 67 mapVisible = false |
| 83 end | 68 end |
| 84 if (event == "VARIABLES_LOADED") then | 69 if (event == "PLAYER_ENTERING_WORLD") then |
| 85 WorldMapFrame:Show() | 70 WorldMapFrame:Show() |
| 86 WorldMapFrame:Hide() | 71 WorldMapFrame:Hide() |
| 87 UpdateWhistleMaster() | 72 UpdateWhistleMaster() |
| 88 end | 73 end |
| 89 end | 74 end |
| 90 | 75 |
| 91 local WhistleMaster = CreateFrame("FRAME", "WhistleMaster", WorldMapPOIFrame) | 76 local WhistleMaster = CreateFrame("FRAME", "WhistleMaster", WorldMapPOIFrame) |
| 92 WhistleMaster:RegisterEvent("WORLD_MAP_UPDATE") | 77 WhistleMaster:RegisterEvent("WORLD_MAP_UPDATE") |
| 93 WhistleMaster:RegisterEvent("VARIABLES_LOADED") | 78 WhistleMaster:RegisterEvent("VARIABLES_LOADED") |
| 79 WhistleMaster:RegisterEvent("PLAYER_ENTERING_WORLD") | |
| 94 WhistleMaster:SetScript("OnEvent", EventHandler) | 80 WhistleMaster:SetScript("OnEvent", EventHandler) |
| 95 | 81 |
| 96 local cleared = true | 82 local cleared = true |
| 97 local function OnTooltipCleared(self) | 83 local function OnTooltipCleared(self) |
| 98 cleared = true | 84 cleared = true |
| 115 end | 101 end |
| 116 end | 102 end |
| 117 | 103 |
| 118 GameTooltip:HookScript("OnTooltipCleared", OnTooltipCleared) | 104 GameTooltip:HookScript("OnTooltipCleared", OnTooltipCleared) |
| 119 GameTooltip:HookScript("OnTooltipSetItem", OnTooltipSetItem) | 105 GameTooltip:HookScript("OnTooltipSetItem", OnTooltipSetItem) |
| 106 ItemRefTooltip:HookScript("OnTooltipCleared", OnTooltipCleared) | |
| 107 ItemRefTooltip:HookScript("OnTooltipSetItem", OnTooltipSetItem) | |
| 120 | 108 |
