-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathProtocol.hpp
40 lines (36 loc) · 1.48 KB
/
Protocol.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#pragma once
#include "../Connection/PacketHandler.hpp"
class Player;
class Protocol {
public:
Buffer buffer;
Protocol(Player *owner);
virtual Buffer &addNode(unsigned int nodeId);
virtual Buffer &banPlayer(const std::string &playerNameOrIp);
virtual Buffer &clearAll();
virtual Buffer &clearOwned();
virtual Buffer &compressed(std::vector<unsigned char> &_Packet);
virtual Buffer &dks2(int _dks2);
virtual Buffer &login();
virtual Buffer &logout();
virtual Buffer &mobileData();
virtual Buffer &ping();
virtual Buffer &removeArrow();
virtual Buffer &requestCaptcha();
virtual Buffer &requestClientUpdate();
virtual Buffer &setBorder();
virtual Buffer &showArrow(const Vec2 &position, const std::string &playerName);
virtual Buffer &updateLeaderboardList();
virtual Buffer &updateLeaderboardRGB(const std::vector<float> &board);
virtual Buffer &updateLeaderboardText(const std::vector<std::string> &board);
virtual Buffer &updateNodes(const std::vector<e_ptr> &eatNodes, const std::vector<e_ptr> &updNodes,
const std::vector<e_ptr> &delNodes, const std::vector<e_ptr> &addNodes);
virtual Buffer &updateViewport(const Vec2 &position, float scale);
virtual Buffer &chatMessage(/**/);
virtual Buffer &drawLine(const Vec2 &position);
virtual Buffer &serverStat(const std::string &info);
virtual Buffer &auth(const std::string &str);
virtual ~Protocol();
protected:
Player *player = nullptr;
};