Замена Battle->add_log() на Log::add().

This commit is contained in:
2024-02-09 19:28:32 +02:00
parent 88aeb4a912
commit 8af1a5114a
11 changed files with 74 additions and 61 deletions
+11 -9
View File
@@ -1,4 +1,7 @@
<?php
use Battle\Log;
if (!defined('GAME')) {
die();
}
@@ -54,7 +57,7 @@ if ($pl['id'] == 189) {
$btl->users[$btl->uids[$u->info['enemy']]]['priems_z'] = $pz;
unset($pz);
mysql_query('UPDATE `stats` SET `priems_z` = "' . $btl->users[$btl->uids[$u->info['enemy']]]['priems_z'] . '" WHERE `id` = "' . $u->info['enemy'] . '" LIMIT 1');
$btl->add_log($mas1);
Log::add($mas1);
$pz[(int)$id] = 1;
}
} elseif ($pl['id'] == 227) {
@@ -112,7 +115,7 @@ if ($pl['id'] == 189) {
$btl->users[$btl->uids[$u->info['enemy']]]['priems_z'] = $pz;
unset($pz);
mysql_query('UPDATE `stats` SET `priems_z` = "' . $btl->users[$btl->uids[$u->info['enemy']]]['priems_z'] . '" WHERE `id` = "' . $u->info['enemy'] . '" LIMIT 1');
$btl->add_log($mas1);
Log::add($mas1);
$pz[(int)$id] = 1;
}
} elseif ($pl['priem']['id'] == 226) {
@@ -142,7 +145,7 @@ if ($pl['id'] == 189) {
$vLog = 'time1=' . time() . '||s1=' . $btl->users[$btl->uids[$u->info['id']]]['sex'] . '||t1=' . $btl->users[$btl->uids[$u->info['id']]]['team'] . '||login1=' . $btl->users[$btl->uids[$u->info['id']]]['login'] . '||s2=' . $btl->users[$btl->uids[$this->ue['id']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$this->ue['id']]]['team'] . '||login2=' . $btl->users[$btl->uids[$this->ue['id']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; на персонажа {u2}.';
$btl->add_log($mas1);
Log::add($mas1);
$pz[(int)$id] = 1;
unset($vLog, $mas1);
}
@@ -211,7 +214,7 @@ if ($pl['id'] == 189) {
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. <b><font color=#006699>' . $hp . '</font></b> [' . floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']) . '/' . $btl->stats[$btl->uids[$u->info['id']]]['hpAll'] . ']';
$btl->add_log($mas1);
Log::add($mas1);
$btl->users[$btl->uids[$u->info['id']]]['hpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['hpNow'];
$u->info['hpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['hpNow'];
@@ -245,7 +248,7 @@ if ($pl['id'] == 189) {
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. <b><font color=#006699>' . $hp . '</font></b> [' . floor($btl->stats[$btl->uids[$u->info['id']]]['hpNow']) . '/' . $btl->stats[$btl->uids[$u->info['id']]]['hpAll'] . ']';
$btl->add_log($mas1);
Log::add($mas1);
$btl->users[$btl->uids[$u->info['id']]]['hpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['hpNow'];
$u->info['hpNow'] = $btl->stats[$btl->uids[$u->info['id']]]['hpNow'];
@@ -325,7 +328,7 @@ if ($pl['id'] == 189) {
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$u->info['enemy']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$u->info['enemy']]]['team'] . '||login2=' . $btl->users[$btl->uids[$u->info['enemy']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; на персонажа {u2}';
$btl->add_log($mas1);
Log::add($mas1);
$pz[(int)$id] = 1;
mysql_query('UPDATE `stats` SET `smena` = "-1" WHERE `id` = "' . $u->info['enemy'] . '" LIMIT 1');
} elseif ($pl['id'] == 46) {
@@ -334,7 +337,7 @@ if ($pl['id'] == 189) {
$vLog = 'time1=' . time() . '||s1=' . $u->info['sex'] . '||t1=' . $u->info['team'] . '||login1=' . $u->info['login'] . '||s2=' . $btl->users[$btl->uids[$this->ue['id']]]['sex'] . '||t2=' . $btl->users[$btl->uids[$this->ue['id']]]['team'] . '||login2=' . $btl->users[$btl->uids[$this->ue['id']]]['login'] . '';
$mas1 = ['time' => time(), 'battle' => $btl->i->id, 'id_hod' => ($btl->hodID + 1), 'text' => '', 'vars' => $vLog, 'zona1' => '', 'zonb1' => '', 'zona2' => '', 'zonb2' => '', 'type' => '1'];
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot;. (Новая цель: {u2})';
$btl->add_log($mas1);
Log::add($mas1);
$pz[(int)$id] = 1;
$u->info['enemy'] = $this->ue['id'];
mysql_query('UPDATE `stats` SET `enemy` = "' . $u->info['enemy'] . '" WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
@@ -427,7 +430,6 @@ if (isset($hpmin) && $hpmin > 0 && $u->info['enemy'] > 0) {
$hpmin = '--';
}
$mas1['text'] = '{tm1} {u1} {1x16x0} прием &quot;<b>' . $pl['name'] . '</b>&quot; и {1x5x1} по {u2}. <b><font color=#006699>' . $hpmin . '</font></b> [' . ceil($hp2) . '/' . $btl->stats[$btl->uids[$u->info['enemy']]]['hpAll'] . ']';
$btl->add_log($mas1);
Log::add($mas1);
$pz[(int)$id] = 1;
}
?>