Initial commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
@Packet name EntityDie
|
||||
@Packet identifier 143
|
||||
@Description Sends the death information to the nearby players
|
||||
@Data pId, deadEntityTypeId, entityId, lastShotEntityTypeID, lastShotId
|
||||
@Structure -
|
||||
*/
|
||||
|
||||
module.exports = function (data) {
|
||||
const packetLength = 12 + 1;
|
||||
const buffer = new ArrayBuffer(packetLength);
|
||||
const view = new DataView(buffer);
|
||||
|
||||
view.setUint8(0, 143);
|
||||
view.setUint8(1, packetLength);
|
||||
view.setUint8(2, data.typeID);
|
||||
view.setUint32(3, data.targetID);
|
||||
view.setUint8(7, data.lastShotTypeID);
|
||||
view.setUint32(8, data.lastShotID);
|
||||
view.setUint8(12, data.targetEntityTypeID);
|
||||
|
||||
return buffer;
|
||||
};
|
||||
Reference in New Issue
Block a user