Various fixes - WIP

This commit is contained in:
2022-05-01 00:46:24 +02:00
parent 580fdb996b
commit d83fd27193
3 changed files with 27 additions and 26 deletions

View File

@ -325,8 +325,8 @@ export class RdDActorSheet extends ActorSheet {
// Roll Weapon1
html.find('.arme-label a').click(async event => {
let arme = this._getEventArmeCombat(event);
this.actor.rollArme(duplicate(arme));
let arme = this._getEventArmeCombat(event)
this.actor.rollArme(duplicate(arme))
});
// Initiative pour l'arme
html.find('.arme-initiative a').click(async event => {
@ -517,6 +517,7 @@ export class RdDActorSheet extends ActorSheet {
const li = $(event.currentTarget)?.parents(".item")
let armeName = li.data("arme-name")
let compName = li.data('competence-name')
console.log("Searching for", armeName, compName)
const arme = this.armesList.find(a => a.name == armeName && a.system.competence == compName)
if (!arme) {
return { name: armeName, data: { competence: compName } }