Часть логов теперь пишется в SQLITE, а не в текстовые файлы (#33). Проинициализирован класс Nick в свитках.

This commit is contained in:
Igor Barkov (iwork)
2021-08-26 17:44:14 +03:00
parent 6fa217b93b
commit 5e264f837a
65 changed files with 438 additions and 233 deletions

View File

@@ -1,5 +1,9 @@
<?php
use Battles\DressedItems;
use Battles\GameLogs;
use Battles\Nick;
$us = mysql_fetch_array(mysql_query("SELECT *,(select `id` from `online` WHERE `real_time` >= ".(time()-60)." AND `id` = users.`id`) as `online` FROM `users` WHERE `login` = '{$_POST['target']}' LIMIT 1;"));
$owntravma = mysql_fetch_array(mysql_query("SELECT * FROM `effects` WHERE `owner` = ".$us['id']." AND (type=13 OR ND type=12 OR type=14);"));
$magic = mysql_fetch_array(mysql_query("SELECT `chanse` FROM `magic` WHERE `id` = '23' ;"));
@@ -104,8 +108,8 @@ elseif (!$us['online']) {
}
if(rand(0,100)<80)
\Battles\DressedItems::undressAllItems($jert['id']);
\Battles\DressedItems::undressAllItems($user['id']);
DressedItems::undressAllItems($jert['id']);
DressedItems::undressAllItems($user['id']);
$teams = array();
$teams[$user['id']][$jert['id']] = array(0,0,time());
$teams[$jert['id']][$user['id']] = array(0,0,time());
@@ -137,7 +141,7 @@ elseif (!$us['online']) {
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
addlog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
GameLogs::addBattleLog($id,"Часы показывали <span class=date>".date("Y.m.d H.i")."</span>, когда ".$rr." бросили вызов друг другу. <BR>");
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
$outok=1;