diff --git a/Heimdall.toc b/Heimdall.toc index e2554ee..1608a75 100644 --- a/Heimdall.toc +++ b/Heimdall.toc @@ -1,6 +1,6 @@ ## Interface: 70300 ## Title: Heimdall -## Version: 3.3.0 +## Version: 3.3.1 ## Notes: Watches over areas and alerts when hostiles spotted ## Author: Cyka ## SavedVariables: Heimdall_Data diff --git a/Heimdall.zip b/Heimdall.zip index 52c3278..32cc7f6 100644 --- a/Heimdall.zip +++ b/Heimdall.zip @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8943274952bc417b79712856e04cc965c2ac4cc7b2377dad92fe64997db975f9 -size 985662 +oid sha256:5a0f7799637747403dfd6694c6e2a72393639bbc50dfabcb91010a27d527e304 +size 985696 diff --git a/Modules/BonkDetector.lua b/Modules/BonkDetector.lua index 08999ef..e0dfa1f 100644 --- a/Modules/BonkDetector.lua +++ b/Modules/BonkDetector.lua @@ -12,12 +12,20 @@ function shared.BonkDetector.Init() local frame = CreateFrame("Frame") frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") frame:SetScript("OnEvent", function(self, event, ...) - if Heimdall_Data.config.bonkDetector.debug then - print(string.format("[%s] Combat log event received", ModuleName)) - end - if not Heimdall_Data.config.bonkDetector.enabled then +-- if Heimdall_Data.config.bonkDetector.debug then +-- print(string.format("[%s] Combat log event received", ModuleName)) +-- end +-- if not Heimdall_Data.config.bonkDetector.enabled then +-- if Heimdall_Data.config.bonkDetector.debug then +-- print(string.format("[%s] Module disabled, ignoring combat event", ModuleName)) +-- end +-- return +-- end + + local subevent = select(2, ...) + if not subevent:find("_DAMAGE") then if Heimdall_Data.config.bonkDetector.debug then - print(string.format("[%s] Module disabled, ignoring combat event", ModuleName)) + print(string.format("[%s] Not a damage event, ignoring: %s", ModuleName, subevent)) end return end @@ -29,7 +37,8 @@ function shared.BonkDetector.Init() end return end - if not UnitIsPlayer(source) then + local sourceGUID = CLEUParser.GetSourceGUID(...) + if not string.find(sourceGUID, "Player") then if Heimdall_Data.config.bonkDetector.debug then print(string.format("[%s] Source %s is not a player, nothing to do", ModuleName, source)) end @@ -43,21 +52,14 @@ function shared.BonkDetector.Init() end return end - if not UnitIsPlayer(destination) then + local destinationGUID = CLEUParser.GetDestGUID(...) + if not string.find(destinationGUID, "Player") 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 - if Heimdall_Data.config.bonkDetector.debug then - print(string.format("[%s] Not a damage event, ignoring: %s", ModuleName, subevent)) - end - return - end - local currentTime = GetTime() local throttle = Heimdall_Data.config.bonkDetector.throttle diff --git a/Modules/StinkyTracker.lua b/Modules/StinkyTracker.lua index fb09529..6d95646 100644 --- a/Modules/StinkyTracker.lua +++ b/Modules/StinkyTracker.lua @@ -212,6 +212,7 @@ function shared.StinkyTracker.Init() return end + local name = UnitName(unit) if not UnitIsPlayer(unit) then if Heimdall_Data.config.stinkyTracker.debug then print(string.format("[%s] Target %s is not a player, nothing to do", ModuleName, name)) @@ -219,7 +220,6 @@ function shared.StinkyTracker.Init() return end - local name = UnitName(unit) local enemy = UnitCanAttack("player", unit) if enemy then if Heimdall_Data.config.stinkyTracker.debug then