33 lines
1.2 KiB
Lua
33 lines
1.2 KiB
Lua
--NAME_PLATE_UNIT_ADDED NAME_PLATE_UNIT_REMOVED PLAYER_REGEN_DISABLED PLAYER_TARGET_CHANGED
|
|
function(e, u)
|
|
--local mname = "Armored Vaultbot"
|
|
local mname = "Sickly Saurid"
|
|
local LCG = LibStub("LibCustomGlow-1.0")
|
|
if e == "NAME_PLATE_UNIT_ADDED" then
|
|
local name = UnitName(u)
|
|
if name == mname then
|
|
PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master")
|
|
aura_env.ticker = C_Timer.NewTicker(1, function() PlaySoundFile("Interface\\AddOns\\WeakAuras\\PowerAurasMedia\\Sounds\\sonar.ogg", "master"); end)
|
|
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
|
LCG.PixelGlow_Start(nameplate, {1,1,1,1}, nil, 0, 8, 2, 0, -4)
|
|
end
|
|
elseif e == "NAME_PLATE_UNIT_REMOVED" then
|
|
local name = UnitName(u)
|
|
if name == mname then
|
|
if aura_env.ticker then
|
|
aura_env.ticker:Cancel()
|
|
aura_env.ticker = nil
|
|
end
|
|
local nameplate = C_NamePlate.GetNamePlateForUnit(u)
|
|
LCG.PixelGlow_Stop()
|
|
end
|
|
elseif e == "PLAYER_REGEN_DISABLED" and aura_env.ticker then
|
|
aura_env.ticker:Cancel()
|
|
aura_env.ticker = nil
|
|
elseif e == "PLAYER_TARGET_CHANGED" and aura_env.ticker then
|
|
if UnitName("target") == mname then
|
|
aura_env.ticker:Cancel()
|
|
aura_env.ticker = nil
|
|
end
|
|
end
|
|
end |