v10/v11 compatibility

This commit is contained in:
LeRatierBretonnien 2023-05-25 07:43:46 +02:00
parent 6aa63f9a98
commit e504427dbb
2 changed files with 13 additions and 19 deletions

View File

@ -129,7 +129,7 @@ export class MournbladeUtility {
let actor = MournbladeUtility.getActorFromRollData(rollData) let actor = MournbladeUtility.getActorFromRollData(rollData)
await actor.setPredilectionUsed(rollData.competence._id, predIdx) await actor.setPredilectionUsed(rollData.competence._id, predIdx)
rollData.competence = duplicate(actor.getCompetence(rollData.competence._id)) rollData.competence = duplicate(actor.getCompetence(rollData.competence._id))
MournbladeUtility.rollMournblade(rollData) await MournbladeUtility.rollMournblade(rollData)
}) })
} }
@ -224,7 +224,6 @@ export class MournbladeUtility {
/* -------------------------------------------- */ /* -------------------------------------------- */
static onSocketMesssage(msg) { static onSocketMesssage(msg) {
//console.log("SOCKET MESSAGE", msg.name, game.user.character.id, msg.data.defenderId);
if (msg.name == "msg_update_defense_state") { if (msg.name == "msg_update_defense_state") {
this.updateDefenseState(msg.data.defenderId, msg.data.rollId); this.updateDefenseState(msg.data.defenderId, msg.data.rollId);
} }
@ -346,7 +345,7 @@ export class MournbladeUtility {
let myRoll = new Roll(rollData.diceFormula).roll({ async: false }) let myRoll = new Roll(rollData.diceFormula).roll({ async: false })
await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode")) await this.showDiceSoNice(myRoll, game.settings.get("core", "rollMode"))
rollData.roll = myRoll rollData.roll = duplicate(myRoll)
rollData.diceResult = myRoll.terms[0].results[0].result rollData.diceResult = myRoll.terms[0].results[0].result
console.log(">>>> ", myRoll) console.log(">>>> ", myRoll)
@ -373,7 +372,7 @@ export class MournbladeUtility {
let bonusRoll = new Roll(rollData.bonusFormula).roll({ async: false }) let bonusRoll = new Roll(rollData.bonusFormula).roll({ async: false })
await this.showDiceSoNice(bonusRoll, game.settings.get("core", "rollMode")); await this.showDiceSoNice(bonusRoll, game.settings.get("core", "rollMode"));
rollData.bonusRoll = bonusRoll rollData.bonusRoll = duplicate(bonusRoll)
rollData.finalResult += rollData.bonusRoll.total rollData.finalResult += rollData.bonusRoll.total

View File

@ -1,7 +1,7 @@
{ {
"id": "fvtt-mournblade", "id": "fvtt-mournblade",
"description": "Mournblade RPG for FoundryVTT", "description": "Mournblade RPG for FoundryVTT",
"version": "10.0.17", "version": "11.0.0",
"authors": [ "authors": [
{ {
"name": "Uberwald/LeRatierBretonnien", "name": "Uberwald/LeRatierBretonnien",
@ -23,7 +23,7 @@
"gridUnits": "m", "gridUnits": "m",
"license": "LICENSE.txt", "license": "LICENSE.txt",
"manifest": "https://www.uberwald.me/gitea/public/fvtt-mournblade/raw/branch/v10/system.json", "manifest": "https://www.uberwald.me/gitea/public/fvtt-mournblade/raw/branch/v10/system.json",
"download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-10.0.17.zip", "download": "https://www.uberwald.me/gitea/public/fvtt-mournblade/archive/fvtt-mournblade-11.0.0.zip",
"packs": [ "packs": [
{ {
"type": "Item", "type": "Item",
@ -31,7 +31,6 @@
"name": "skills", "name": "skills",
"path": "packs/skills.db", "path": "packs/skills.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -40,7 +39,6 @@
"name": "armes", "name": "armes",
"path": "packs/armes.db", "path": "packs/armes.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -49,7 +47,6 @@
"name": "protection", "name": "protection",
"path": "packs/protection.db", "path": "packs/protection.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -58,7 +55,6 @@
"name": "equipement", "name": "equipement",
"path": "packs/equipement.db", "path": "packs/equipement.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -67,7 +63,6 @@
"name": "dons", "name": "dons",
"path": "packs/dons.db", "path": "packs/dons.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -76,7 +71,6 @@
"name": "origines", "name": "origines",
"path": "packs/origines.db", "path": "packs/origines.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -85,7 +79,6 @@
"name": "heritages", "name": "heritages",
"path": "packs/heritages.db", "path": "packs/heritages.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -94,7 +87,6 @@
"name": "metiers", "name": "metiers",
"path": "packs/metiers.db", "path": "packs/metiers.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -103,7 +95,6 @@
"name": "tendances", "name": "tendances",
"path": "packs/tendances.db", "path": "packs/tendances.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -112,7 +103,9 @@
"name": "traits-chaotiques", "name": "traits-chaotiques",
"path": "packs/traits-chaotiques.db", "path": "packs/traits-chaotiques.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": true, "ownership": {
"PLAYER": "NONE"
},
"flags": {} "flags": {}
}, },
{ {
@ -121,7 +114,6 @@
"name": "runes", "name": "runes",
"path": "packs/runes.db", "path": "packs/runes.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": false,
"flags": {} "flags": {}
}, },
{ {
@ -130,7 +122,9 @@
"name": "tables", "name": "tables",
"path": "packs/tables.db", "path": "packs/tables.db",
"system": "fvtt-mournblade", "system": "fvtt-mournblade",
"private": true, "ownership": {
"PLAYER": "NONE"
},
"flags": {} "flags": {}
} }
], ],
@ -145,6 +139,7 @@
"background": "systems/fvtt-mournblade/assets/ui/fond_mournblade.webp", "background": "systems/fvtt-mournblade/assets/ui/fond_mournblade.webp",
"compatibility": { "compatibility": {
"minimum": "10", "minimum": "10",
"verified": "10.288" "maximum": "11",
"verified": "11"
} }
} }