celestian
January 21st, 2019, 05:28
Is there a reason why the "sSource" of an effect is set to the object in the CombatTracker with current initiative instead of the actor first determined in manager_power.lua performAction()?
I'm using EffectManager.setCustomOnEffectAddStart(adndOnEffe ctAddStart); to grab the effect and search for [$NAME] within the effect string and replace it with the name of the creature placing the effect. Only problem is it seems the default method is to use the source (rEffect.sSource) from CombatTracker current initiative and not the one where the effect is drag/dropped/used from.
I'm pretty sure it's because of this code snippet:
if User.isHost() then
nodeTempCT = CombatManager.getActiveCT();
else
From CoreRPG, manager_action_effect.lua in function onEffect(rSource, rTarget, rRoll)
I'm using EffectManager.setCustomOnEffectAddStart(adndOnEffe ctAddStart); to grab the effect and search for [$NAME] within the effect string and replace it with the name of the creature placing the effect. Only problem is it seems the default method is to use the source (rEffect.sSource) from CombatTracker current initiative and not the one where the effect is drag/dropped/used from.
I'm pretty sure it's because of this code snippet:
if User.isHost() then
nodeTempCT = CombatManager.getActiveCT();
else
From CoreRPG, manager_action_effect.lua in function onEffect(rSource, rTarget, rRoll)