WIP: перед введенимем класса Fighter.php
This commit is contained in:
@@ -78,13 +78,11 @@ if (!isset($CRON_CORE) && $u->info['online'] < time() - 30) {
|
||||
|
||||
$error = fn(string $str): string => '<div style="color: red; text-align: center; font-weight: bold;">' . $str . '</div>';
|
||||
|
||||
require_once 'log_text.php';
|
||||
$btl = new Battle();
|
||||
require_once('log_text.php');
|
||||
$btl->is = $u->is;
|
||||
$btl->items = $u->items;
|
||||
$btl->info = $btl->battleInfo($u->info['battle']);
|
||||
$isBattle = $btl->initRefresh($u);
|
||||
|
||||
if (!isset($btl->info['id'])) {
|
||||
if (!$isBattle) {
|
||||
if ($u->info['battle'] == -1) {
|
||||
//завершаем поединок
|
||||
Db::sql('update users set battle = 0, online = unix_timestamp() where id = ?', [$u->info['id']]);
|
||||
|
||||
Reference in New Issue
Block a user