Implement whispering on detect and on kill in stinkydetector
This commit is contained in:
@@ -30,6 +30,18 @@ function(allstates, e, ...)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for i = 1, 40 do
|
||||
if UnitIsPlayer("nameplate" .. i) then
|
||||
local name = UnitName("nameplate" .. i)
|
||||
local faction = UnitFactionGroup("nameplate" .. i)
|
||||
if faction and faction == "Horde" then
|
||||
aura_env.RegisterAlly(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
aura_env.CleanAlliance()
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -68,5 +80,37 @@ function(allstates, e, ...)
|
||||
progress = string.format("%20s", "0s"),
|
||||
}
|
||||
end
|
||||
|
||||
local overkill, err = CLEUParser.GetOverkill(...)
|
||||
if err == nil then
|
||||
local source, err = CLEUParser.GetSourceName(...)
|
||||
if err ~= nil then source = "unknown" end
|
||||
local destination, err = CLEUParser.GetDestName(...)
|
||||
if err ~= nil then destination = "unknown" end
|
||||
local spellName, err = CLEUParser.GetSpellName(...)
|
||||
if err ~= nil then spellName = "unknown" end
|
||||
local sourceid, err = CLEUParser.GetSourceGUID(...)
|
||||
if err then
|
||||
print("Could not get source id for " .. source)
|
||||
print(...)
|
||||
return true
|
||||
end
|
||||
local destid, err = CLEUParser.GetDestGUID(...)
|
||||
if err then
|
||||
print("Could not get destination id for " .. destination)
|
||||
print(...)
|
||||
return true
|
||||
end
|
||||
if not string.match(sourceid, "Player") then
|
||||
-- print("Source is not a player, nevermind...")
|
||||
return true
|
||||
end
|
||||
if not string.match(destid, "Player") then
|
||||
-- print("Destination is not a player, nevermind...")
|
||||
return true
|
||||
end
|
||||
aura_env.RegisterKill(source, destination, spellName, overkill)
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
Reference in New Issue
Block a user