Initial commit
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
this one is for accepted members
|
||||
sent out to all the players that are near to the accepted player (to update the player's guild tag)
|
||||
*/
|
||||
|
||||
module.exports = function (data) {
|
||||
const packetLength = 6 + 1 + data.tag.byteLength;
|
||||
|
||||
const buffer = new ArrayBuffer(packetLength);
|
||||
const view = new DataView(buffer);
|
||||
|
||||
view.setUint8(0, 45);
|
||||
view.setUint8(1, packetLength);
|
||||
view.setUint32(2, data.playerID);
|
||||
|
||||
view.setUint8(6, data.tag.byteLength);
|
||||
new Uint8Array(buffer, 7).set(data.tag);
|
||||
|
||||
return buffer;
|
||||
};
|
||||
Reference in New Issue
Block a user