21 lines
546 B
JavaScript
21 lines
546 B
JavaScript
/*
|
|
@Packet name AmmunitionChangeConfirmation
|
|
@Packet identifier 200
|
|
@Description Ammunition change confirmation
|
|
@Data pId
|
|
@Structure -
|
|
*/
|
|
|
|
module.exports = function (data) {
|
|
const packetLength = 3 + 1;
|
|
const buffer = new ArrayBuffer(packetLength);
|
|
const view = new DataView(buffer);
|
|
|
|
view.setUint8(0, 200);
|
|
view.setUint8(1, packetLength);
|
|
view.setUint8(2, data.typeID);
|
|
view.setUint8(3, data.id);
|
|
|
|
return buffer;
|
|
};
|