Closed WilliamDraco closed 7 months ago
The InitOnFirstSubscribe is only setup for ON_COMBAT_ENTER. https://github.com/nwnxee/unified/blob/c1b6122b551b5046158a14c913a7bb5bf57abf9f/Plugins/Events/Events/CombatEvents.cpp#L66-L66 ON_COMBAT_EXIT uses the same hooked function as ENTER but does not hook it on its own. If someone only uses 'Exit' and never subscribes to 'Enter', it will never hook and therefore Exit does not fire.
Regex being more lenient would do it, but probably require too-much leniency. I'm not sure how to safely setup two subs for the same function in an "either/or" kind of way or I'd do it myself.
NWNX_ON_COMBAT_(ENTER|EXIT)_.* should be fine, I think.
NWNX_ON_COMBAT_(ENTER|EXIT)_.*
The InitOnFirstSubscribe is only setup for ON_COMBAT_ENTER. https://github.com/nwnxee/unified/blob/c1b6122b551b5046158a14c913a7bb5bf57abf9f/Plugins/Events/Events/CombatEvents.cpp#L66-L66 ON_COMBAT_EXIT uses the same hooked function as ENTER but does not hook it on its own. If someone only uses 'Exit' and never subscribes to 'Enter', it will never hook and therefore Exit does not fire.
Regex being more lenient would do it, but probably require too-much leniency. I'm not sure how to safely setup two subs for the same function in an "either/or" kind of way or I'd do it myself.