WIP: перед введенимем класса Fighter.php

This commit is contained in:
2024-01-06 00:14:35 +02:00
parent 07f905ef64
commit a2c658166d
67 changed files with 5555 additions and 7135 deletions

View File

@@ -1,4 +1,9 @@
<?php
// я ебу, архивы поединков используют динамически-генерируемые логи из шаблона на лету
// вместо того чтобы хранить тупо статический текст
// сколько ещё открытий чудных?
// мораль: перед удалением проверить кто и где вызывает файл.
$log_text = [];
$log_text[0] = []; //для муж.

View File

@@ -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']]);

View File

@@ -86,12 +86,11 @@ if (isset($CRON_CORE) && (isset($_POST['atack'], $_POST['block']) || (isset($_PO
) . "' WHERE `id`='" . $u->info['id'] . "' LIMIT 1"
);
}
$btl = new Battle();
require_once('log_text.php');
$btl->is = $u->is;
$btl->items = $u->items;
$btl->info = $btl->battleInfo($u->info['battle']);
if (!isset($btl->info['id'])) {
$btl = new Battle();
$isBattle = $btl->initRefresh($u);
if (!$isBattle) {
if ($u->info['battle'] == -1) {
//завершаем поединок
$upd = mysql_query(