feat: add rollItem hook
This commit is contained in:
parent
58577beacd
commit
3b74ce2a5b
|
@ -11,6 +11,13 @@ declare global {
|
|||
interface DocumentClassConfig {
|
||||
Item: typeof DS4Item;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
namespace Hooks {
|
||||
interface StaticCallbacks {
|
||||
"ds4.rollItem": (item: DS4Item) => void;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,6 +55,8 @@ export class DS4Spell extends DS4Item {
|
|||
flavorData: { actor: speaker.alias ?? this.actor.name, spell: this.name },
|
||||
speaker,
|
||||
});
|
||||
|
||||
Hooks.callAll("ds4.rollItem", this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,6 +47,8 @@ export class DS4Weapon extends DS4Item {
|
|||
flavorData: { actor: speaker.alias ?? this.actor.name, weapon: this.name },
|
||||
speaker,
|
||||
});
|
||||
|
||||
Hooks.callAll("ds4.rollItem", this);
|
||||
}
|
||||
|
||||
private async getCombatValueKeyForAttackType(attackType: AttackType): Promise<"meleeAttack" | "rangedAttack"> {
|
||||
|
|
Loading…
Reference in a new issue