forked from sstokic-tgm/Gladiatorcheatz-v2.1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NetMngr.hpp
27 lines (20 loc) · 772 Bytes
/
NetMngr.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
#pragma once
#include <unordered_map>
#include "misc/Recv.hpp"
#include "Singleton.hpp"
class NetMngr : public Singleton<NetMngr>
{
public:
void init();
int getOffs(const char *tableName, const char *propName);
bool hookProp(const char *tableName, const char *propName, RecvVarProxyFn func);
bool hookProp(const char *tableName, const char *propName, RecvVarProxyFn func, RecvVarProxyFn &orig);
void dump();
private:
std::unordered_map<std::string, RecvTable*> tables;
int getProp(const char *tableName, const char *propName, RecvProp **prop = 0);
int getProp(RecvTable *recvTable, const char *propName, RecvProp **prop = 0);
RecvTable *getTable(const char *tableName);
void dumpTable(RecvTable *table, std::string tabs);
std::string type2str(Type t);
};