Замена mysql_query
This commit is contained in:
parent
664c24ff1e
commit
c18241bda3
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Battle\Fighter;
|
||||
use Battle\Finish;
|
||||
use Battle\Helper;
|
||||
use Battle\Info;
|
||||
@ -124,138 +123,138 @@ class Battle
|
||||
$this->statnames->getBonus();
|
||||
$this->finish = new Finish($this);
|
||||
|
||||
$this->prm = [1 => new BattlePriem(act:1, typeOf:5),
|
||||
2 => new BattlePriem(act:2, typeOf:3),
|
||||
4 => new BattlePriem(act:2, typeOf:3),
|
||||
7 => new BattlePriem(act:1, typeOf:4),
|
||||
290 => new BattlePriem(act:1, typeOf:4),
|
||||
294 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
295 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
296 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
297 => new BattlePriem(act:2, typeOf:0, moment:3),
|
||||
298 => new BattlePriem(act:2, typeOf:3),
|
||||
141 => new BattlePriem(act:2, typeOf:4),
|
||||
147 => new BattlePriem(act:2, typeOf:4),
|
||||
148 => new BattlePriem(act:2, typeOf:4),
|
||||
149 => new BattlePriem(act:2, typeOf:4),
|
||||
150 => new BattlePriem(act:2, typeOf:4),
|
||||
142 => new BattlePriem(act:2, typeOf:4),
|
||||
144 => new BattlePriem(act:2, typeOf:4),
|
||||
146 => new BattlePriem(act:2, typeOf:4),
|
||||
145 => new BattlePriem(act:2, typeOf:4),
|
||||
8 => new BattlePriem(act:1, typeOf:1),
|
||||
9 => new BattlePriem(act:2, typeOf:3),
|
||||
10 => new BattlePriem(act:1, typeOf:1),
|
||||
11 => new BattlePriem(act:2, typeOf:3),
|
||||
45 => new BattlePriem(act:1, typeOf:4),
|
||||
47 => new BattlePriem(act:2, typeOf:2),
|
||||
48 => new BattlePriem(act:1, typeOf:1),
|
||||
49 => new BattlePriem(act:1, typeOf:1),
|
||||
138 => new BattlePriem(act:2, typeOf:3),
|
||||
140 => new BattlePriem(act:1, typeOf:4),
|
||||
193 => new BattlePriem(act:2, typeOf:3),
|
||||
204 => new BattlePriem(act:2, typeOf:0, moment:3),
|
||||
211 => new BattlePriem(act:1, typeOf:4),
|
||||
213 => new BattlePriem(act:1, typeOf:4),
|
||||
215 => new BattlePriem(act:1, typeOf:1),
|
||||
216 => new BattlePriem(act:2, typeOf:2),
|
||||
217 => new BattlePriem(act:2, typeOf:0, moment:3),
|
||||
219 => new BattlePriem(act:2, typeOf:3),
|
||||
220 => new BattlePriem(act:2, typeOf:0, moment:3),
|
||||
222 => new BattlePriem(act:2, typeOf:3),
|
||||
225 => new BattlePriem(act:1, typeOf:4),
|
||||
226 => new BattlePriem(act:1, typeOf:4),
|
||||
231 => new BattlePriem(act:2, typeOf:0, moment:3),
|
||||
234 => new BattlePriem(act:2, typeOf:4),
|
||||
235 => new BattlePriem(act:2, typeOf:3),
|
||||
342 => new BattlePriem(act:0, typeOf:0),
|
||||
343 => new BattlePriem(act:0, typeOf:0),
|
||||
237 => new BattlePriem(act:2, typeOf:3),
|
||||
239 => new BattlePriem(act:2, typeOf:3),
|
||||
240 => new BattlePriem(act:2, typeOf:5),
|
||||
21 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
73 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
74 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
75 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
76 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
77 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
78 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
79 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
22 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
80 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
81 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
82 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
83 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
84 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
36 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
85 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
86 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
87 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
88 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
89 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
90 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
23 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
70 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
71 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
72 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
269 => new BattlePriem(act:2, typeOf:9),
|
||||
276 => new BattlePriem(act:2, typeOf:9),
|
||||
277 => new BattlePriem(act:2, typeOf:9),
|
||||
270 => new BattlePriem(act:2, typeOf:5, typeSec:5),
|
||||
280 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
281 => new BattlePriem(act:2, typeOf:5),
|
||||
282 => new BattlePriem(act:2, typeOf:5),
|
||||
24 => new BattlePriem(act:2, typeOf:0, moment:3),
|
||||
210 => new BattlePriem(act:2, typeOf:8),
|
||||
209 => new BattlePriem(act:2, typeOf:8),
|
||||
208 => new BattlePriem(act:2, typeOf:8),
|
||||
207 => new BattlePriem(act:2, typeOf:8),
|
||||
206 => new BattlePriem(act:2, typeOf:8),
|
||||
284 => new BattlePriem(act:2, typeOf:8),
|
||||
175 => new BattlePriem(act:2, typeOf:8),
|
||||
176 => new BattlePriem(act:2, typeOf:8),
|
||||
177 => new BattlePriem(act:2, typeOf:8),
|
||||
178 => new BattlePriem(act:2, typeOf:8),
|
||||
179 => new BattlePriem(act:2, typeOf:8),
|
||||
42 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
121 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
122 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
123 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
124 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
125 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
249 => new BattlePriem(act:2, typeOf:4),
|
||||
248 => new BattlePriem(act:2, typeOf:4),
|
||||
251 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
252 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
273 => new BattlePriem(act:1, typeOf:4),
|
||||
286 => new BattlePriem(act:1, typeOf:4),
|
||||
287 => new BattlePriem(act:1, typeOf:4),
|
||||
288 => new BattlePriem(act:1, typeOf:4),
|
||||
255 => new BattlePriem(act:2, typeOf:8),
|
||||
337 => new BattlePriem(act:2, typeOf:5),
|
||||
33 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
56 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
57 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
58 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
59 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
60 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
245 => new BattlePriem(act:2, typeOf:9),
|
||||
327 => new BattlePriem(act:2, typeOf:0, moment:3),
|
||||
328 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
329 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
330 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
331 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
332 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
333 => new BattlePriem(act:2, typeOf:0, moment:3),
|
||||
334 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
335 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
299 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
300 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
301 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
302 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
303 => new BattlePriem(act:2, typeOf:4),
|
||||
304 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
305 => new BattlePriem(act:2, typeOf:0, moment:0, momentEnd:3),
|
||||
$this->prm = [1 => new BattlePriem(act: 1, typeOf: 5),
|
||||
2 => new BattlePriem(act: 2, typeOf: 3),
|
||||
4 => new BattlePriem(act: 2, typeOf: 3),
|
||||
7 => new BattlePriem(act: 1, typeOf: 4),
|
||||
290 => new BattlePriem(act: 1, typeOf: 4),
|
||||
294 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
295 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
296 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
297 => new BattlePriem(act: 2, typeOf: 0, moment: 3),
|
||||
298 => new BattlePriem(act: 2, typeOf: 3),
|
||||
141 => new BattlePriem(act: 2, typeOf: 4),
|
||||
147 => new BattlePriem(act: 2, typeOf: 4),
|
||||
148 => new BattlePriem(act: 2, typeOf: 4),
|
||||
149 => new BattlePriem(act: 2, typeOf: 4),
|
||||
150 => new BattlePriem(act: 2, typeOf: 4),
|
||||
142 => new BattlePriem(act: 2, typeOf: 4),
|
||||
144 => new BattlePriem(act: 2, typeOf: 4),
|
||||
146 => new BattlePriem(act: 2, typeOf: 4),
|
||||
145 => new BattlePriem(act: 2, typeOf: 4),
|
||||
8 => new BattlePriem(act: 1, typeOf: 1),
|
||||
9 => new BattlePriem(act: 2, typeOf: 3),
|
||||
10 => new BattlePriem(act: 1, typeOf: 1),
|
||||
11 => new BattlePriem(act: 2, typeOf: 3),
|
||||
45 => new BattlePriem(act: 1, typeOf: 4),
|
||||
47 => new BattlePriem(act: 2, typeOf: 2),
|
||||
48 => new BattlePriem(act: 1, typeOf: 1),
|
||||
49 => new BattlePriem(act: 1, typeOf: 1),
|
||||
138 => new BattlePriem(act: 2, typeOf: 3),
|
||||
140 => new BattlePriem(act: 1, typeOf: 4),
|
||||
193 => new BattlePriem(act: 2, typeOf: 3),
|
||||
204 => new BattlePriem(act: 2, typeOf: 0, moment: 3),
|
||||
211 => new BattlePriem(act: 1, typeOf: 4),
|
||||
213 => new BattlePriem(act: 1, typeOf: 4),
|
||||
215 => new BattlePriem(act: 1, typeOf: 1),
|
||||
216 => new BattlePriem(act: 2, typeOf: 2),
|
||||
217 => new BattlePriem(act: 2, typeOf: 0, moment: 3),
|
||||
219 => new BattlePriem(act: 2, typeOf: 3),
|
||||
220 => new BattlePriem(act: 2, typeOf: 0, moment: 3),
|
||||
222 => new BattlePriem(act: 2, typeOf: 3),
|
||||
225 => new BattlePriem(act: 1, typeOf: 4),
|
||||
226 => new BattlePriem(act: 1, typeOf: 4),
|
||||
231 => new BattlePriem(act: 2, typeOf: 0, moment: 3),
|
||||
234 => new BattlePriem(act: 2, typeOf: 4),
|
||||
235 => new BattlePriem(act: 2, typeOf: 3),
|
||||
342 => new BattlePriem(act: 0, typeOf: 0),
|
||||
343 => new BattlePriem(act: 0, typeOf: 0),
|
||||
237 => new BattlePriem(act: 2, typeOf: 3),
|
||||
239 => new BattlePriem(act: 2, typeOf: 3),
|
||||
240 => new BattlePriem(act: 2, typeOf: 5),
|
||||
21 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
73 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
74 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
75 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
76 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
77 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
78 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
79 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
22 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
80 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
81 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
82 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
83 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
84 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
36 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
85 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
86 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
87 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
88 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
89 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
90 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
23 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
70 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
71 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
72 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
269 => new BattlePriem(act: 2, typeOf: 9),
|
||||
276 => new BattlePriem(act: 2, typeOf: 9),
|
||||
277 => new BattlePriem(act: 2, typeOf: 9),
|
||||
270 => new BattlePriem(act: 2, typeOf: 5, typeSec: 5),
|
||||
280 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
281 => new BattlePriem(act: 2, typeOf: 5),
|
||||
282 => new BattlePriem(act: 2, typeOf: 5),
|
||||
24 => new BattlePriem(act: 2, typeOf: 0, moment: 3),
|
||||
210 => new BattlePriem(act: 2, typeOf: 8),
|
||||
209 => new BattlePriem(act: 2, typeOf: 8),
|
||||
208 => new BattlePriem(act: 2, typeOf: 8),
|
||||
207 => new BattlePriem(act: 2, typeOf: 8),
|
||||
206 => new BattlePriem(act: 2, typeOf: 8),
|
||||
284 => new BattlePriem(act: 2, typeOf: 8),
|
||||
175 => new BattlePriem(act: 2, typeOf: 8),
|
||||
176 => new BattlePriem(act: 2, typeOf: 8),
|
||||
177 => new BattlePriem(act: 2, typeOf: 8),
|
||||
178 => new BattlePriem(act: 2, typeOf: 8),
|
||||
179 => new BattlePriem(act: 2, typeOf: 8),
|
||||
42 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
121 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
122 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
123 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
124 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
125 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
249 => new BattlePriem(act: 2, typeOf: 4),
|
||||
248 => new BattlePriem(act: 2, typeOf: 4),
|
||||
251 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
252 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
273 => new BattlePriem(act: 1, typeOf: 4),
|
||||
286 => new BattlePriem(act: 1, typeOf: 4),
|
||||
287 => new BattlePriem(act: 1, typeOf: 4),
|
||||
288 => new BattlePriem(act: 1, typeOf: 4),
|
||||
255 => new BattlePriem(act: 2, typeOf: 8),
|
||||
337 => new BattlePriem(act: 2, typeOf: 5),
|
||||
33 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
56 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
57 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
58 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
59 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
60 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
245 => new BattlePriem(act: 2, typeOf: 9),
|
||||
327 => new BattlePriem(act: 2, typeOf: 0, moment: 3),
|
||||
328 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
329 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
330 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
331 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
332 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
333 => new BattlePriem(act: 2, typeOf: 0, moment: 3),
|
||||
334 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
335 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
299 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
300 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
301 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
302 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
303 => new BattlePriem(act: 2, typeOf: 4),
|
||||
304 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
305 => new BattlePriem(act: 2, typeOf: 0, moment: 0, momentEnd: 3),
|
||||
];
|
||||
|
||||
}
|
||||
@ -839,7 +838,7 @@ JS;
|
||||
}
|
||||
|
||||
if ($tw !== -1) {
|
||||
$this->finish->finishBattle(nl:10);
|
||||
$this->finish->finishBattle(nl: 10);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1038,7 +1037,8 @@ JS;
|
||||
} else {
|
||||
$this->i->setIzlomround($iz['round']);
|
||||
mysql_query(
|
||||
'UPDATE `battle` SET `izlomObrNow` = ' . $obr . ',`izlomObr` = `izlomObr` + ' . $obr . ',`timeout` = (`timeout`+5),`izlomRound` = "' . ($this->i->getIzlomround() + 1) . '",`izlomRoundSee` = `izlomRoundSee`+1 WHERE `id` = "' . $this->i->id . '" LIMIT 1'
|
||||
'UPDATE `battle` SET `izlomObrNow` = ' . $obr . ',`izlomObr` = `izlomObr` + ' . $obr . ',`timeout` = (`timeout`+5),`izlomRound` = "' . ($this->i->getIzlomround(
|
||||
) + 1) . '",`izlomRoundSee` = `izlomRoundSee`+1 WHERE `id` = "' . $this->i->id . '" LIMIT 1'
|
||||
);
|
||||
$this->stats[$this->uids[$u->info['id']]]['hpNow'] += $this->stats[$this->uids[$u->info['id']]]['hpAll'] * 0.25;
|
||||
$this->stats[$this->uids[$u->info['id']]]['mpNow'] += $this->stats[$this->uids[$u->info['id']]]['mpAll'] * 0.25;
|
||||
@ -4111,10 +4111,14 @@ JS;
|
||||
$this->ucleari[] = $uid;
|
||||
}
|
||||
|
||||
/**
|
||||
* Отправка в лог боя результата размена.
|
||||
* @param $id
|
||||
* @param $at
|
||||
* @return void
|
||||
*/
|
||||
private function addlogRazmen($id, $at): void
|
||||
{
|
||||
|
||||
|
||||
$dies = [
|
||||
1 => 0,
|
||||
2 => 0,
|
||||
@ -4217,23 +4221,13 @@ JS;
|
||||
if ($this->atacks[$id]['tpo' . $a] == 2) {
|
||||
$mas['text'] .= '{u1} потратил свой ход на магию.';
|
||||
} else {
|
||||
|
||||
if ($this->i->razdel == 0 && $this->i->dnId == 0 && $this->i->izlom == 0) {
|
||||
mysql_query(
|
||||
'INSERT INTO `battle_out` (`battle`,`uid1`,`uid2`,`time`,`out`) VALUES (
|
||||
"' . $this->i->id . '","' . $u1 . '","' . $u2 . '","' . time() . '","1"
|
||||
)'
|
||||
);
|
||||
Db::sql('insert into battle_out (time, battle, uid1, uid2, `out`) values (unix_timestamp(),?,?,?,1)', [$this->i->id, $u1, $u2]);
|
||||
}
|
||||
|
||||
if (isset($u1)) {
|
||||
$mas['text'] .= '{u1} пропустил свой ход.';
|
||||
//Проверка сброс туманок
|
||||
mysql_query(
|
||||
'UPDATE `eff_users` SET `delete` = "' . time(
|
||||
) . '" WHERE `uid` = "' . $u1 . '" AND `delete` = 0 AND `v1` = "priem" AND (`v2`=288 OR `v2`=287 OR `v2`=286 OR `v2`=273) LIMIT 1'
|
||||
);
|
||||
}
|
||||
$mas['text'] .= '{u1} пропустил свой ход.';
|
||||
//Cброс туманок
|
||||
Db::sql("delete from eff_users where uid = ? and v1 = 'priem' and v2 in (273,286,287,288) limit 1", [$u1]);
|
||||
}
|
||||
$mas['text'] = '{tm1} ' . $mas['text'];
|
||||
Log::add($mas);
|
||||
@ -4241,9 +4235,7 @@ JS;
|
||||
$j = 0;
|
||||
|
||||
while ($j < count($at[$a]['atack']) && $j < 8) {
|
||||
|
||||
$mas['text'] = '';
|
||||
|
||||
$wt = [
|
||||
21 => 4,
|
||||
22 => 5,
|
||||
@ -4254,7 +4246,6 @@ JS;
|
||||
26 => 22,
|
||||
];
|
||||
|
||||
|
||||
[$attackItem, $attackZone] = Log::getAttackTurnText($at[$a]['atack'][$j][0], $wt[$at[$a]['atack'][$j]['wt']]);
|
||||
$zone = "{zn2_{$at[$a]['atack'][$j][0]}}";
|
||||
|
||||
@ -4302,22 +4293,17 @@ JS;
|
||||
if ((!isset($this->stats[$this->uids[$u2]]['notravma']) || $this->stats[$this->uids[$u2]]['notravma'] == 0) && isset($at[$a]['atack'][$j]['yron']['travma']) && $at[$a]['atack'][$j]['yron']['travma'][0] > 0 && floor(
|
||||
$at[$a]['atack'][$j]['yron']['hp']
|
||||
) <= 0) {
|
||||
$tr_pl = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id`,`v1` FROM `eff_users` WHERE `id_eff` = 4 AND `uid` = "' . $u2 . '" AND `delete` = "0" ORDER BY `v1` DESC LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (!isset($tr_pl['id']) || $tr_pl['v1'] < 3) {
|
||||
$tr_pl = Db::getRow('select id, v1 from eff_users where id_eff = 4 and uid = ? order by v1 desc limit 1', [$u2]);
|
||||
|
||||
if (!isset($tr_pl['id']) || (int)$tr_pl['v1'] < 3) {
|
||||
//263
|
||||
if (isset($tr_pl['id'])) {
|
||||
$at[$a]['atack'][$j]['yron']['travma'][0] = rand(($tr_pl['v1'] + 1), 3);
|
||||
$at[$a]['atack'][$j]['yron']['travma'][0] = rand(((int)$tr_pl['v1'] + 1), 3);
|
||||
}
|
||||
$tr_pl2 = mysql_fetch_array(
|
||||
mysql_query(
|
||||
'SELECT `id` FROM `eff_users` WHERE `uid` = "' . $u2 . '" AND `delete` = "0" AND `name` LIKE "%Защита от травм%" LIMIT 1'
|
||||
)
|
||||
);
|
||||
if (!isset($tr_pl2['id']) && $at[$a]['atack'][$j]['yron']['travma'][0] <= 3) {
|
||||
|
||||
$hasInjuryImmunity = Db::getValue("select count(id) from eff_users where uid = ? and name like '%Защита от травм%'") > 0;
|
||||
|
||||
if (!$hasInjuryImmunity && $at[$a]['atack'][$j]['yron']['travma'][0] <= 3) {
|
||||
$mas['text'] = rtrim($mas['text'], '. ');
|
||||
$mas['text'] .= ', <span style="color: red;">нанеся противнику <strong>';
|
||||
if ($at[$a]['atack'][$j]['yron']['travma'][0] == 1) {
|
||||
@ -4497,26 +4483,30 @@ JS;
|
||||
//Персонаж 2 погиб от рук персонаж 1
|
||||
$this->spaCheck($this->stats[$this->uids[$u2]]['id']);
|
||||
}
|
||||
|
||||
//Записываем рейтинг
|
||||
//
|
||||
if ($this->i->type != 564 && $this->stats[$this->uids[$u1]]['inTurnir'] == 0 && $this->stats[$this->uids[$u2]]['inTurnir'] == 0 && $this->i->dnId == 0 && $this->i->izlom == 0) {
|
||||
//
|
||||
if (
|
||||
$this->i->type != 564 &&
|
||||
$this->stats[$this->uids[$u1]]['inTurnir'] == 0 &&
|
||||
$this->stats[$this->uids[$u2]]['inTurnir'] == 0 &&
|
||||
$this->i->dnId == 0 &&
|
||||
$this->i->izlom == 0
|
||||
) {
|
||||
if ($this->users[$this->uids[$u2]]['bot'] == 0) {
|
||||
mysql_query(
|
||||
'INSERT INTO `users_reting` (`uid`,`time`,`val`,`align`,`clan`) VALUES (
|
||||
"' . $u1 . '","' . time() . '","' . $rtng1 . '","' . $this->users[$this->uids[$u1]]['align'] . '","' . $this->users[$this->uids[$u1]]['clan'] . '")'
|
||||
Db::sql(
|
||||
'insert into users_reting (uid, time, val, align, clan) values (?,unix_timestamp(),?,?,?)',
|
||||
[$u1, $rtng1, $this->users[$this->uids[$u1]]['align'], $this->users[$this->uids[$u1]]['clan']]
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->users[$this->uids[$u1]]['bot'] == 0) {
|
||||
mysql_query(
|
||||
'INSERT INTO `users_reting` (`uid`,`time`,`val`,`align`,`clan`) VALUES (
|
||||
"' . $u2 . '","' . time() . '","' . $rtng2 . '","' . $this->users[$this->uids[$u2]]['align'] . '","' . $this->users[$this->uids[$u2]]['clan'] . '")'
|
||||
Db::sql(
|
||||
'insert into users_reting (uid, time, val, align, clan) values (?,unix_timestamp(),?,?,?)',
|
||||
[$u2, $rtng2, $this->users[$this->uids[$u2]]['align'], $this->users[$this->uids[$u2]]['clan']]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
@ -5182,7 +5172,7 @@ JS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $i
|
||||
* @param int $i
|
||||
* @return void
|
||||
*/
|
||||
private function addAnimalBuff(int $i): void
|
||||
|
Loading…
Reference in New Issue
Block a user