Fix armes de tir

This commit is contained in:
2021-04-23 13:59:10 +02:00
parent 43ca970dbd
commit 131629fdb5
3 changed files with 4 additions and 4 deletions

View File

@@ -394,7 +394,7 @@ export class VadentisActor extends Actor {
if ( target ) {
let arme = this.data.items.find( item => (item.type == 'armecc' || item.type == 'tir') && item._id == armeId);
if (arme) {
if ( arme == 'tir' && arme.data.munition <= 0 ) {
if ( arme.type == 'tir' && arme.data.munition <= 0 ) {
ui.notifications.warn("Vous n'avez plus de munitions avec cette arme.");
return;
}