fix: pakcet stubs for now

This commit is contained in:
cha0s 2019-09-30 15:35:47 -05:00
parent 96953bb6a9
commit 8611d5f08e
4 changed files with 47 additions and 39 deletions

View File

@ -1,18 +1,20 @@
// export class DamagePacket extends EntityPacket {
import {Packet} from '@avocado/net';
// static get schema() {
// const schema = super.schema;
// schema.data.damages = [
// {
// amount: 'varuint',
// damageSpec: {
// affinity: 'uint8',
// },
// from: 'uint32',
// isDamage: 'bool',
// },
// ];
// return schema;
// }
export class DamagePacket extends Packet {
// }
static get schema() {
const schema = super.schema;
schema.data.damages = [
{
amount: 'varuint',
damageSpec: {
affinity: 'uint8',
},
from: 'uint32',
isDamage: 'bool',
},
];
return schema;
}
}

View File

@ -1,10 +1,12 @@
// export class TraitItemQtyPacket extends EntityPacket {
import {Packet} from '@avocado/net';
// static get schema() {
// const schema = super.schema;
// schema.data.slotIndex = 'uint16';
// schema.data.qty = 'uint16';
// return schema;
// }
export class TraitItemQtyPacket extends Packet {
// }
static get schema() {
const schema = super.schema;
schema.data.slotIndex = 'uint16';
schema.data.qty = 'uint16';
return schema;
}
}

View File

@ -1,10 +1,12 @@
// export class TraitItemSwapPacket extends EntityPacket {
import {Packet} from '@avocado/net';
// static get schema() {
// const schema = super.schema;
// schema.data.firstSlotIndex = 'uint16';
// schema.data.secondSlotIndex = 'uint16';
// return schema;
// }
export class TraitItemSwapPacket extends Packet {
// }
static get schema() {
const schema = super.schema;
schema.data.firstSlotIndex = 'uint16';
schema.data.secondSlotIndex = 'uint16';
return schema;
}
}

View File

@ -1,9 +1,11 @@
// export class TraitPlantPacket extends EntityPacket {
import {Packet} from '@avocado/net';
// static get schema() {
// const schema = super.schema;
// schema.data.growthStage = 'uint8';
// return schema;
// }
export class TraitPlantPacket extends Packet {
// }
static get schema() {
const schema = super.schema;
schema.data.growthStage = 'uint8';
return schema;
}
}