Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "../../types/NetworkIdentifier.h"
  4.  
  5. struct BinaryStream;
  6. struct NetEventCallback {};
  7.  
  8. struct Packet {
  9.     int unk_4 = 2, unk_8 = 1;
  10.     unsigned char playerSubIndex = 0;
  11.     void *ptr;
  12.  
  13.     Packet(unsigned char playerSubIndex) : playerSubIndex(playerSubIndex) {}
  14.     Packet(Packet const &packet) : unk_4(packet.unk_4), unk_8(packet.unk_8) {}
  15.     virtual ~Packet() = 0;
  16.  
  17.     virtual void *getId() const = 0;
  18.     virtual void *getName() const = 0;
  19.     virtual void *write(BinaryStream &) const = 0;
  20.     virtual void *read(BinaryStream &) = 0;
  21.     virtual void *handle(NetworkIdentifier const &, NetEventCallback &) const = 0;
  22.     virtual bool disallowBatching() const;
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement