fix: each damage gets a locally unique ID
This commit is contained in:
parent
3f8c9b6af3
commit
5501b172e0
|
@ -14,6 +14,7 @@ export class Vulnerable extends Trait {
|
||||||
}
|
}
|
||||||
|
|
||||||
initialize() {
|
initialize() {
|
||||||
|
this.damageId = 0;
|
||||||
this.damageList = {};
|
this.damageList = {};
|
||||||
this.locks = new Map();
|
this.locks = new Map();
|
||||||
if (hasGraphics) {
|
if (hasGraphics) {
|
||||||
|
@ -92,6 +93,7 @@ export class Vulnerable extends Trait {
|
||||||
this.damageList[entity.instanceUuid] = [];
|
this.damageList[entity.instanceUuid] = [];
|
||||||
}
|
}
|
||||||
this.damageList[entity.instanceUuid].push({
|
this.damageList[entity.instanceUuid].push({
|
||||||
|
id: this.damageId++,
|
||||||
isDamage,
|
isDamage,
|
||||||
amount,
|
amount,
|
||||||
damageSpec,
|
damageSpec,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user