Skip to content

Latest commit

 

History

History
23 lines (19 loc) · 583 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 583 Bytes

LibMobs

Worlf of Warcraft library of important emenies from instances.

Usage

local LibMobs = LibStub("LibMobs")
assert(LibMobs, "Addon requires LibMobs")

local frame = CreateFrame("Frame")
frame:RegisterEvent("PLAYER_TARGET_CHANGED")
frame:SetScript("OnEvent", function (self, event, ...)
    if event == "PLAYER_TARGET_CHANGED" then
        local unit = "target"
        local guid = UnitGUID(guid)
        local guidInfo = LibMobs:ParseCreatureGUID(guid)
        if guidInfo then
            print(guidInfo.instanceId, guidInfo.zoneID)
        end
    end
end)