Часть логов теперь пишется в SQLITE, а не в текстовые файлы (#33). Проинициализирован класс Nick в свитках.
This commit is contained in:
12
cave.php
12
cave.php
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Battles\DressedItems;
|
||||
use Battles\GameLogs;
|
||||
use Battles\Template;
|
||||
|
||||
require_once 'functions.php';
|
||||
@@ -128,9 +130,9 @@ function battlewithbot($b, $name = '', $time = 3, $blood = 1, $group = 1, $battl
|
||||
}
|
||||
|
||||
if ($user1['invis'] == 1) {
|
||||
addlog($battleid, '<span class=date>' . date("H:i") . '</span> <b>невидимка</b> вмешался в поединок!<BR>');
|
||||
GameLogs::addBattleLog($battleid, '<span class=date>' . date("H:i") . '</span> <b>невидимка</b> вмешался в поединок!<BR>');
|
||||
} else {
|
||||
addlog($battleid, '<span class=date>' . date("H:i") . '</span> ' . Nick::id($user['id'])->short() . ' вмешался в поединок!<BR>');
|
||||
GameLogs::addBattleLog($battleid, '<span class=date>' . date("H:i") . '</span> ' . Nick::id($user['id'])->short() . ' вмешался в поединок!<BR>');
|
||||
}
|
||||
|
||||
mysql_query('UPDATE `battle` SET `teams` = \'' . serialize($battle) . '\', `t' . $ttt . '` = CONCAT(`t' . $ttt . '`,\';' . $user1['id'] . '\') WHERE `id` = ' . $battleid . ' LIMIT 1');
|
||||
@@ -185,7 +187,7 @@ function battlewithbot($b, $name = '', $time = 3, $blood = 1, $group = 1, $battl
|
||||
} else {
|
||||
$rr = "<b>" . Nick::id($user1['id'])->full(1) . "</b> и <b>" . Nick::id($botid1)->full(1) . "</b>";
|
||||
}
|
||||
addlog($battleid, "Часы показывали <span class=date>" . date("Y.m.d H.i") . "</span>, когда " . $rr . " бросили вызов друг другу. <BR>" . ($others ? "$others<BR>" : ""));
|
||||
GameLogs::addBattleLog($battleid, "Часы показывали <span class=date>" . date("Y.m.d H.i") . "</span>, когда " . $rr . " бросили вызов друг другу. <BR>" . ($others ? "$others<BR>" : ""));
|
||||
if (!$noredir) {
|
||||
header("Location: fbattle.php");
|
||||
}
|
||||
@@ -486,7 +488,7 @@ if (@$_GET['kill'] && $user['id'] == $user['caveleader'] && $_GET['kill'] != $us
|
||||
while ($rec = mysql_fetch_assoc($r)) {
|
||||
$slot = getslot($rec['id'], $usr);
|
||||
if ($slot) {
|
||||
$item = new \Battles\DressedItems($v['user']);
|
||||
$item = new DressedItems($v['user']);
|
||||
$item->undressItem($slot);
|
||||
}
|
||||
}
|
||||
@@ -898,7 +900,7 @@ if (@$_GET['exit']) {
|
||||
while ($rec = mysql_fetch_assoc($r)) {
|
||||
$slot = getslot($rec['id']);
|
||||
if ($slot) {
|
||||
$item = new \Battles\DressedItems($user['id']);
|
||||
$item = new DressedItems($user['id']);
|
||||
$item->undressItem($slot);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user