bmos
June 19th, 2020, 19:23
Since it appears that the id of a character can be a different string under the charsheet and combattracker db entries, is there a way to easily get back and forth?
I have a handler in onInit which runs combineCarryModifiers when I change effects:
DB.addHandler(DB.getPath('combattracker.list.*.eff ects'), 'onChildUpdate', combineCarryModifiers)
Unfortunately, I need to define rActor for use in the combineCarryModifiers function.
When I define rActor:
rActor = ActorManager.getActor('pc', node.getParent())
I get the following result:
{ s'sType' = s'pc', s'sCreatureNode' = s'combattracker.list.id-00001', s'sCTNode' = s'combattracker.list.id-00001', s'sName' = s'testy' }
It fills the sCTNode string correctly (since that is what node.getParent() returns) and gets the character name correctly, but doesn't return the right string for sCreatureNode.
Obviously, I'm doing something wrong. What is it?
I have a handler in onInit which runs combineCarryModifiers when I change effects:
DB.addHandler(DB.getPath('combattracker.list.*.eff ects'), 'onChildUpdate', combineCarryModifiers)
Unfortunately, I need to define rActor for use in the combineCarryModifiers function.
When I define rActor:
rActor = ActorManager.getActor('pc', node.getParent())
I get the following result:
{ s'sType' = s'pc', s'sCreatureNode' = s'combattracker.list.id-00001', s'sCTNode' = s'combattracker.list.id-00001', s'sName' = s'testy' }
It fills the sCTNode string correctly (since that is what node.getParent() returns) and gets the character name correctly, but doesn't return the right string for sCreatureNode.
Obviously, I'm doing something wrong. What is it?