Closed joaquinpereyra98 closed 3 weeks ago
Sorry, what part does CPR play in this? You didn't include any details of how this is CPR related. And is rollSkill an async function?
Is there a console error?
Sorry, what part does CPR play in this? You didn't include any details of how this is CPR related. And is rollSkill an async function?
the bug only happens if CPR is activated in the world rollSkill is async
What's the bug?
And what happens if you await the roll skill?
Is there a console error?
there is no error in the console
What's the bug?
When skill rolls are made for different actors in the chat they appear as if they belong to the same actor. Note: the modifiers seem to be correct, the error is only at the moment of creating the message.
And what happens if you await the roll skill?
the bug does not appear
I don't think it counts as a bug if you're using a function not as intended. If it works fine when it's properly awaited, I see no issue. Yes it's probably caused by the extra millisecond of code it goes through when CPR patches the function, but I don't think there's anything CPR can do about that.
(I do still plan to look into it, in case for whatever reason those rolls are forced to happen in a sync context - though I do think not awaiting them is likely to result in unexpected behavior)
Will wait to close until the next release is out and you can verify it works with your code, but feeling confident that I squashed it.
Foundry
System:
Modules Installed:
How to replicate it
Execute a macro script with the following code:
Note: if a timeout of one millisecond is added between rolls, the bug does not occur.