forked from sstokic-tgm/Gladiatorcheatz-Public
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNetMngr.hpp
63 lines (47 loc) · 1.28 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma once
#include <unordered_map>
#include "XorStr.hpp"
#include "BaseClientDll.hpp"
class DVariant
{
public:
union
{
float m_Float;
long m_Int;
char *m_pString;
void *m_pData;
float m_Vector[3];
};
};
class PrimitiProxyData
{
public:
const PrimitiImovina *m_pRecvProp;
DVariant m_Value;
int m_iElement;
int m_ObjectID;
};
typedef void(*PrimitiVarProxyFn)(const PrimitiProxyData *pData, void *pStruct, void *pOut);
namespace NetMngr
{
class Mngr
{
public:
~Mngr() { this->tabelle.clear(); }
void init();
int getOffs(const char *tabellaIme, const char *imovIme);
bool hookProp(const char *tabellaIme, const char *imovIme, PrimitiVarProxyFn func);
bool hookProp(const char *tabellaIme, const char *imovIme, PrimitiVarProxyFn func, PrimitiVarProxyFn &orig);
void dump();
private:
std::unordered_map<std::string, PrimitiTabella*> tabelle;
int getImov(const char *tabellaIme, const char *imovIme, PrimitiImovina **imov = 0);
int getImov(PrimitiTabella *primitiTabella, const char *imovIme, PrimitiImovina **imov = 0);
PrimitiTabella *getTabella(const char *tabellaIme);
void dumpTabella(PrimitiTabella *tabella, std::string tabs);
std::string type2str(Type t);
};
}
extern NetMngr::Mngr *netMngr;
//extern void __cdecl print(const char * format, ...);