-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMonsterBuff.h
196 lines (195 loc) · 9.75 KB
/
MonsterBuff.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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
#pragma once
using namespace std;
using namespace loader;
namespace MonsterBuff {
struct MonsterBuffState {
float StateValue = 0;
float MaxStateValue = 0;
float RecoveryValue = 0;
float MaxRecoveryValue = 0;
MonsterBuffState(float StateValue = 0, float MaxStateValue = 0, float RecoveryValue = 0, float MaxRecoveryValue = 0)
:StateValue(StateValue), MaxStateValue(MaxStateValue), RecoveryValue(RecoveryValue), MaxRecoveryValue(MaxRecoveryValue){
};
};
namespace BuffPtr {
//撤退(撤出地图)
static int Retrea = 0x1BD00;
//垂涎
static int Covet = 0x1BCF8;
//眩晕
static int Dizziness = 0x1BC78;
//麻痹
static int Paralysis = 0x1BC50;
//睡眠
static int Sleep = 0x1BC58;
//麻醉
static int Anesthesia = 0x1BC70;
//中毒
static int Poisoning = 0x1bc48;
//骑乘
static int Ride = 0x1bc68;
//骑乘倒地
static int Ridedowna = 0x1bc98;
//减气
static int Reducebreath = 0x1bc70;
//爆破
static int Explode = 0x1bc60;
//闪光
static int Flicker = 0x1bc88;
//闪光G
static int FlickerG = 0x1bc90;
//烟雾
static int Smoke = 0x1bcd8;
//异臭
static int Foreignodor = 0x1bca0;
//落穴
static int Traphole = 0x1bcb8;
//麻痹陷阱
static int Stasistrap = 0x1bcb0;
}
static MonsterBuffState GetMonsterBuffState(void* monster,string buff) {
if (monster != nullptr) {
if (buff == "Retrea") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Retrea);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178),*offsetPtr<float>(buffPtr, 0x188),*offsetPtr<float>(buffPtr, 0x1b8),*offsetPtr<float>(buffPtr, 0x15c));}
}
if (buff == "Covet") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Covet);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Dizziness") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Dizziness);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Paralysis") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Paralysis);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Sleep") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Sleep);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Anesthesia") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Anesthesia);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Poisoning") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Poisoning);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Ride") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Ride);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Ridedowna") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Ridedowna);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Reducebreath") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Reducebreath);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Explode") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Explode);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Flicker") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Flicker);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "FlickerG") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::FlickerG);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Smoke") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Smoke);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Foreignodor") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Foreignodor);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Traphole") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Traphole);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
if (buff == "Stasistrap") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Stasistrap);
if (buffPtr != nullptr) { return MonsterBuffState(*offsetPtr<float>(buffPtr, 0x178), *offsetPtr<float>(buffPtr, 0x188), *offsetPtr<float>(buffPtr, 0x1b8), *offsetPtr<float>(buffPtr, 0x15c)); }
}
}
return MonsterBuffState();
}
static void SetMonsterBuffState(void* monster, string buff) {
if (monster != nullptr) {
if (buff == "Retrea") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Retrea);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Covet") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Covet);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Dizziness") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Dizziness);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Paralysis") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Paralysis);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Sleep") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Sleep);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Anesthesia") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Anesthesia);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Poisoning") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Poisoning);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Ride") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Ride);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Ridedowna") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Ridedowna);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Reducebreath") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Reducebreath);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Explode") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Explode);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Flicker") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Flicker);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "FlickerG") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::FlickerG);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Smoke") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Smoke);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Foreignodor") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Foreignodor);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Traphole") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Traphole);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
if (buff == "Stasistrap") {
void* buffPtr = *offsetPtr<void*>(monster, BuffPtr::Stasistrap);
if (buffPtr != nullptr) { *offsetPtr<float>(buffPtr, 0x178) = *offsetPtr<float>(buffPtr, 0x188); }
}
}
}
}