Fix blocage du round
Les ActiveEffect n'ont pas de system, et causaint une exception dans la méthode de passage de fin de round
This commit is contained in:
parent
782dc38268
commit
bdc2d8db3a
@ -1284,12 +1284,7 @@ export class RdDActor extends RdDBaseActor {
|
|||||||
async finDeRound(options = { terminer: false }) {
|
async finDeRound(options = { terminer: false }) {
|
||||||
for (let effect of this.getEffects()) {
|
for (let effect of this.getEffects()) {
|
||||||
if (effect.duration.type !== 'none' && (effect.duration.remaining <= 0 || options.terminer)) {
|
if (effect.duration.type !== 'none' && (effect.duration.remaining <= 0 || options.terminer)) {
|
||||||
if (effect.system.origin) {
|
|
||||||
await effect.update({ 'disabled': true });
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
await effect.delete();
|
await effect.delete();
|
||||||
}
|
|
||||||
ChatMessage.create({ content: `${this.name} n'est plus ${Misc.lowerFirst(game.i18n.localize(effect.system.label))} !` });
|
ChatMessage.create({ content: `${this.name} n'est plus ${Misc.lowerFirst(game.i18n.localize(effect.system.label))} !` });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user