Skip to content

Commit

Permalink
🐛 Fix hunter feign death being reported as a death
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisliebaer committed Nov 6, 2023
1 parent a2b9d3b commit 7a2bd17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 7 additions & 1 deletion FailFeed.lua
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ function FailureTracker:COMBAT_LOG_EVENT_UNFILTERED()
-- START of ElitismHelper code
local timestamp, eventType, hideCaster, srcGUID, srcName, srcFlags, srcFlags2, dstGUID, dstName, dstFlags, dstFlags2 = CombatLogGetCurrentEventInfo(); -- Those arguments appear for all combat event variants.
local eventPrefix, eventSuffix = eventType:match("^(.-)_?([^_]*)$");

if (eventPrefix:match("^SPELL") or eventPrefix:match("^RANGE")) and eventSuffix == "DAMAGE" then
local spellId, spellName, spellSchool, sAmount, aOverkill, sSchool, sResisted, sBlocked, sAbsorbed, sCritical, sGlancing, sCrushing, sOffhand, _ = select(12, CombatLogGetCurrentEventInfo())
ElitismFrame:SpellDamage(timestamp, eventType, srcGUID, srcName, srcFlags, dstGUID, dstName, dstFlags, spellId, spellName, spellSchool, sAmount)
Expand All @@ -808,6 +809,11 @@ function FailureTracker:COMBAT_LOG_EVENT_UNFILTERED()

-- start of own code
if eventType == "UNIT_DIED" and UnitIsPlayer(dstName) then
-- hunter feign death is not a real death
if UnitClass(dstName) == "Hunter" and UnitIsFeignDeath(dstName) then
return
end

self:reportDeath(dstName)
end
end
Expand Down Expand Up @@ -879,4 +885,4 @@ function FailFeed:SettingsChanged(db)
OptionsManager:set({"windowProps"}, windowProps)
end)
end
end
end
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ Sometimes it a mix of both, but you are an adult and can decide for yourself.
# Known Bugs / Wishlist
* Ideally the addon would use EliteHelper's spell database directly, but EliteHelper does not currently expose it's database
* Damage taken is calculated wrong but I could not find any documentation on how to accurately get the effective damage taken
* Due to wrong damage predictions the addon may wrongfully display a killing blow
* Hunter feign death is also reported as death. But there is an easy solution: Don't play with hunters
* CI builds could be improved to include external dependencies rather than committing them to the repo and to include a version number directly from the CI pipeline
* CI builds could be improved to include external dependencies rather than committing them to the repo and to include a version number directly from the CI pipeline

0 comments on commit 7a2bd17

Please sign in to comment.