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

@@ -1,6 +1,6 @@
## Interface: 70300 ## Interface: 70300
## Title: Heimdall ## Title: Heimdall
## Version: 3.2.3 ## Version: 3.3.0
## Notes: Watches over areas and alerts when hostiles spotted ## Notes: Watches over areas and alerts when hostiles spotted
## Author: Cyka ## Author: Cyka
## SavedVariables: Heimdall_Data ## SavedVariables: Heimdall_Data

BIN
Heimdall.zip LFS

Binary file not shown.

View File

@@ -29,6 +29,12 @@ function shared.BonkDetector.Init()
end end
return return
end 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(...) local destination, err = CLEUParser.GetDestName(...)
if err then if err then
@@ -37,6 +43,12 @@ function shared.BonkDetector.Init()
end end
return return
end 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, ...) local subevent = select(2, ...)
if not subevent:find("_DAMAGE") then if not subevent:find("_DAMAGE") then