fix: ne pas afficher qu'on reçoit 0 deniers
This commit is contained in:
parent
7253b35084
commit
fa060a06a1
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user