Utilisation de get plutôt que find par id
This commit is contained in:
parent
8e41250f64
commit
ab9a21f402
@ -515,7 +515,7 @@ export class RdDCombat {
|
|||||||
static _callJetDeVie(event) {
|
static _callJetDeVie(event) {
|
||||||
let actorId = event.currentTarget.attributes['data-actorId'].value;
|
let actorId = event.currentTarget.attributes['data-actorId'].value;
|
||||||
let tokenId = event.currentTarget.attributes['data-tokenId'].value;
|
let tokenId = event.currentTarget.attributes['data-tokenId'].value;
|
||||||
let token = canvas.tokens.placeables.find(t => t.id == tokenId)
|
let token = canvas.tokens.get(tokenId)
|
||||||
const actor = token?.actor ?? game.actors.get(actorId);
|
const actor = token?.actor ?? game.actors.get(actorId);
|
||||||
if (actor?.isOwner) {
|
if (actor?.isOwner) {
|
||||||
actor.jetDeVie();
|
actor.jetDeVie();
|
||||||
|
Loading…
Reference in New Issue
Block a user