fix: ne pas afficher qu'on reçoit 0 deniers

This commit is contained in:
Vincent Vandemeulebrouck 2021-06-14 23:41:46 +02:00
parent 1c337576e2
commit b0a97d63ef

View File

@ -3495,13 +3495,17 @@ export class RdDActor extends Actor {
}
async ajouterDeniers(gain, fromActorId = undefined) {
gain = Number.parseInt(gain);
if (gain == 0){
return;
}
if (fromActorId && !game.user.isGM) {
RdDActor.remoteActorCall({ userId: Misc.connectedGMOrUser(), actorId: this.id, method: 'ajouterDeniers', args: [gain, fromActorId] });
}
else {
const fromActor = game.actors.get(fromActorId)
let fortune = this.getFortune();
fortune += Number(gain);
fortune += gain;
await this.optimizeArgent(fortune);
RdDAudio.PlayContextAudio("argent"); // Petit son