Fix encaissement par joueur

This commit is contained in:
2022-04-08 23:42:01 +02:00
parent 38025666e9
commit 477c86db0e
5 changed files with 78 additions and 60 deletions

View File

@ -513,7 +513,7 @@ export class BoLActor extends Actor {
async manageHealthState() {
let hpID = "lastHP" + this.id
let lastHP = await this.getFlag("world", hpID)
if (lastHP != this.data.data.resources.hp.value) {
if (lastHP != this.data.data.resources.hp.value && this.isOwner ) {
await this.setFlag("world", hpID, this.data.data.resources.hp.value)
if (this.data.data.resources.hp.value <= 0) {
ChatMessage.create({