mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-18 07:59:03 +01:00
Fixed our onCreate methods unintentionally being run on all clients
This commit is contained in:
parent
4551a2bcfe
commit
967b3ba2ab
6 changed files with 15 additions and 4 deletions
|
|
@ -26,7 +26,9 @@ export default class BeastformEffect extends foundry.abstract.TypeDataModel {
|
|||
};
|
||||
}
|
||||
|
||||
async _onCreate() {
|
||||
async _onCreate(_data, _options, userId) {
|
||||
if (userId !== game.user.id) return;
|
||||
|
||||
if (this.parent.parent?.type === 'character') {
|
||||
this.parent.parent.system.primaryWeapon?.update?.({ 'system.equipped': false });
|
||||
this.parent.parent.system.secondayWeapon?.update?.({ 'system.equipped': false });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue