Fix: soins d'un joueur à l'autre
Les données dans rollData ne pouvaient pas être serialisées
This commit is contained in:
+5
-1
@@ -1,5 +1,9 @@
|
|||||||
# 13.0
|
# 13.0
|
||||||
|
|
||||||
|
## 13.0.30 - Le pansement d'Illysis
|
||||||
|
|
||||||
|
- les soins d'un joueur à l'autre fonctionne de nouveau
|
||||||
|
|
||||||
## 13.0.29 - Le tricorne d'Illysis
|
## 13.0.29 - Le tricorne d'Illysis
|
||||||
|
|
||||||
- gestion des attaques avec jets V2 depuis l'onglet de combat
|
- gestion des attaques avec jets V2 depuis l'onglet de combat
|
||||||
@@ -13,7 +17,7 @@
|
|||||||
- L'appel au moral dans le tchat ne déplace plus les boutons d'appel à la chance
|
- L'appel au moral dans le tchat ne déplace plus les boutons d'appel à la chance
|
||||||
- Correction d'apparence V13
|
- Correction d'apparence V13
|
||||||
- la fenêtre de choix des status utilisés est affichée correctement
|
- la fenêtre de choix des status utilisés est affichée correctement
|
||||||
- la fenêtrre d'astrologir MJ est affichée correctement
|
- la fenêtre d'astrologie MJ est affichée correctement
|
||||||
|
|
||||||
## 13.0.27 - Les lunettes d'Illysis
|
## 13.0.27 - Les lunettes d'Illysis
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -2504,9 +2504,9 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
const blessure = blesse.blessuresASoigner().find(it => it.id == blessureId);
|
const blessure = blesse.blessuresASoigner().find(it => it.id == blessureId);
|
||||||
if (blessure) {
|
if (blessure) {
|
||||||
if (!blessure.system.premierssoins.done) {
|
if (!blessure.system.premierssoins.done) {
|
||||||
const tache = await this.getTacheBlessure(blesse, blessure);
|
const tacheId = (await this.getTacheBlessure(blesse, blessure))?.id
|
||||||
return await this.rollTache(tache.id, {
|
return await this.rollTache(tacheId, {
|
||||||
callbacks: [async r => await blesse.onRollTachePremiersSoins(blessureId, r, this.id)],
|
callbacks: [async r => await blesse.callbackPremiersSoins(blessureId, r, this.id)],
|
||||||
title: 'Premiers soins', forced: true
|
title: 'Premiers soins', forced: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -179,19 +179,24 @@ export class RdDBaseActorSang extends RdDBaseActorReve {
|
|||||||
return result
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
async onRollTachePremiersSoins(blessureId, rollData, soigneurId) {
|
async callbackPremiersSoins(blessureId, rollData, soigneurId) {
|
||||||
|
await this.onRollTachePremiersSoins(blessureId,
|
||||||
|
rollData.v2 ? rollData.current.tache.tache : rollData.tache,
|
||||||
|
rollData.rolled.isETotal,
|
||||||
|
soigneurId)
|
||||||
|
}
|
||||||
|
async onRollTachePremiersSoins(blessureId, tache, isETotal, soigneurId) {
|
||||||
if (!this.isOwner) {
|
if (!this.isOwner) {
|
||||||
return RdDBaseActor.remoteActorCall({
|
return RdDBaseActor.remoteActorCall({
|
||||||
tokenId: this.token?.id,
|
tokenId: this.token?.id,
|
||||||
actorId: this.id,
|
actorId: this.id,
|
||||||
method: 'onRollTachePremiersSoins', args: [blessureId, rollData, soigneurId]
|
method: 'onRollTachePremiersSoins', args: [blessureId, tache, isETotal, soigneurId]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const blessure = this.getItem(blessureId, 'blessure')
|
const blessure = this.getItem(blessureId, 'blessure')
|
||||||
if (blessure && !blessure.system.premierssoins.done) {
|
if (blessure && !blessure.system.premierssoins.done) {
|
||||||
const tache = rollData.v2 ? rollData.current.tache.tache : rollData.tache
|
if (isETotal) {
|
||||||
if (rollData.rolled.isETotal) {
|
|
||||||
await blessure.update({
|
await blessure.update({
|
||||||
'system.difficulte': blessure.system.difficulte - 1,
|
'system.difficulte': blessure.system.difficulte - 1,
|
||||||
'system.premierssoins.tache': Math.max(0, tache.system.points_de_tache_courant)
|
'system.premierssoins.tache': Math.max(0, tache.system.points_de_tache_courant)
|
||||||
|
|||||||
Reference in New Issue
Block a user