Bug with __project_source when resolving callbacks
Posted: Thu Apr 05, 2018 2:25 pm
I have been pestering Shibari about a bug I uncovered while working on a class addon, and think I have enough to report properly now.
Sometimes, the __project_source and resolveSource architecture fails to result in delayedLogDamage aggregating lines correctly.
An example of the behaviour can be reproduced in vanilla ToME by damaging yourself while affected by Reality Smearing. Instead of the expected line: there are two separate entries in the log, which are not necessarily adjacent:
I thought this was probably restricted to the callback architecture, and have traced the specific behaviour in my addon, and in vanilla with reality smearing, to the replacement of the existing __project_source in fireTalentCheck (/modules/tome/class/Actor.lua#5328‑5341 in the current repository). This results in the called-back sustain being treated as the source when it should still resolve to the self in the case of damage mitigation from self-damage.
Sometimes, the __project_source and resolveSource architecture fails to result in delayedLogDamage aggregating lines correctly.
An example of the behaviour can be reproduced in vanilla ToME by damaging yourself while affected by Reality Smearing. Instead of the expected line:
Code: Select all
Player hits Player for (45 converted), 106 arcane (106 total damage)
Code: Select all
Player hits Player for 106 arcane damage
Reality Smearing hits player for (45 converted) damage