Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.73 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include "Packet.h"
  4. #include <string>
  5. #include <vector>
  6.  
  7. class TextPacket : public Packet {
  8. public:
  9.     enum class TextPacketType : unsigned char {
  10.         RAW, CHAT, TRANSLATION, POPUP, JUKEBOX_POPUP, TIP, SYSTEM, WHISPER, ANNOUNCEMENT
  11.     };
  12.  
  13.     TextPacketType type;
  14.     std::string name, message;
  15.     std::vector<std::string> vec;
  16.     bool translated;
  17.     std::string xuid, unk48;
  18.  
  19.     static TextPacket createRaw(std::string const &);
  20.     TextPacket(unsigned char playerSubIndex) : Packet(playerSubIndex) {}
  21.  
  22.     virtual void *getId() const;
  23.     virtual void *getName() const;
  24.     virtual void *write(BinaryStream &) const;
  25.     virtual void *read(BinaryStream &);
  26.     virtual void *handle(NetworkIdentifier const &, NetEventCallback &) const;
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement