WIP: removing User::class public array $items for Stat()::class.
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
const GAME = true;
|
||||
include('_incl_data/__config.php');
|
||||
include('_incl_data/class/__db_connect.php');
|
||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/_incl_data/autoload.php';
|
||||
$u = User::start();
|
||||
|
||||
if (!$u->info['admin']) {
|
||||
@@ -20,18 +21,18 @@ while ($i < 100) {
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
|
||||
<title>Тестирование ботов</title>
|
||||
<script src="//img.new-combats.tech/js/Lite/gameEngine.js" type="text/javascript"></script>
|
||||
<script src="js/jquery-1.11.3.min.js"></script>
|
||||
<script src="js/ion.rangeSlider.js"></script>
|
||||
<script type="text/javascript" src="js/title.js"></script>
|
||||
<script src="/js/jquery-1.11.3.min.js"></script>
|
||||
<script src="/js/ion.rangeSlider.js"></script>
|
||||
<script type="text/javascript" src="/js/title.js"></script>
|
||||
<link href="//img.new-combats.tech/css/main.css" rel="stylesheet" type="text/css">
|
||||
<link rel="stylesheet" href="css/normalize.css"/>
|
||||
<link rel="stylesheet" href="css/ion.rangeSlider.css"/>
|
||||
<link rel="stylesheet" href="css/ion.rangeSlider.skinFlat.css"/>
|
||||
<link rel="stylesheet" href="/css/normalize.css"/>
|
||||
<link rel="stylesheet" href="/css/ion.rangeSlider.css"/>
|
||||
<link rel="stylesheet" href="/css/ion.rangeSlider.skinFlat.css"/>
|
||||
<style type="text/css">
|
||||
h3 {
|
||||
text-align: center;
|
||||
@@ -138,7 +139,7 @@ while ($i < 100) {
|
||||
}
|
||||
</style>
|
||||
<link href="//img.new-combats.tech/css/main.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="/js/jquery.js"></script>
|
||||
<script>
|
||||
function eff(user, id) {
|
||||
if ($('#e' + user + '_' + id).attr('class') == 'nprsl0') {
|
||||
@@ -152,8 +153,7 @@ while ($i < 100) {
|
||||
</script>
|
||||
</head>
|
||||
<body bgcolor="#E2E0E0">
|
||||
<div id="ttl" class="ttl_css" style="display:none;z-index:1111;"/>
|
||||
</div>
|
||||
<div id="ttl" class="ttl_css" style="display:none;z-index:1111;"></div>
|
||||
<div id="gi" class="gifin" style="display:none;"></div>
|
||||
<H3>Создать тестовый бой</H3>
|
||||
<br>
|
||||
@@ -207,55 +207,41 @@ while ($i < 100) {
|
||||
);
|
||||
//
|
||||
mysql_query(
|
||||
'INSERT INTO `battle_logs` (
|
||||
`time`,`battle`,`id_hod`,`type`,`text`
|
||||
) VALUES (
|
||||
"' . time() . '","' . $logid . '","1","1","Часы показывали <b>' . date(
|
||||
'd.m.Y H:i:s'
|
||||
) . '</b>, когда <b>' . $user1['login'] . '</b> и <b>' . $user2['login'] . '</b> бросили вызов друг другу."
|
||||
)'
|
||||
'INSERT INTO `battle_logs` (`time`,`battle`,`id_hod`,`type`,`text`) VALUES ("' . time() . '","' . $logid . '","1","1","Часы показывали <b>' . date('d.m.Y H:i:s') . '</b>, когда <b>' . $user1['login'] . '</b> и <b>' . $user2['login'] . '</b> бросили вызов друг другу.")'
|
||||
);
|
||||
//
|
||||
//Эффекты
|
||||
$i = 0;
|
||||
while ($i < 1000) {
|
||||
//
|
||||
$efs = mysql_fetch_array(
|
||||
mysql_query('SELECT * FROM `eff_main` WHERE `id2` = "' . $i . '" LIMIT 1')
|
||||
);
|
||||
$efs = mysql_fetch_array(mysql_query('SELECT * FROM `eff_main` WHERE `id2` = "' . $i . '" LIMIT 1'));
|
||||
if ($_POST['eu1_' . $efs['id2']] == 1) {
|
||||
mysql_query(
|
||||
'INSERT INTO `eff_users`
|
||||
( `id_eff` , `uid` , `name` , `data` , `timeUse` ) VALUES (
|
||||
"' . $efs['id2'] . '" , "' . $bot1 . '" , "' . $efs['mname'] . '" , "' . $efs['mdata'] . '" , "' . time() . '"
|
||||
)'
|
||||
'INSERT INTO `eff_users` ( `id_eff` , `uid` , `name` , `data` , `timeUse` )
|
||||
VALUES ("' . $efs['id2'] . '" , "' . $bot1 . '" , "' . $efs['mname'] . '" , "' . $efs['mdata'] . '" , "' . time() . '")'
|
||||
);
|
||||
}
|
||||
if ($_POST['eu2_' . $efs['id2']] == 1) {
|
||||
mysql_query(
|
||||
'INSERT INTO `eff_users`
|
||||
( `id_eff` , `uid` , `name` , `data` , `timeUse` ) VALUES (
|
||||
"' . $efs['id2'] . '" , "' . $bot2 . '" , "' . $efs['mname'] . '" , "' . $efs['mdata'] . '" , "' . time() . '"
|
||||
)'
|
||||
'INSERT INTO `eff_users` ( `id_eff` , `uid` , `name` , `data` , `timeUse` )
|
||||
VALUES ("' . $efs['id2'] . '" , "' . $bot2 . '" , "' . $efs['mname'] . '" , "' . $efs['mdata'] . '" , "' . time() . '")'
|
||||
);
|
||||
}
|
||||
//
|
||||
|
||||
$i++;
|
||||
}
|
||||
//
|
||||
|
||||
function inuser_go_btl($id)
|
||||
{
|
||||
if (isset($id['id'])) {
|
||||
file_get_contents(
|
||||
'/jx/battle/refresh1.php?uid=' . $id['id'] . '&cron_core=' . md5(
|
||||
$id['id'] . '_brfCOreW@!_' . $id['pass']
|
||||
) . '&pass=' . $id['pass']
|
||||
'/jx/battle/refresh1.php?uid=' . $id['id'] . '&cron_core=' . md5($id['id'] . '_brfCOreW@!_' . $id['pass']) . '&pass=' . $id['pass']
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
$sp = mysql_query(
|
||||
'SELECT `id`,`time_start` FROM `battle` WHERE `team_win` = "-1" AND `time_over` = "0" AND `type` = 329 LIMIT 100'
|
||||
'SELECT `id`,`time_start` FROM `battle` WHERE `team_win` = -1 AND `time_over` = 0 AND `type` = 329 LIMIT 100'
|
||||
);
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$user1 = mysql_fetch_array(
|
||||
@@ -275,7 +261,7 @@ while ($i < 100) {
|
||||
//
|
||||
$ef1 = '';
|
||||
$ef2 = '';
|
||||
$sp = mysql_query('SELECT * FROM `eff_main` WHERE `mdata` != "" AND `actionTime` > 0 ORDER BY `mname` ASC');
|
||||
$sp = mysql_query('SELECT * FROM `eff_main` WHERE `mdata` != \'\' AND `actionTime` > 0 ORDER BY `mname` ');
|
||||
$i = 0;
|
||||
while ($pl = mysql_fetch_array($sp)) {
|
||||
$i++;
|
||||
@@ -283,17 +269,16 @@ while ($i < 100) {
|
||||
//Действие эффекта
|
||||
$ei = '';
|
||||
$tr = '';
|
||||
$t = $u->items['add'];
|
||||
$x = 0;
|
||||
$ed = Helper\Conversion::dataStringToArray($pl['mdata']);
|
||||
while ($x < count($t)) {
|
||||
$n = $t[$x];
|
||||
while ($x < count($this->statnames->sysBonusNames)) {
|
||||
$n = $this->statnames->sysBonusNames[$x];
|
||||
if (isset($ed['add_' . $n], $u->is[$n])) {
|
||||
$z = '';
|
||||
if ($ed['add_' . $n] > 0) {
|
||||
$z = '+';
|
||||
}
|
||||
$tr .= '<br>' . $u->is[$n] . ': ' . $z . '' . $ed['add_' . $n];
|
||||
$tr .= '<br>' . $this->statnames->bonusNames[$n] . ': ' . $z . $ed['add_' . $n];
|
||||
}
|
||||
$x++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user