You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Due to the roll refactor rollRecharge ignores changing message.create to false preRollRechargeV2.
In the code createMessage (which determines display the chat card or not) is recorded before calling BasicRoll.build, but after the preRollRecharge hook fires, so that changes made in preRollRechargeV2 are ignored, but changes made in preRollRecharge are honored.
I could not see any simple way to resolve the issue but wanted to understand if this is a wont fix and will work around it.,
if("dnd5e.preRollRecharge"inHooks.events){foundry.utils.logCompatibilityWarning("The `dnd5e.preRollRecharge` hook has been deprecated and replaced with `dnd5e.preRollRechargeV2`.",{since: "DnD5e 4.0",until: "DnD5e 4.4"});consthookData={formula: rollConfig.rolls[0].parts[0],data: rollConfig.rolls[0].data,target: rollConfig.rolls[0].options.target,chatMessage: messageConfig.create};if(Hooks.call("dnd5e.preRollRecharge",this,hookData)===false)return;rollConfig.rolls[0].parts[0]=hookData.formula;rollConfig.rolls[0].data=hookData.data;rollConfig.rolls[0].options.target=hookData.target;messageConfig.create=hookData.chatMessage;}constcreateMessage=messageConfig.create!==false;messageConfig.create=false;constrolls=awaitCONFIG.Dice.BasicRoll.build(rollConfig,dialogConfig,messageConfig);```js
The text was updated successfully, but these errors were encountered:
Due to the roll refactor rollRecharge ignores changing message.create to false preRollRechargeV2.
In the code createMessage (which determines display the chat card or not) is recorded before calling BasicRoll.build, but after the preRollRecharge hook fires, so that changes made in preRollRechargeV2 are ignored, but changes made in preRollRecharge are honored.
I could not see any simple way to resolve the issue but wanted to understand if this is a wont fix and will work around it.,
The text was updated successfully, but these errors were encountered: