Fix target spotting for spotter
This commit is contained in:
@@ -101,9 +101,12 @@ function shared.Spotter.Init()
|
||||
|
||||
local frame = CreateFrame("Frame")
|
||||
frame:RegisterEvent("NAME_PLATE_UNIT_ADDED")
|
||||
frame:RegisterEvent("TARGET_UNIT_CHANGED")
|
||||
frame:RegisterEvent("UNIT_TARGET")
|
||||
frame:SetScript("OnEvent", function(self, event, unit)
|
||||
if not Heimdall_Data.config.spotter.enabled then return end
|
||||
if event == "UNIT_TARGET" then
|
||||
unit = "target"
|
||||
end
|
||||
local err = NotifySpotted(unit)
|
||||
if err then
|
||||
print(string.format("Error notifying %s: %s", tostring(unit), tostring(err)))
|
||||
|
||||
Reference in New Issue
Block a user