fix: each damage gets a locally unique ID

This commit is contained in:
cha0s 2019-04-19 12:16:51 -05:00
parent 3f8c9b6af3
commit 5501b172e0

View File

@ -14,6 +14,7 @@ export class Vulnerable extends Trait {
}
initialize() {
this.damageId = 0;
this.damageList = {};
this.locks = new Map();
if (hasGraphics) {
@ -92,6 +93,7 @@ export class Vulnerable extends Trait {
this.damageList[entity.instanceUuid] = [];
}
this.damageList[entity.instanceUuid].push({
id: this.damageId++,
isDamage,
amount,
damageSpec,