From 2b62dcb41303376faf5716006d40ae2d2bd41344 Mon Sep 17 00:00:00 2001 From: lopar Date: Fri, 30 Oct 2020 02:33:02 +0200 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=20TO?= =?UTF-8?q?DO\FIXME=20=D0=B2=20git-=D0=B7=D0=B0=D0=B4=D0=B0=D1=87=D0=B8.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/Battles/City.php | 1 - classes/Battles/Nick.php | 3 +- classes/battle_new.class.php | 1 - fbattle.php | 1 - functions.php | 176 +---------------------------------- hostel_room.php | 1 - magic/Healing.php | 5 +- main.php | 2 +- podzem_dialog.php | 2 +- post.php | 1 - shop.php | 1 - zayavka.php | 8 +- 12 files changed, 12 insertions(+), 190 deletions(-) diff --git a/classes/Battles/City.php b/classes/Battles/City.php index d851f48..d5f4b99 100644 --- a/classes/Battles/City.php +++ b/classes/Battles/City.php @@ -1,7 +1,6 @@ user['id'] . ";")); // $zo1 = mysql_fetch_row(mysql_query("SELECT id FROM effects WHERE type=201 AND owner=" . (int)$this->enemyhar['id'] . ";")); // $zo2 = mysql_fetch_row(mysql_query("SELECT id FROM effects WHERE type=205 AND owner=" . (int)$this->user['id'] . ";")); diff --git a/fbattle.php b/fbattle.php index 0fcd559..d682afd 100644 --- a/fbattle.php +++ b/fbattle.php @@ -293,7 +293,6 @@ $fbattle = new fbattle($user['battle']); if (($user['hp'] > 0) && $fbattle->battle) { echo '
Ожидаем хода противника...
0) ? "battle" : "end") . '>
'; } elseif ($user['hp'] <= 0 && $fbattle->battle) { - //FIXME роняем вещи, которые больше не можем держать ref_drop(); echo '
Ожидаем, пока бой закончат другие игроки...
0) ? "battle" : "end") . '>
'; } diff --git a/functions.php b/functions.php index 39de4d7..9175be7 100644 --- a/functions.php +++ b/functions.php @@ -409,9 +409,9 @@ function show_eff_inf($u, $type) $and = " AND `type` != 1022"; } $effs = db::c()->query('SELECT * FROM `users_effects` WHERE `type` <> 20 AND `owner_id` = ?i' . $and, $u)->fetch_assoc(); - /* FIXME Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 132644820 bytes) in /home/combats/web/combats.loc/public_html/functions.php on line 873 + /* Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 132644820 bytes) in /home/combats/web/combats.loc/public_html/functions.php on line 873 * Если на человеке стоит type=20 - * + * #26 */ $etype = $effs['type']; if ($type == 1) { @@ -744,7 +744,7 @@ function dropitem($slot) return true; } -//FIXME роняем вещи, которые больше не можем держать +#15 function ref_drop() { //сможет держать @@ -829,7 +829,7 @@ function usemagic($id, $target) if ($incmagic['needcharge'] > 0) { $charge = $incmagic['needcharge']; } -//FIXME Переделать под новую базу +//Переделать под новую базу if (($all_magic[$user->id] < 1 || $charge == 0) && ($user['sila'] >= $row['nsila'] && $user['lovk'] >= $row['nlovk'] && @@ -947,174 +947,6 @@ function err($t) return true; } -// TODO: Переписать выдачу травм. -// ставим травму -//function settravma($id, $type, $time = 86400, $kill = false) -//{ -// $user = mysql_fetch_array(mysql_query("SELECT `align`, `level` FROM `users` WHERE `id` = '{$id}' LIMIT 1")); -// if ((($user['align'] == 2 && mt_rand(1, 100) > 20) && !$kill) || ($user['level'] == 0)) { -// return false; -// } else { -// $travmalist = ["разбитый нос", "сотрясение первой степени", "потрепанные уши", "прикушенный язык", "перелом переносицы", "растяжение ноги", "растяжение руки", "подбитый глаз", "синяк под глазом", "кровоточащее рассечение", "отбитая «пятая точка»", "заклинившая челюсть", "выбитый зуб «мудрости»", "косоглазие"]; -// $travmalist2 = ["отбитые почки", "вывих «вырезано цензурой»", "сотрясение второй степени", "оторванное ухо", "вывих руки", "оторванные уши", "поврежденный позвоночник", "отбитые почки", "поврежденный копчик", "разрыв сухожилия", "перелом ребра", "перелом двух ребер", "вывих ноги", "сломанная челюсть"]; -// $travmalist3 = ["пробитый череп", "разрыв селезенки", "смещение позвонков", "открытый перелом руки", "открытый перелом «вырезано цензурой»", "излом носоглотки", "непонятные, но множественные травмы", "сильное внутреннее кровотечение", "раздробленная коленная чашечка", "перелом шеи", "смещение позвонков", "открытый перелом ключицы", "перелом позвоночника", "вывих позвоночника", "сотрясение третьей степени"]; -// $owntravma = mysql_fetch_array(mysql_query("SELECT `type`, `id`, `sila`, `lovk`, `inta`, `hp` FROM `effects` WHERE `owner` = " . $id . " AND (`type` = 11 OR `type` = 12 OR `type` = 13) ORDER BY `type` DESC LIMIT 1")); -// if ($type != 0 && $type != 100) { -// $owntravma['type'] = $type; -// } elseif ($type != 0 && $type == 100 && $owntravma['type'] == 0) { -// $type = mt_rand(1, 100); -// if ($type < 10) { -// $owntravma['type'] = 25; -// } elseif ($type < 60) { -// $owntravma['type'] = "set"; -// } elseif ($type < 85) { -// $owntravma['type'] = 11; -// } else { -// $owntravma['type'] = 12; -// } -// } elseif ($owntravma['type'] == 0) { -// $tr = mt_rand(1, 3); -// switch ($tr) { -// case 1: -// $owntravma['type'] = 0; -// break; -// case 2: -// $owntravma['type'] = 11; -// break; -// case 3: -// $owntravma['type'] = 12; -// break; -// } -// } -// -// switch ($owntravma['type']) { -// -// case 20: -// $st = mt_rand(0, 2); -// $zz = mt_rand(1, 3); -// $s = 0; -// $l = 0; -// $i = 0; -// switch ($zz) { -// case 1: -// $s = ($user['level'] + $st) * 3; -// break; -// case 2: -// $l = ($user['level'] + $st) * 3; -// break; -// case 3: -// $i = ($user['level'] + $st) * 3; -// break; -// } -// $trv = $travmalist3[mt_rand(0, count($travmalist3) - 1)]; -// mysql_query("INSERT INTO `effects` (`owner`, `name`, `time`, `type`, `sila`, `lovk`, `inta`, `vinos`) VALUES ('" . $id . "', 'Травма "" . $trv . ""', " . (time() + $time) . ", '13', '" . $s . "', '" . $l . "', '" . $i . "', '0')"); -// mysql_query("UPDATE `users` SET `sila` = (`sila`-'" . $s . "'), `lovk` = (`lovk`-'" . $l . "'), `inta` = (`inta`-'" . $i . "') WHERE `id` = '" . $id . "' LIMIT 1"); -// return $trv; -// break; -// -// default: -// $st = mt_rand(0, 2); -// $zz = mt_rand(1, 3); -// $s = 0; -// $l = 0; -// $i = 0; -// switch ($zz) { -// case 1: -// $s = $user['level'] + $st; -// break; -// case 2: -// $l = $user['level'] + $st; -// break; -// case 3: -// $i = $user['level'] + $st; -// break; -// } -// $trv = $travmalist[mt_rand(0, count($travmalist) - 1)]; -// $time = 60 * 60 * mt_rand(1, 5); -// mysql_query("INSERT INTO `effects` (`owner`, `name`, `time`, `type`, `sila`, `lovk`, `inta`, `vinos`) VALUES ('" . $id . "', 'Травма "" . $trv . ""', " . (time() + $time) . ", '11', '" . $s . "', '" . $l . "', '" . $i . "', '0')"); -// mysql_query("UPDATE `users` SET `sila` = (`sila`-'" . $s . "'), `lovk` = (`lovk`-'" . $l . "'), `inta` = (`inta`-'" . $i . "') WHERE `id` = '" . $id . "' LIMIT 1"); -// return $trv; -// break; -// -// case 11: -// $zz = mt_rand(1, 3); -// $s = 0; -// $l = 0; -// $i = 0; -// switch ($zz) { -// case 1: -// $s = ($user['level']) * 2; -// break; -// case 2: -// $l = ($user['level']) * 2; -// break; -// case 3: -// $i = ($user['level']) * 2; -// break; -// } -// $trv = $travmalist2[mt_rand(0, count($travmalist2) - 1)]; -// $time = 60 * 60 * mt_rand(5, 15); -// mysql_query("INSERT INTO `effects` (`owner`, `name`, `time`, `type`, `sila`, `lovk`, `inta`, `vinos`) VALUES ('" . $id . "', 'Травма "" . $trv . ""', " . (time() + $time) . ", '12', '" . $s . "', '" . $l . "', '" . $i . "', '0')"); -// mysql_query("UPDATE `users` SET `sila` = (`sila`-'" . $s . "'), `lovk` = (`lovk`-'" . $l . "'), `inta` = (`inta`-'" . $i . "') WHERE `id` = '" . $id . "' LIMIT 1"); -// return $trv; -// break; -// -// case 12: -// $zz = mt_rand(1, 3); -// $s = 0; -// $l = 0; -// $i = 0; -// switch ($zz) { -// case 1: -// $s = ($user['level']) * 3; -// break; -// case 2: -// $l = ($user['level']) * 3; -// break; -// case 3: -// $i = ($user['level']) * 3; -// break; -// } -// $trv = $travmalist3[mt_rand(0, count($travmalist3) - 1)]; -// $time = 60 * 60 * mt_rand(15, 24); -// mysql_query("INSERT INTO `effects` (`owner`, `name`, `time`, `type`, `sila`, `lovk`, `inta`, `vinos`) VALUES ('" . $id . "', 'Травма "" . $trv . ""', " . (time() + $time) . ", '13', '" . $s . "', '" . $l . "', '" . $i . "', '0')"); -// mysql_query("UPDATE `users` SET `sila` = (`sila`-'" . $s . "'), `lovk` = (`lovk`-'" . $l . "'), `inta` = (`inta`-'" . $i . "') WHERE `id` = '" . $id . "' LIMIT 1"); -// return $trv; -// break; -// -// case 13: -// $zz = mt_rand(1, 3); -// $s = 0; -// $l = 0; -// $i = 0; -// switch ($zz) { -// case 1: -// $s = ($user['level']) * 3; -// break; -// case 2: -// $l = ($user['level']) * 3; -// break; -// case 3: -// $i = ($user['level']) * 3; -// break; -// } -// $trv = $travmalist3[mt_rand(0, count($travmalist3) - 1)]; -// $time = 60 * 60 * mt_rand(25, 26); -// mysql_query("INSERT INTO `effects` (`owner`, `name`, `time`, `type`, `sila`, `lovk`, `inta`, `vinos`) VALUES ('" . $id . "', 'Травма "" . $trv . ""', " . (time() + $time) . ", '14', '" . $s . "', '" . $l . "', '" . $i . "', '0')"); -// mysql_query("UPDATE `users` SET `sila` = (`sila`-'" . $s . "'), `lovk` = (`lovk`-'" . $l . "'), `inta` = (`inta`-'" . $i . "') WHERE `id` = '" . $id . "' LIMIT 1"); -// return $trv; -// break; -// } -// } -//} -// -//function deltravma($id) -//{ -// $owntravmadb = db::c()->query('SELECT id FROM effects WHERE (`type` = 11 OR `type` = 12 OR `type` = 13 OR `type` = 14) AND id = ?i', $id); -// while ($owntravma = $owntravmadb->fetch_assoc_array()) { -// db::c()->query('DELETE FROM `effects` WHERE `id` = ?i', $owntravma['id']); -// } -//} /** * @param $name diff --git a/hostel_room.php b/hostel_room.php index c15c34d..8ead626 100644 --- a/hostel_room.php +++ b/hostel_room.php @@ -32,7 +32,6 @@ function show_item($row, $txt, $place) $magic['targeted'] = $incmagic['targeted']; } if (isset($row['id'])) { - //todo подтянуть отображение предмета из класса $r .= '
'; $r .= ''; $r .= '