Merge branch 'v1.4-fixes' into 'v1.4'

V1.4 fixes

See merge request LeRatierBretonnien/foundryvtt-reve-de-dragon!278
This commit is contained in:
Leratier Bretonnien 2021-06-15 05:55:22 +00:00
commit 3fd49f4909
3 changed files with 9 additions and 5 deletions

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
@ -3590,7 +3594,7 @@ export class RdDActor extends Actor {
if (!vente.quantiteIllimite) {
if (vente.quantiteNbLots <= achat.nombreLots) {
ChatUtility.removeChatMessageId(chatMessageIdVente);
ChatUtility.removeChatMessageId(achat.chatMessageIdVente);
}
else {
vente["properties"] = new RdDItem(vente.item).getProprietes();

View File

@ -2,7 +2,7 @@
"name": "foundryvtt-reve-de-dragon",
"title": "Rêve de Dragon",
"description": "Rêve de Dragon RPG for FoundryVTT",
"version": "1.4.32",
"version": "1.4.33",
"manifestPlusVersion": "1.0.0",
"minimumCoreVersion": "0.8.0",
"compatibleCoreVersion": "0.8.99",

View File

@ -17,7 +17,7 @@
{{#if (gt tailleLot 1)}}
<span>Lots de: <span class="tailleLot">{{tailleLot}}</span></span><br>
{{/if}}
{{#if prixLot}}
{{#if (ne prixLot 0)}}
<span><strong>Prix {{#if (gt tailleLot 1)}}du lot {{else}}unitaire{{/if}}:
<span class="prixLot">{{prixLot}}</span> Sols</strong></span><br>
{{/if}}
@ -31,6 +31,6 @@
data-quantiteNbLots="{{quantiteNbLots}}"
data-quantiteIllimite="{{#if quantiteIllimite}}true{{else}}false{{/if}}"
data-prixLot="{{prixLot}}">
{{#if prixLot}}Acheter{{else}}Prendre{{/if}}</a>
{{#if (eq prixLot 0)}}Prendre{{else}}Acheter{{/if}}</a>
</span>
</div>