Отказ от алиаса die в пользу exit, более явная проверка на наличие сессии. Некоторые проверки входа теперь проверяют объекты, а не массив.

This commit is contained in:
Igor Barkov (iwork)
2020-09-30 15:01:33 +03:00
parent 02dc4582dc
commit a08ce17a40
179 changed files with 883 additions and 582 deletions

View File

@@ -21,7 +21,7 @@ function cavesys($text)
}
}
if (in_array($user['room'], Config::$caverooms)) {
if (in_array($user->room, Config::$caverooms)) {
include("CaveItems.php");
mysql_query('LOCK TABLES `cavebots` WRITE, `caveitems` WRITE, `shop` WRITE, `caveparties` WRITE');
$location = mysql_fetch_array(mysql_query("SELECT `x`, `y`, `dir`, `floor` FROM `caveparties` WHERE `user` = '$user[id]' LIMIT 1"));
@@ -55,7 +55,7 @@ if (in_array($user['room'], Config::$caverooms)) {
$bot = $rec['bot'];
$cnt = $rec['cnt'];
if (@$caveitems[$bot]) {
if ($user['room'] == 621) {
if ($user->room == 621) {
$i = mt_rand(0, (count($caveitems[$bot]) - 1));
$item = $caveitems[$bot][$i];
if (getchance($item['chance'])) {