Only trigger bonks for players

This commit is contained in:
2025-01-12 23:22:18 +01:00
parent 4c404225d2
commit ca333a93e3
3 changed files with 15 additions and 3 deletions

View File

@@ -29,6 +29,12 @@ function shared.BonkDetector.Init()
end
return
end
if not UnitIsPlayer(source) then
if Heimdall_Data.config.bonkDetector.debug then
print(string.format("[%s] Source %s is not a player, nothing to do", ModuleName, source))
end
return
end
local destination, err = CLEUParser.GetDestName(...)
if err then
@@ -37,6 +43,12 @@ function shared.BonkDetector.Init()
end
return
end
if not UnitIsPlayer(destination) then
if Heimdall_Data.config.bonkDetector.debug then
print(string.format("[%s] Destination %s is not a player, nothing to do", ModuleName, destination))
end
return
end
local subevent = select(2, ...)
if not subevent:find("_DAMAGE") then