22 lines
609 B
JavaScript
22 lines
609 B
JavaScript
/*
|
|
@Packet name AttackAborted
|
|
@Packet identifier 141
|
|
@Description Sends the
|
|
@Data pId,
|
|
@Structure -
|
|
*/
|
|
|
|
module.exports = function (data) {
|
|
const packetLength = 11 + 1;
|
|
const buffer = new ArrayBuffer(packetLength);
|
|
const view = new DataView(buffer);
|
|
|
|
view.setUint8(0, 141);
|
|
view.setUint8(1, packetLength);
|
|
view.setUint8(2, data.authorTypeID);
|
|
view.setUint32(3, data.authorID);
|
|
view.setUint8(7, data.targetTypeID);
|
|
view.setUint32(8, data.targetID);
|
|
|
|
return buffer;
|
|
}; |