diff --git a/common/combat/damage.packet.js b/common/combat/damage.packet.js index a67165a..f1f7b8b 100644 --- a/common/combat/damage.packet.js +++ b/common/combat/damage.packet.js @@ -10,7 +10,7 @@ export class DamagePacket extends EntityPacket { damageSpec: { affinity: 'uint8', }, - from: 'string', + from: 'uint32', isDamage: 'bool', }, ]; diff --git a/common/combat/vulnerable.trait.js b/common/combat/vulnerable.trait.js index a98c919..56af30c 100644 --- a/common/combat/vulnerable.trait.js +++ b/common/combat/vulnerable.trait.js @@ -205,7 +205,7 @@ export class Vulnerable extends Trait { isDamage, amount, damageSpec, - from: entity.instanceUuid, + from: entity.numericUid, }; this.entity.emit('tookDamage', damage); } diff --git a/common/packets/self-entity.packet.js b/common/packets/self-entity.packet.js index 4408080..f0cdff7 100644 --- a/common/packets/self-entity.packet.js +++ b/common/packets/self-entity.packet.js @@ -5,7 +5,7 @@ export class SelfEntityPacket extends Packet { static get schema() { return { ...super.schema, - data: 'string', + data: 'uint32', }; } diff --git a/server/game.js b/server/game.js index 6ba23d1..d0837ac 100644 --- a/server/game.js +++ b/server/game.js @@ -59,7 +59,7 @@ export default class Game { this.room.addEntityToLayer(entity, 0); // Initial information. const packets = this.synchronizer.packetsForUpdate(true); - packets.unshift(new SelfEntityPacket(entity.instanceUuid)); + packets.unshift(new SelfEntityPacket(entity.numericUid)); entity.inform(packets); // Listen for events. socket.on('packet', this.createPacketListener(socket));