humus-old/common/combat/damage.packet.js

22 lines
349 B
JavaScript
Raw Normal View History

2019-09-30 15:35:47 -05:00
import {Packet} from '@avocado/net';
2019-04-28 22:35:20 -05:00
2019-09-30 15:35:47 -05:00
export class DamagePacket extends Packet {
2019-04-28 22:35:20 -05:00
2019-09-30 15:35:47 -05:00
static get schema() {
2019-09-30 21:12:32 -05:00
return {
...super.schema,
data: [
{
amount: 'varuint',
damageSpec: {
affinity: 'uint8',
},
from: 'uint32',
isDamage: 'bool',
2019-09-30 15:35:47 -05:00
},
2019-09-30 21:12:32 -05:00
]
}
2019-09-30 15:35:47 -05:00
}
}