This repository has been archived by the owner on Jul 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
IClientEntity.h
130 lines (107 loc) · 3.74 KB
/
IClientEntity.h
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#pragma once
#define m_nIndex 0x64
#define m_nModelIndex 0x254
#define m_hOwner 0x45CC
#define m_hWeapon 0x45C8
#define m_lifeState 0x25B
#define m_hMyWeapons 0x49F8
#define m_hViewModel 0x4EFC
#define m_AttributeManager 0x4980
#define m_Item 0x40
#define m_iItemDefinitionIndex 0x1D0
#define m_iItemIDHigh 0x1E8
#define m_iAccountID 0x1F0
#define m_iEntityQuality 0x1D4
#define m_szCustomName 0x264
#define m_OriginalOwnerXuidLow 0x4D68
#define m_OriginalOwnerXuidHigh 0x4D6C
#define m_nFallbackPaintKit 0x4D70
#define m_nFallbackSeed 0x4D74
#define m_flFallbackWear 0x4D78
#define m_nFallbackStatTrak 0x4D7C
class IClientEntity {
public:
inline int GetIndex() {
return *(int*)((DWORD)this + m_nIndex);
}
};
class CBaseViewModel: public IClientEntity {
public:
inline int GetModelIndex() {
// DT_BaseViewModel -> m_nModelIndex
return *(int*)((DWORD)this + m_nModelIndex);
}
inline DWORD GetOwner() {
// DT_BaseViewModel -> m_hOwner
return *(PDWORD)((DWORD)this + m_hOwner);
}
inline DWORD GetWeapon() {
// DT_BaseViewModel -> m_hWeapon
return *(PDWORD)((DWORD)this + m_hWeapon);
}
inline void SetWeaponModel(const char* Filename, IClientEntity* Weapon) {
return CallVirtualFunction<void(__thiscall*)(void*, const char*, IClientEntity*)>(this, 241)(this, Filename, Weapon);
}
};
class CBasePlayer: public IClientEntity {
public:
inline BYTE GetLifeState() {
// DT_BasePlayer -> m_lifeState
return *(BYTE*)((DWORD)this + m_lifeState);
}
inline UINT* GetWeapons() {
// DT_BasePlayer -> m_hMyWeapons
return (UINT*)((DWORD)this + m_hMyWeapons);
}
inline CBaseViewModel* GetViewModel() {
// DT_BasePlayer -> m_hViewModel
return (CBaseViewModel*)g_EntityList->GetClientEntityFromHandle(*(PDWORD)(this + m_hViewModel));
}
};
class CBaseAttributableItem: public IClientEntity {
public:
inline int* GetItemDefinitionIndex() {
// DT_BaseAttributableItem -> m_AttributeManager -> m_Item -> m_iItemDefinitionIndex
return (int*)((DWORD)this + m_AttributeManager + m_Item + m_iItemDefinitionIndex);
}
inline int* GetItemIDHigh() {
// DT_BaseAttributableItem -> m_AttributeManager -> m_Item -> m_iItemIDHigh
return (int*)((DWORD)this + m_AttributeManager + m_Item + m_iItemIDHigh);
}
inline int* GetAccountID() {
// DT_BaseAttributableItem -> m_AttributeManager -> m_Item -> m_iAccountID
return (int*)((DWORD)this + m_AttributeManager + m_Item + m_iAccountID);
}
inline int* GetEntityQuality() {
// DT_BaseAttributableItem -> m_AttributeManager -> m_Item -> m_iEntityQuality
return (int*)((DWORD)this + m_AttributeManager + m_Item + m_iEntityQuality);
}
inline char* GetCustomName() {
// DT_BaseAttributableItem -> m_AttributeManager -> m_Item -> m_szCustomName
return (char*)((DWORD)this + m_AttributeManager + m_Item + m_szCustomName);
}
inline int* GetOriginalOwnerXuidLow() {
// DT_BaseAttributableItem -> m_OriginalOwnerXuidLow
return (int*)((DWORD)this + m_OriginalOwnerXuidLow);
}
inline int* GetOriginalOwnerXuidHigh() {
// DT_BaseAttributableItem -> m_OriginalOwnerXuidHigh
return (int*)((DWORD)this + m_OriginalOwnerXuidHigh);
}
inline int* GetFallbackPaintKit() {
// DT_BaseAttributableItem -> m_nFallbackPaintKit
return (int*)((DWORD)this + m_nFallbackPaintKit);
}
inline int* GetFallbackSeed() {
// DT_BaseAttributableItem -> m_nFallbackSeed
return (int*)((DWORD)this + m_nFallbackSeed);
}
inline float* GetFallbackWear() {
// DT_BaseAttributableItem -> m_flFallbackWear
return (float*)((DWORD)this + m_flFallbackWear);
}
inline int* GetFallbackStatTrak() {
// DT_BaseAttributableItem -> m_nFallbackStatTrak
return (int*)((DWORD)this + m_nFallbackStatTrak);
}
};