Originally Posted by pinmouse
Would love an addon that shows the dungeon's level in the tool tip when you mouse over it on the map. That is all. Thanks!!!
|
I made a simple addon that will show levels for points of interest (if this information is available):
To install this addon you have to create folder "POILevels" inside of "Documents\Elder Scrolls Online\Live\AddOns\". And then in "POILevels" folder create two text files:
POILevels.txt:
Code:
## Title: |cFFFFB0POI Levels|r 0.1 - By |c00C000Garkin|r
## Version: 0.1
## Author: Garkin
## APIVersion: 100003
POILevels.lua
POILevels.lua:
Lua Code:
local function AddLevel(pin)
local poiIndex = pin:GetPOIIndex()
local zoneIndex = pin:GetPOIZoneIndex()
local _, level = GetPOIInfo(zoneIndex, poiIndex)
local name = ZO_WorldMapMouseoverName:GetText()
if level > 0 then
ZO_WorldMapMouseoverName:SetText(zo_strformat("[<<1>>] <<t:2>>", level, name))
end
end
local function OnLoad(code, name)
if name ~= "POILevels" then return end
local CreatorPOISeen = ZO_MapPin.TOOLTIP_CREATORS[MAP_PIN_TYPE_POI_SEEN].creator
ZO_MapPin.TOOLTIP_CREATORS[MAP_PIN_TYPE_POI_SEEN].creator = function(pin)
CreatorPOISeen(pin)
AddLevel(pin)
end
local CreatorPOIComplete = ZO_MapPin.TOOLTIP_CREATORS[MAP_PIN_TYPE_POI_COMPLETE].creator
ZO_MapPin.TOOLTIP_CREATORS[MAP_PIN_TYPE_POI_COMPLETE].creator = function(pin)
CreatorPOIComplete(pin)
AddLevel(pin)
end
EVENT_MANAGER:UnregisterForEvent("POILevels_OnLoad", EVENT_ADD_ON_LOADED)
end
EVENT_MANAGER:RegisterForEvent("POILevels_OnLoad", EVENT_ADD_ON_LOADED, OnLoad)