Зачем-то инкапсулирем.

This commit is contained in:
lopar
2021-02-01 21:20:23 +02:00
parent 7dd6368b84
commit 2ccb5ef128
63 changed files with 345 additions and 345 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ function cavesys($text)
}
}
if (in_array($user->room, Config::$caverooms)) {
if (in_array($user->getRoom(), 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->getRoom() == 621) {
$i = mt_rand(0, (count($caveitems[$bot]) - 1));
$item = $caveitems[$bot][$i];
if (getchance($item['chance'])) {