diff --git a/admin/admin.php b/admin/admin.php
index 84e2626..cc02dad 100644
--- a/admin/admin.php
+++ b/admin/admin.php
@@ -15,7 +15,7 @@ use Battles\Template;
use Battles\User;
$user = $user ?? new User($_SESSION['uid']);
-if (!$user->admin) {
+if (!$user->getAdmin()) {
header("HTTP/1.0 404 Not Found");
exit;
}
diff --git a/admin/edit_user.php b/admin/edit_user.php
index 7439908..280e8eb 100644
--- a/admin/edit_user.php
+++ b/admin/edit_user.php
@@ -7,8 +7,8 @@
session_start();
require_once "../functions.php";
-
-if (!$user->admin) {
+$user = $user ?? new User($_SESSION['uid']);
+if (!$user->getAdmin()) {
header("HTTP/1.0 404 Not Found");
exit;
}
diff --git a/c_forest.php b/c_forest.php
index 495126f..2025bf2 100644
--- a/c_forest.php
+++ b/c_forest.php
@@ -1,7 +1,7 @@
room == 51) {
+if ($user->getRoom() == 51) {
header('location: city.php');
exit;
}
diff --git a/canalizaciya.php b/canalizaciya.php
index e27d828..59078c8 100644
--- a/canalizaciya.php
+++ b/canalizaciya.php
@@ -6,7 +6,7 @@ use Battles\User;
session_start();
require_once "functions.php";
$user = $user ?? new User($_SESSION['uid']);
-if ($user->room == 403) {
+if ($user->getRoom() == 403) {
include "startpodzemel.php";
if ($_GET['act'] == "cexit") {
$das = mysql_query("select glava,glav_id from `labirint` where user_id='" . $user['id'] . "'");
diff --git a/canalization_mod.php b/canalization_mod.php
index 9919160..d7d310f 100644
--- a/canalization_mod.php
+++ b/canalization_mod.php
@@ -1,5 +1,5 @@
room == 403) {
+if ($user->getRoom() == 403) {
$s = db::c()->query('SELECT * FROM podzem2 WHERE name= "?s"', $mir['name'])->fetch_assoc();
$rooms[0] = "";
diff --git a/cave.php b/cave.php
index e25dc21..f9c5986 100644
--- a/cave.php
+++ b/cave.php
@@ -287,15 +287,15 @@ function makedeath()
{
global $user, $floor, $loses, $x, $y, $dir;
$cavedata = Config::$cavedata ?? [];
- if (!isset($cavedata[$user->room]['x' . $floor])) {
+ if (!isset($cavedata[$user->getRoom()]['x' . $floor])) {
$floor = 1;
loadmap();
}
- mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user->room]['x' . $floor] . "', `y` = '" . $cavedata[$user->room]['y' . $floor] . "', `dir` = '" . $cavedata[$user->room]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$user[id]' LIMIT 1");
+ mysql_query("UPDATE `caveparties` SET `floor` = $floor, `x` = '" . $cavedata[$user->getRoom()]['x' . $floor] . "', `y` = '" . $cavedata[$user->getRoom()]['y' . $floor] . "', `dir` = '" . $cavedata[$user->getRoom()]['dir' . $floor] . "', `loses` = (`loses`+1) WHERE `user` = '$user[id]' LIMIT 1");
mysql_query('UPDATE `users` SET `hp` = 1 WHERE `id` = "' . $user['id'] . '" LIMIT 1');
- $x = $cavedata[$user->room]['x' . $floor];
- $y = $cavedata[$user->room]['y' . $floor];
- $dir = $cavedata[$user->room]['dir' . $floor];
+ $x = $cavedata[$user->getRoom()]['x' . $floor];
+ $y = $cavedata[$user->getRoom()]['y' . $floor];
+ $dir = $cavedata[$user->getRoom()]['dir' . $floor];
updparties();
$loses++;
}
@@ -466,7 +466,7 @@ while ($rec = mysql_fetch_assoc($r)) {
$party[] = $rec;
}
-if ($user->room == 621) {
+if ($user->getRoom() == 621) {
$base = "/underdesigns/alchcave";
}
@@ -547,8 +547,8 @@ if ($_GET['useitem']) {
$ty = $y + 1;
}
if (@$_GET['useitem']) {
- if (file_exists("underground/objects/$user->room.php")) {
- include "underground/objects/$user->room.php";
+ if (file_exists("underground/objects/$user->getRoom().php")) {
+ include "underground/objects/$user->getRoom().php";
}
}
@@ -644,7 +644,7 @@ if ($wander && !isset($_GET['attack'])) {
$ty = $v['y'] + 2;
}
- if ($user->room == 74 || $user->room == 76) {
+ if ($user->getRoom() == 74 || $user->getRoom() == 76) {
if (strpos($map[$ty][$tx], 's/') !== false && !@$mapbots[$ty][$tx]) {
break;
}
@@ -712,8 +712,8 @@ if ($moved && (substr($map[$y * 2][$x * 2], 0, 1) === "e" || substr($map[$y * 2]
$tx = $x;
$ty = $y;
$tmp = explode("/", $map[$y * 2][$x * 2]);
- if (file_exists("underground/events/$user->room.php")) {
- include("underground/events/$user->room.php");
+ if (file_exists("underground/events/$user->getRoom().php")) {
+ include("underground/events/$user->getRoom().php");
}
}
@@ -738,7 +738,7 @@ if ($ambushes[$y * 2][$x * 2 - 2] && $map[$y * 2][$x * 2 - 1] == 0) {
if ($ax && $ay && $user['hp'] > 0) {
$cavedata = Config::$cavedata ?? [];
- if (!($cavedata[$user->room]['x' . $floor] == $x && $cavedata[$user->room]['y' . $floor] == $y)) {
+ if (!($cavedata[$user->getRoom()]['x' . $floor] == $x && $cavedata[$user->getRoom()]['y' . $floor] == $y)) {
if ($ax < $x) {
$dir1 = 0;
} elseif ($ax > $x) {
@@ -902,7 +902,7 @@ if (@$_GET['exit']) {
}
}
mysql_query("DELETE FROM `inventory` WHERE `owner` = '$user[id]' AND `foronetrip` = 1");
- gotoroom($user->room - 1);
+ gotoroom($user->getRoom() - 1);
}
$standingon = $map[$y * 2][$x * 2];
@@ -1470,9 +1470,9 @@ function drawmap($map1, $players, $x, $y, $direction)
$ret .= drawobject2($aMap[$yy][$xx], $x, $y);
}
- $rrm = $user->room;
+ $rrm = $user->getRoom();
- if (isset($dialogs[CaveBots::$bots[$data[1]]]) && (CaveBots::$bots[$data[1]] == 11147 && $user->room == 74)) {
+ if (isset($dialogs[CaveBots::$bots[$data[1]]]) && (CaveBots::$bots[$data[1]] == 11147 && $user->getRoom() == 74)) {
$ret .= " 1 ? " ($cnt)" : "") . "\" " . ($y == 1 && $x == 3 ? "onclick=\"speakattackmenu(event);\"" : "") . " width=\"" . $imgdata[$x][$y]["wd"] . "\" height=\"" . $imgdata[$x][$y]["ht"] . "\" src=\"/i/dungeon/mobs/$rrm/$bot.gif\" style=\"position: absolute; left: " . $imgdata[$x][$y]["x"][$bn] . "px; top: " . $imgdata[$x][$y]["y"] . "px;" . ($x == 3 && $y == 1 ? "cursor: pointer;" : "") . ($x == 3 ? "z-index: " . (99 - ($y * 5)) . ";" : "") . "\" />";
} else {
$ret .= " 1 ? " ($cnt)" : "") . "\" " . ($y == 1 && $x == 3 ? " onclick=\"document.location.href='cave.php?attack=1';\"" : "") . " width=\"" . $imgdata[$x][$y]["wd"] . "\" height=\"" . $imgdata[$x][$y]["ht"] . "\" src=\"/i/dungeon/mobs/$rrm/$bot.gif\" style=\"position: absolute; left: " . $imgdata[$x][$y]["x"][$bn] . "px; top: " . $imgdata[$x][$y]["y"] . "px;" . ($x == 3 && $y == 1 ? "cursor: pointer;" : "") . ($x == 3 ? "z-index: " . (99 - ($y * 5)) . ";" : "") . "\" />";
@@ -1562,7 +1562,7 @@ function drawmap($map1, $players, $x, $y, $direction)
$left = $imgdata[$x][$y]["x"][1];
$top = $imgdata[$x][$y]["y"] + $ht;
}
- $rrm = $user->room;
+ $rrm = $user->getRoom();
if (!isset($imgmap[$obj])) {
$ret .= "
@@ -1607,7 +1607,7 @@ function drawmap($map1, $players, $x, $y, $direction)
$left = $imgdata[$x][$y]["x"][1];
$top = $imgdata[$x][$y]["y"] + $ht;
}
- $rrm = $user->room;
+ $rrm = $user->getRoom();
if (!isset($imgmap[$obj])) {
$ret .= "
" . ($y == 1 && $x == 3 ? "" : "") . "
@@ -1768,7 +1768,7 @@ function drawmap($map1, $players, $x, $y, $direction)
}
$objInWall = explode('/', $map[3][$wall]);
if ($objInWall[1] == "o") {
- if ($user->room == 83 && !(!$direction && (($x == 13 && $y == 4) || ($x == 12 && $y == 4)))) { // исключение 2-ух клеток в комнате 82
+ if ($user->getRoom() == 83 && !(!$direction && (($x == 13 && $y == 4) || ($x == 12 && $y == 4)))) { // исключение 2-ух клеток в комнате 82
$ret .= drawobject('//' . $objInWall[2], 3, $i);
}
}
@@ -1991,10 +1991,10 @@ progress_update();
- $dMap = unserialize(mysql_result(mysql_query("SELECT `map` FROM `cavemaps` WHERE `floor` = $floor AND `room` = " . ($user->room - 1)), 0, 0));
+ $dMap = unserialize(mysql_result(mysql_query("SELECT `map` FROM `cavemaps` WHERE `floor` = $floor AND `room` = " . ($user->getRoom() - 1)), 0, 0));
$cPlace = $dMap[$y * 2][$x * 2];
$tmp = explode("/", $cPlace);
- if ($user->room == 621) {
+ if ($user->getRoom() == 621) {
if ($floor == 1) {
echo 'Проклятый Рудник, 1 этаж';
} elseif ($floor == 2) {
diff --git a/ch.php b/ch.php
index 8868786..52b5950 100644
--- a/ch.php
+++ b/ch.php
@@ -4,12 +4,12 @@ use Battles\Template;
session_start();
require_once 'functions.php';
-
+$user = $user ?? new User($_SESSION['uid']);
db::c()->query('UPDATE `online` SET `real_time` = ?i WHERE `id` = ?i', time(), $u->i()['id']);
if (isset($_GET['online']) && $_GET['online'] != null) {
if ($_GET['room'] && (int)$_GET['room'] < 500) {
- $user->room = (int)$_GET['room'];
+ $user->setRoom($_GET['room']);
}
if ($u->i()['caveleader'] > 0) {
$data = db::c()->query('
@@ -35,13 +35,13 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
ORDER BY
`u`.`login`
');
- $ttl = "" . $rooms[$user->room] . " (" . mysql_num_rows($data) . ")";
+ $ttl = "" . $rooms[$user->getRoom()] . " (" . mysql_num_rows($data) . ")";
$ch1 = '_active';
$ch2 = '_passive';
$ch3 = '_passive';
$ch4 = '_passive';
$ch5 = '_passive';
- } elseif ($user->room == 760) {
+ } elseif ($user->getRoom() == 760) {
$forest = db::c()->query('SELECT `id`, `room`, `time`, `user`, `data` FROM `forest` WHERE `user` = "' . $user['id'] . '" LIMIT 1')->fetch_assoc();
$sp = db::c()->query('SELECT `id`, `room`, `user` FROM `forest` WHERE `room` = "' . $forest['room'] . '"');
while ($pl = $sp->fetch_assoc()) {
@@ -100,18 +100,18 @@ if (isset($_GET['online']) && $_GET['online'] != null) {
WHERE
`o`.`id` = `u`.`id` AND
(`o`.`date` >= ' . (time() - 90) . ' OR `u`.`in_tower` = 1) AND
- `o`.`room` = "' . $user->room . '"
+ `o`.`room` = "' . $user->getRoom() . '"
ORDER BY
`u`.`login`
');
- $ttl = "" . $rooms[$user->room] . " (" . mysql_num_rows($data) . ")";
+ $ttl = "" . $rooms[$user->getRoom()] . " (" . mysql_num_rows($data) . ")";
$ch1 = '_active';
$ch2 = '_passive';
$ch3 = '_passive';
$ch4 = '_passive';
$ch5 = '_passive';
}
- Template::header(sprintf('%s (%s)', $rooms[$user->room], mysql_num_rows($data)));
+ Template::header(sprintf('%s (%s)', $rooms[$user->getRoom()], mysql_num_rows($data)));
?>
";
@@ -308,7 +308,7 @@ if (in_array($user->room, Config::$canalenters)) {
}
$den = mysql_query("SELECT `id` FROM `vxodd` WHERE `glav_id` = '" . $_GET['naw_id'] . "'");
- if (mysql_num_rows($den) >= (in_array($user->room + 1, Config::$caverooms) ? 5 : 4)) {
+ if (mysql_num_rows($den) >= (in_array($user->getRoom() + 1, Config::$caverooms) ? 5 : 4)) {
echo "";
exit();
}
@@ -356,7 +356,7 @@ if (in_array($user->room, Config::$canalenters)) {
}
if ($_GET['start']) {
- if (in_array($user->room + 1, Config::$caverooms)) {
+ if (in_array($user->getRoom() + 1, Config::$caverooms)) {
$nc = 1;
$locs = [];
}
@@ -378,8 +378,8 @@ if (in_array($user->room, Config::$canalenters)) {
mysql_query("update `users` SET `money` = (`money-$nana[fee]) WHERE `id` = '$esth[id]' LIMIT 1");
$user['money'] += $nana['fee'];
$esth['money'] -= $nana['fee'];
- adddelo($user['id'], "Персонаж $user[login] получил $nana[fee] кр. за поход по локации \"" . $rooms[$user->room + 1] . "\" от персонажа $esth[login] ($user[money]).", 1);
- adddelo($esth['id'], "Персонаж $esth[login] заплатил $nana[fee] кр. за поход по локации \"" . $rooms[$user->room + 1] . "\" персонажу $user[login] ($esth[money]).", 1);
+ adddelo($user['id'], "Персонаж $user[login] получил $nana[fee] кр. за поход по локации \"" . $rooms[$user->getRoom() + 1] . "\" от персонажа $esth[login] ($user[money]).", 1);
+ adddelo($esth['id'], "Персонаж $esth[login] заплатил $nana[fee] кр. за поход по локации \"" . $rooms[$user->getRoom() + 1] . "\" персонажу $user[login] ($esth[money]).", 1);
}
if ($esth['level'] > $level) {
$level = $esth['level'];
@@ -392,12 +392,12 @@ if (in_array($user->room, Config::$canalenters)) {
$vrem = 30 * 60 + time();
$cavedata = Config::$cavedata ?? [];
- mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '" . $cavedata[$user->room + 1]['x1'] . "', `y` = '" . $cavedata[$user->room + 1]['y1'] . "', `dir` = '" . $cavedata[$user->room + 1]['dir1'] . "', `floor` = 1");
- mysql_query("UPDATE `users`, `online` SET " . ($nc ? "`users`.`caveleader` = '$user[id]', " : "") . " `users`.`room` = '" . ($user->room + 1) . "', `online`.`room` = '" . ($user->room + 1) . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $esth['id'] . "'");
+ mysql_query("INSERT INTO `caveparties` SET `user` = '$esth[id]', `leader` = '$user[id]', `login` = '$esth[login]', `shadow` = '0.png', `x` = '" . $cavedata[$user->getRoom() + 1]['x1'] . "', `y` = '" . $cavedata[$user->getRoom() + 1]['y1'] . "', `dir` = '" . $cavedata[$user->getRoom() + 1]['dir1'] . "', `floor` = 1");
+ mysql_query("UPDATE `users`, `online` SET " . ($nc ? "`users`.`caveleader` = '$user[id]', " : "") . " `users`.`room` = '" . ($user->getRoom() + 1) . "', `online`.`room` = '" . ($user->getRoom() + 1) . "' WHERE `online`.`id` = `users`.`id` AND `online`.`id` = '" . $esth['id'] . "'");
}
if ($nc) {
- $r = mysql_query("SELECT * FROM `cavemaps` WHERE `room` = '$user->room'");
+ $r = mysql_query("SELECT * FROM `cavemaps` WHERE `room` = '$user->getRoom()'");
while ($rec = mysql_fetch_assoc($r)) {
$map = unserialize($rec['map']);
foreach ($map as $k => $v) {
diff --git a/forest.php b/forest.php
index bd68de2..e51ac64 100644
--- a/forest.php
+++ b/forest.php
@@ -7,7 +7,7 @@ if (empty($_SESSION['uid'])) {
exit;
}
require_once "functions.php";
-if ($user->room == 51) {
+if ($user->getRoom() == 51) {
header('location: city.php');
exit;
}
diff --git a/functions.php b/functions.php
index 5e61270..3c9a77d 100644
--- a/functions.php
+++ b/functions.php
@@ -17,7 +17,7 @@ if (empty($_SESSION['uid'])) {
$user = new User($_SESSION['uid']);
}
-if ($user->getId() && $user->block) {
+if ($user->getId() && $user->getBlock()) {
exit('user blocked!');
}
@@ -54,12 +54,12 @@ $fbattleCheckFiles = [
'zayavka.php',
];
//Может просто отовсюду? О_о
-if ($user->battle && in_array(pathinfo(debug_backtrace()[0]['file'])['basename'], $fbattleCheckFiles)) {
+if ($user->getBattle() && in_array(pathinfo(debug_backtrace()[0]['file'])['basename'], $fbattleCheckFiles)) {
header('location: fbattle.php');
exit;
}
$towerinCheckFiles = ['main.php', 'city.php', 'tower.php'];
-if ($user->in_tower && in_array(pathinfo(debug_backtrace()[0]['file'])['basename'], $towerinCheckFiles)) {
+if ($user->getInTower() && in_array(pathinfo(debug_backtrace()[0]['file'])['basename'], $towerinCheckFiles)) {
header('location: towerin.php');
exit;
}
@@ -67,8 +67,8 @@ $roomsCheck = [22, 23, 25, 27, 29, 30, 31, 37, 38, 39, 40, 41, 45, 53, 61, 401,
// Если я в одной из этих комнат,
// [И] Имя файла который инклюдит файл с проверкой не совпадает с именем файла локации в которой я нахожусь
// [И] Номер комнаты который я пытаюсь открыть есть в списке проверяемых
-if (in_array($user->room, $roomsCheck)
- && pathinfo(debug_backtrace()[0]['file'])['basename'] != Travel::$roomFileName[$user->room]
+if (in_array($user->getRoom(), $roomsCheck)
+ && pathinfo(debug_backtrace()[0]['file'])['basename'] != Travel::$roomFileName[$user->getRoom()]
&& in_array(array_search(pathinfo(debug_backtrace()[0]['file'])['basename'], Travel::$roomFileName), $roomsCheck)) {
header('location: main.php');
exit;
@@ -77,7 +77,7 @@ if (in_array($user->room, $roomsCheck)
$ip = filter_input(INPUT_SERVER, 'REMOTE_ADDR', FILTER_VALIDATE_IP);
if (isset($_GET['goto']) && isset($_GET['tStamp']) && isset($_GET['vcode']) && $_GET['vcode'] == md5(sha1($_GET['goto'] . $_GET['tStamp']))) {
db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i, `online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $_GET['goto'], $_GET['goto'], $_SESSION['uid']);
- $user->room = intval($_GET['goto']);
+ $user->setRoom(intval($_GET['goto']));
}
function createbot($bot, $login = "")
@@ -289,9 +289,9 @@ function echoscroll($slot)
{
global $user;
$all_magic = 0;
- if ($user->battle) {
+ if ($user->getBattle()) {
$script = 'fbattle';
- $bat = db::c()->query('SELECT `magic` FROM `battle` WHERE `id` = ?i', $user->battle)->fetch_assoc();
+ $bat = db::c()->query('SELECT `magic` FROM `battle` WHERE `id` = ?i', $user->getBattle())->fetch_assoc();
$all_magic = unserialize($bat['magic']);
} else {
$script = 'main';
@@ -792,7 +792,7 @@ function usemagic($id, $target)
{
global $user;
$row = db::c()->query('SELECT * FROM `inventory` WHERE `owner` = ?i AND id = ?i', $user->getId(), $id)->fetch_assoc_array();
- $bat = db::c()->query('SELECT * FROM `battle` WHERE `id` = ?i', $user->battle)->fetch_assoc_array();
+ $bat = db::c()->query('SELECT * FROM `battle` WHERE `id` = ?i', $user->getBattle())->fetch_assoc_array();
$all_magic = unserialize($bat['magic']);
$charge = 0;
$magic = db::c()->query('SELECT * FROM `magic` WHERE `id` = ?i', $row['magic'])->fetch_assoc_array();
@@ -859,8 +859,8 @@ function usemagic($id, $target)
$charge = 0;
}
//ограничение по кол-ву за ход
- if ($user->battle > 0) {
- $bat = db::c()->query('SELECT * FROM `battle` WHERE `id` = ?i', $user->battle)->fetch_assoc_array();
+ if ($user->getBattle()) {
+ $bat = db::c()->query('SELECT * FROM `battle` WHERE `id` = ?i', $user->getBattle())->fetch_assoc_array();
}
if ($bat['magic'] == '') {
$all_magic = [];
@@ -868,7 +868,7 @@ function usemagic($id, $target)
$all_magic = unserialize($bat['magic']);
}
$all_magic[$user->getId()] += $charge;
- db::c()->query('UPDATE `battle` SET `magic`= "?s" WHERE id = ?i', serialize($all_magic), $user->battle);
+ db::c()->query('UPDATE `battle` SET `magic`= "?s" WHERE id = ?i', serialize($all_magic), $user->getBattle());
}
}
return false;
@@ -878,7 +878,7 @@ function addch($text, $room = 0)
{
global $user;
if ($room == 0) {
- $room = $user->room;
+ $room = $user->getRoom();
}
if ($fp = @fopen("tmp/chat.txt", "a")) { //открытие
flock($fp, LOCK_EX); //БЛОКИРОВКА ФАЙЛА
@@ -894,7 +894,7 @@ function addchp($text, $who, $room = 0)
{
global $user;
if ($room == 0) {
- $room = $user->room;
+ $room = $user->getRoom();
}
$fp = fopen("tmp/chat.txt", "a"); //открытие
flock($fp, LOCK_EX); //БЛОКИРОВКА ФАЙЛА
@@ -942,7 +942,7 @@ function get_meshok()
{
global $user;
$itemsWeight = db::c()->query('SELECT SUM(weight) AS all_weight FROM `inventory` WHERE owner_id = ?i AND on_sale = 0', $_SESSION['uid'])->fetch_assoc();
- return ($user->strength * 4 + $itemsWeight['all_weight']);
+ return ($user->getStrength() * 4 + $itemsWeight['all_weight']);
}
/**
diff --git a/gotzamok.php b/gotzamok.php
index a76bc53..0fadc47 100644
--- a/gotzamok.php
+++ b/gotzamok.php
@@ -8,29 +8,29 @@ $castleOwners = db::c()->query('SELECT * FROM `clans` WHERE `short` = (SELECT *
if ($castleOwners['id'] == $user['klan']) {
// если мой клан
if ($_GET['goto'] == 'arsenal') {
- $user->room = 38;
+ $user->setRoom(38);
}
if ($_GET['goto'] == 'home') {
- $user->room = 37;
+ $user->setRoom(37);
}
if ($_GET['goto'] == 'dvor') {
- $user->room = 39;
+ $user->setRoom(39);
}
if ($_GET['goto'] == 'master') {
- $user->room = 40;
+ $user->setRoom(40);
}
if ($_GET['goto'] == 'rest') {
- $user->room = 41;
+ $user->setRoom(41);
}
if (in_array($_GET['goto'], ['arsenal', 'home', 'dvor', 'master', 'rest'])) {
- db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i,`online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $user->room, $user->room, $_SESSION['uid']);
+ db::c()->query('UPDATE `users`,`online` SET `users`.`room` = ?i,`online`.`room` = ?i WHERE `online`.`id` = `users`.`id` AND `online`.`id` = ?i', $user->getRoom(), $user->getRoom(), $user->getId());
header('location: gotzamok.php');
} else {
$status = 'В этом замке нет такого места!';
}
}
-switch ($user->room) {
+switch ($user->getRoom()) {
case '37' :
$backgroundImage = '689_small_550.jpg';
break;
@@ -39,8 +39,8 @@ switch ($user->room) {
break;
}
-if ($user->room == 38) {
- $glava = db::c()->query('SELECT `glava` FROM `clans` WHERE `short` = "?s"', $user['klan'])->fetch_assoc();
+if ($user->getRoom() == 38) {
+ $glava = db::c()->query('SELECT owner_id FROM `clans` WHERE `short` = "?s"', $user['klan'])->fetch_assoc();
// возврат шмотки
if ($_GET['back']) {
$item = db::c()->query('SELECT * FROM `gotzam_arsenal` WHERE `id` = ?i', $_GET['back'])->fetch_assoc();
@@ -63,7 +63,7 @@ if ($user->room == 38) {
}
}
-if ($user->room == 40) {
+if ($user->getRoom() == 40) {
$at = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzam_att')->fetch_assoc();
$def = db::c()->query('SELECT * FROM `variables` WHERE `var` = "?s"', 'gotzam_def')->fetch_assoc();
@@ -107,32 +107,32 @@ if ($castleOwners['id'] == $user['klan']) { ?>
- if ($user->room == 37): ?>
+ if ($user->getRoom() == 37): ?>
- if ($user->room == 38): ?>
+ if ($user->getRoom() == 38): ?>
- if ($user->room == 39): ?>
+ if ($user->getRoom() == 39): ?>
- if ($user->room == 40): ?>
+ if ($user->getRoom() == 40): ?>
- if ($user->room == 41): ?>
+ if ($user->getRoom() == 41): ?>
|
- room == 38): ?>
+ getRoom() == 38): ?>
Арсенал
@@ -175,7 +175,7 @@ if ($castleOwners['id'] == $user['klan']) { ?>
room == 40): ?>
+ if ($user->getRoom() == 40): ?>
Мастерские
Здесь вы можете улучшить оборонные способности вашего замка.
@@ -192,7 +192,7 @@ if ($castleOwners['id'] == $user['klan']) { ?>
room == 41): ?>
+ if ($user->getRoom() == 41): ?>
Комнаты отдыха
Посиди в тишине, внутри стен. Тут нет врагов. Тут спокойно.
diff --git a/lab.php b/lab.php
index 13db79f..58a40e0 100644
--- a/lab.php
+++ b/lab.php
@@ -18,7 +18,7 @@ $u_res = mysql_fetch_array(mysql_query("select * from `lab_user` where `id_user`
room) . "';"));
+$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '" . mysql_real_escape_string($user->getRoom()) . "';"));
if ($_GET['healall'] == 1) {
$cost = $_GET['cost'];
@@ -124,7 +124,7 @@ if ($_GET['mobkill'] == 1) {
}
$rand_hp1 = rand(1, 10);
$rand_hp = $rand_hp1 * $user['level'];
- $bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->room . "' LIMIT 1"));
+ $bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->getRoom() . "' LIMIT 1"));
$hels = $bot['bot_hp'] - $rand_hp;
if ($hels < 0) {
echo " Вы убили моба!";
@@ -135,11 +135,11 @@ if ($_GET['mobkill'] == 1) {
echo "Вы получили 1 записку! ";
Mysql_query("update `lab_user` set `zad" . $u_res['zadanie'] . "_kol`=`zad" . $u_res['zadanie'] . "_kol`+'1' where `id_user`='" . $user['id'] . "'");
}
- mysql_query("delete from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->room . "' LIMIT 1");
+ mysql_query("delete from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->getRoom() . "' LIMIT 1");
//если просто убивалка
} else {
Mysql_query("update `lab_user` set `zad" . $u_res['zadanie'] . "_kol`=`zad" . $u_res['zadanie'] . "_kol`+'1' where `id_user`='" . $user['id'] . "'");
- mysql_query("delete from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->room . "' LIMIT 1");
+ mysql_query("delete from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->getRoom() . "' LIMIT 1");
}
} else {
echo "Вы отняли у моба - " . $rand_hp . " HP! ";
@@ -177,7 +177,7 @@ if ($_GET['exit'] && $room['exit'] == 1) {
if ($_GET['get']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_inv` WHERE `id` = '" . mysql_real_escape_string($_GET['get']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
switch ($data['type']) {
case 1:
@@ -241,13 +241,13 @@ if ($_GET['get']) {
if ($_GET['drop']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_tmp` WHERE `id` = '" . mysql_real_escape_string($_GET['drop']) . "' AND `id_user`='" . $user['id'] . "';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id` = '" . mysql_real_escape_string($data['id']) . "' AND `id_user`='" . $user['id'] . "' LIMIT 1;");
- mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('" . mysql_real_escape_string($user->room) . "','" . mysql_real_escape_string($data['type']) . "','" . mysql_real_escape_string($data['value']) . "','" . mysql_real_escape_string($user['id']) . "');");
+ mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('" . mysql_real_escape_string($user->getRoom()) . "','" . mysql_real_escape_string($data['type']) . "','" . mysql_real_escape_string($data['value']) . "','" . mysql_real_escape_string($user['id']) . "');");
unset($data);
}
if ($_GET['nal1']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '" . mysql_real_escape_string($_GET['nal1']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='1';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='1';");
mysql_query("UPDATE `users` SET `money` = `money`+'" . mysql_real_escape_string($sum[0]) . "' WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
@@ -259,7 +259,7 @@ if ($_GET['nal1']) {
if ($_GET['nal2']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '" . mysql_real_escape_string($_GET['nal2']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='3';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='3';");
mysql_query("UPDATE `users` SET `doblest` = `doblest`+'" . mysql_real_escape_string($sum[0]) . "' WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
@@ -271,7 +271,7 @@ if ($_GET['nal2']) {
if ($_GET['nal3']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '" . mysql_real_escape_string($_GET['nal3']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='8';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='8';");
mysql_query("UPDATE `bank` SET `ekr` = `ekr`+'" . mysql_real_escape_string($sum[0]) . "' WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
@@ -283,7 +283,7 @@ if ($_GET['nal3']) {
if ($_GET['nal4']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '" . mysql_real_escape_string($_GET['nal4']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='9';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='9';");
mysql_query("UPDATE `users` SET `exp` = `exp`+'" . mysql_real_escape_string($sum[0]) . "' WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
@@ -299,28 +299,28 @@ if ($_GET['go']) {
switch ($_GET['go']) {
case "p1":
mysql_query("UPDATE `users` SET `room` = '" . mysql_real_escape_string($room['p1']) . "', `fullhptime` = " . time() . " WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
- $user->room = $room['p1'];
+ $user->setRoom($room['p1']);
$_SESSION['time'] = time();
break;
case "p2":
mysql_query("UPDATE `users` SET `room` = '" . mysql_real_escape_string($room['p2']) . "', `fullhptime` = " . time() . " WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
- $user->room = $room['p2'];
+ $user->setRoom($room['p2']);
$_SESSION['time'] = time();
break;
case "p3":
mysql_query("UPDATE `users` SET `room` = '" . mysql_real_escape_string($room['p3']) . "', `fullhptime` = " . time() . " WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
- $user->room = $room['p3'];
+ $user->setRoom($room['p3']);
$_SESSION['time'] = time();
break;
case "p4":
mysql_query("UPDATE `users` SET `room` = '" . mysql_real_escape_string($room['p4']) . "', `fullhptime` = " . time() . " WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
- $user->room = $room['p4'];
+ $user->setRoom($room['p4']);
$_SESSION['time'] = time();
break;
}
}
-$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '" . mysql_real_escape_string($user->room) . "';"));
+$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '" . mysql_real_escape_string($user->getRoom()) . "';"));
if ($user['hp'] <= 0) {
mysql_query("DELETE FROM `lab_trap` WHERE `id_user` = '" . $user['id'] . "'");
@@ -335,12 +335,12 @@ if ($user['hp'] <= 0) {
}
-$data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '" . mysql_real_escape_string($user->room) . "' AND `id_user`='" . $user['id'] . "';");
+$data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '" . mysql_real_escape_string($user->getRoom()) . "' AND `id_user`='" . $user['id'] . "';");
$data2 = mysql_query("SELECT * FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "';");
$data3 = mysql_query("SELECT * FROM `users` WHERE `lab` = 1 AND `room` = '" . mysql_real_escape_string($room['id']) . "';");
$data4 = mysql_query("SELECT * FROM `lab_bots` WHERE `id_room` = '" . mysql_real_escape_string($room['id']) . "' AND `id_user`='" . $user['id'] . "';");
-$roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '" . mysql_real_escape_string($user->room) . "' AND `id_user`='" . $user['id'] . "';"));
+$roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '" . mysql_real_escape_string($user->getRoom()) . "' AND `id_user`='" . $user['id'] . "';"));
if ($roow[0]) {
$msg .= 'В комнате была установлена ловушка... ';
@@ -390,7 +390,7 @@ for ($i = 0; $i < mysql_num_rows($log); $i++) {
}
-echo "" . $room['name'] . " (" . $user->room . ")";
+echo "" . $room['name'] . " (" . $user->getRoom() . ")";
echo " | | | | ";
$u_lab = mysql_query("select `login` from `users` where `lab`='1' and `bot`!='1'");
$u_lab_kol = mysql_num_rows($u_lab);
diff --git a/lab2.php b/lab2.php
index 395a970..f03e7e1 100644
--- a/lab2.php
+++ b/lab2.php
@@ -16,7 +16,7 @@ $u_res = mysql_fetch_array(mysql_query("select * from `lab_user` where `id_user`
setTimeout("document.all['b1'].disabled=false;document.all['b2'].disabled=false;document.all['b3'].disabled=false;document.all['b4'].disabled=false;", =(3 - $tt)?>000);
room) . "';"));
+$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '" . mysql_real_escape_string($user->getRoom()) . "';"));
if ($_GET['healall'] == 1) {
$cost = $_GET['cost'];
@@ -122,7 +122,7 @@ if ($_GET['mobkill'] == 1) {
}
$rand_hp1 = rand(1, 10);
$rand_hp = $rand_hp1 * $user['level'];
- $bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->room . "' LIMIT 1"));
+ $bot = mysql_fetch_array(mysql_query("select * from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->getRoom() . "' LIMIT 1"));
$hels = $bot['bot_hp'] - $rand_hp;
if ($hels < 0) {
echo "Вы убили моба! ";
@@ -133,11 +133,11 @@ if ($_GET['mobkill'] == 1) {
echo "Вы получили 1 записку! ";
Mysql_query("update `lab_user` set `zad" . $u_res['zadanie'] . "_kol`=`zad" . $u_res['zadanie'] . "_kol`+'1' where `id_user`='" . $user['id'] . "'");
}
- mysql_query("delete from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->room . "' LIMIT 1");
+ mysql_query("delete from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->getRoom() . "' LIMIT 1");
//если просто убивалка
} else {
Mysql_query("update `lab_user` set `zad" . $u_res['zadanie'] . "_kol`=`zad" . $u_res['zadanie'] . "_kol`+'1' where `id_user`='" . $user['id'] . "'");
- mysql_query("delete from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->room . "' LIMIT 1");
+ mysql_query("delete from `lab_bots` where `id_bot`='" . $id . "' AND `id_user`='" . $user['id'] . "' AND `id_room`='" . $user->getRoom() . "' LIMIT 1");
}
} else {
echo "Вы отняли у моба -" . $rand_hp . " HP! ";
@@ -175,7 +175,7 @@ if ($_GET['exit'] && $room['exit'] == 1) {
if ($_GET['get']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_inv` WHERE `id` = '" . mysql_real_escape_string($_GET['get']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
switch ($data['type']) {
case 1:
@@ -239,13 +239,13 @@ if ($_GET['get']) {
if ($_GET['drop']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_tmp` WHERE `id` = '" . mysql_real_escape_string($_GET['drop']) . "' AND `id_user`='" . $user['id'] . "';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id` = '" . mysql_real_escape_string($data['id']) . "' AND `id_user`='" . $user['id'] . "' LIMIT 1;");
- mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('" . mysql_real_escape_string($user->room) . "','" . mysql_real_escape_string($data['type']) . "','" . mysql_real_escape_string($data['value']) . "','" . mysql_real_escape_string($user['id']) . "');");
+ mysql_query("INSERT INTO `lab_inv` (`id_room`,`type`,`value`,`id_user`) values ('" . mysql_real_escape_string($user->getRoom()) . "','" . mysql_real_escape_string($data['type']) . "','" . mysql_real_escape_string($data['value']) . "','" . mysql_real_escape_string($user['id']) . "');");
unset($data);
}
if ($_GET['nal1']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '" . mysql_real_escape_string($_GET['nal1']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='1';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='1';");
mysql_query("UPDATE `users` SET `money` = `money`+'" . mysql_real_escape_string($sum[0]) . "' WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
@@ -257,7 +257,7 @@ if ($_GET['nal1']) {
if ($_GET['nal2']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '" . mysql_real_escape_string($_GET['nal2']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='3';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='3';");
mysql_query("UPDATE `users` SET `patriotizm` = `patriotizm`+'" . mysql_real_escape_string($sum[0]) . "' WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
@@ -269,7 +269,7 @@ if ($_GET['nal2']) {
if ($_GET['nal3']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '" . mysql_real_escape_string($_GET['nal3']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='8';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='8';");
mysql_query("UPDATE `bank` SET `ekr` = `ekr`+'" . mysql_real_escape_string($sum[0]) . "' WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
@@ -281,7 +281,7 @@ if ($_GET['nal3']) {
if ($_GET['nal4']) {
$data = mysql_fetch_array(mysql_query("SELECT * FROM `lab_bots` WHERE `id` = '" . mysql_real_escape_string($_GET['nal4']) . "' AND `id_user`='" . $user['id'] . "';"));
- if ($data['id_room'] == $user->room) {
+ if ($data['id_room'] == $user->getRoom()) {
$sum = mysql_fetch_array(mysql_query("SELECT SUM(`value`) FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='9';"));
mysql_query("DELETE FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "' AND `type`='9';");
mysql_query("UPDATE `users` SET `exp` = `exp`+'" . mysql_real_escape_string($sum[0]) . "' WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
@@ -297,28 +297,28 @@ if ($_GET['go']) {
switch ($_GET['go']) {
case "p1":
mysql_query("UPDATE `users` SET `room` = '" . mysql_real_escape_string($room['p1']) . "', `fullhptime` = " . time() . " WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
- $user->room = $room['p1'];
+ $user->setRoom($room['p1']);
$_SESSION['time'] = time();
break;
case "p2":
mysql_query("UPDATE `users` SET `room` = '" . mysql_real_escape_string($room['p2']) . "', `fullhptime` = " . time() . " WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
- $user->room = $room['p2'];
+ $user->setRoom($room['p2']);
$_SESSION['time'] = time();
break;
case "p3":
mysql_query("UPDATE `users` SET `room` = '" . mysql_real_escape_string($room['p3']) . "', `fullhptime` = " . time() . " WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
- $user->room = $room['p3'];
+ $user->setRoom($room['p3']);
$_SESSION['time'] = time();
break;
case "p4":
mysql_query("UPDATE `users` SET `room` = '" . mysql_real_escape_string($room['p4']) . "', `fullhptime` = " . time() . " WHERE `id` = '" . mysql_real_escape_string($user['id']) . "';");
- $user->room = $room['p4'];
+ $user->setRoom($room['p4']);
$_SESSION['time'] = time();
break;
}
}
-$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '" . mysql_real_escape_string($user->room) . "';"));
+$room = mysql_fetch_array(mysql_query("SELECT * FROM `lab_rooms` WHERE `id` = '" . mysql_real_escape_string($user->getRoom()) . "';"));
if ($user['hp'] <= 0) {
mysql_query("DELETE FROM `lab_trap` WHERE `id_user` = '" . $user['id'] . "'");
@@ -333,12 +333,12 @@ if ($user['hp'] <= 0) {
}
-$data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '" . mysql_real_escape_string($user->room) . "' AND `id_user`='" . $user['id'] . "';");
+$data = mysql_query("SELECT * FROM `lab_inv` WHERE `id_room` = '" . mysql_real_escape_string($user->getRoom()) . "' AND `id_user`='" . $user['id'] . "';");
$data2 = mysql_query("SELECT * FROM `lab_tmp` WHERE `id_user` = '" . mysql_real_escape_string($user['id']) . "';");
$data3 = mysql_query("SELECT * FROM `users` WHERE `lab` = 1 AND `room` = '" . mysql_real_escape_string($room['id']) . "';");
$data4 = mysql_query("SELECT * FROM `lab_bots` WHERE `id_room` = '" . mysql_real_escape_string($room['id']) . "' AND `id_user`='" . $user['id'] . "';");
-$roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '" . mysql_real_escape_string($user->room) . "' AND `id_user`='" . $user['id'] . "';"));
+$roow = mysql_fetch_array(mysql_query("SELECT * FROM `lab_trap` WHERE `id_room` = '" . mysql_real_escape_string($user->getRoom()) . "' AND `id_user`='" . $user['id'] . "';"));
if ($roow[0]) {
$msg .= 'В комнате была установлена ловушка... ';
@@ -388,7 +388,7 @@ for ($i = 0; $i < mysql_num_rows($log); $i++) {
}
-echo "" . $room['name'] . " (" . $user->room . ") | ";
+echo "" . $room['name'] . " (" . $user->getRoom() . ")";
echo " | | | | ";
$u_lab = mysql_query("select `login` from `users` where `lab`='1' and `bot`!='1'");
$u_lab_kol = mysql_num_rows($u_lab);
diff --git a/lab_enter.php b/lab_enter.php
index e2bfabd..bbfc7ad 100644
--- a/lab_enter.php
+++ b/lab_enter.php
@@ -308,7 +308,7 @@ Template::header('Вход в Лабиринты');
if (isset($_GET['del_com'])) {
- if ($user->admin) {
+ if ($user->getAdmin()) {
mysql_query('UPDATE `laba_zv` SET `com` = "" WHERE `id` = "' . (int)$_GET['del_com'] . '" LIMIT 1');
$re = 'Комментарий удалён';
} else {
@@ -400,7 +400,7 @@ while ($pl = mysql_fetch_array($sp)) {
}
$userszv = ltrim($userszv, ', ');
if ($pl['com'] != '') {
- if ($user->admin) {
+ if ($user->getAdmin()) {
$del = ' Удалить комментарий';
} else {
$del = '';
diff --git a/magic/attack.php b/magic/attack.php
index acf1ff1..9dc94f6 100644
--- a/magic/attack.php
+++ b/magic/attack.php
@@ -36,7 +36,7 @@ if ($user['battle'] > 0) {
echo "Персонаж тяжело травмирован...";
} elseif ($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
echo "Чтите честь ваших сокланов.";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] ==603 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -95,7 +95,7 @@ if ($user['battle'] > 0) {
} else {
$ttt = 1;
}
- addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room);
+ addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -158,7 +158,7 @@ if ($user['battle'] > 0) {
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/attack_blood.php b/magic/attack_blood.php
index 7eea3c6..8742215 100644
--- a/magic/attack_blood.php
+++ b/magic/attack_blood.php
@@ -32,7 +32,7 @@ if($vip['bloodattack'] <= 0) {
echo "Персонаж тяжело травмирован...";
} elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
echo "Чтите честь ваших сокланов.";
-} elseif($user->room != $us['room']) {
+} elseif($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) {
echo "Нападения в этой локации запрещены!";
@@ -82,7 +82,7 @@ if($vip['bloodattack'] <= 0) {
$ttt = 1;
}
- addch("".$los." вмешался в поединок »».", $user->room);
+ addch("".$los." вмешался в поединок »».", $user->getRoom());
if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); }
addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок! ');
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1');
@@ -121,7 +121,7 @@ if($vip['bloodattack'] <= 0) {
$ld = Nick::id($user['id'])->full(1);
$lds = Nick::id($user['id'])->short();
$rr = "".$ld." и ".Nick::id($jert['id'])->full(1)."";
- addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room);
+ addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->getRoom());
addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
header("Location: fbattle.php");
diff --git a/magic/attack_t.php b/magic/attack_t.php
index c9553e5..52b0377 100644
--- a/magic/attack_t.php
+++ b/magic/attack_t.php
@@ -39,7 +39,7 @@ elseif (!$us['online']) {
echo "Чтите честь ваших сокланов.";
} elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) {
echo "Чтите честь братьев.";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -106,7 +106,7 @@ elseif (!$us['online']) {
} else {
$ttt = 1;
}
- addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room);
+ addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -169,7 +169,7 @@ elseif (!$us['online']) {
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ');");
addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/attackbot.php b/magic/attackbot.php
index 57d6cb0..2273213 100644
--- a/magic/attackbot.php
+++ b/magic/attackbot.php
@@ -61,7 +61,7 @@ if ($user['battle'] > 0) {
} else {
$ttt = 1;
}
- addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room);
+ addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
diff --git a/magic/attackk.php b/magic/attackk.php
index 06b131a..a4ac153 100644
--- a/magic/attackk.php
+++ b/magic/attackk.php
@@ -32,7 +32,7 @@ if ($user['battle'] > 0) {
echo "Персонаж под защитой от нападений ...";
} elseif ($owntravma['id'] && !$us['battle']) {
echo "Персонаж тяжело травмирован...";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['level'] < 1) {
echo "Новички находятся под защитой Мироздателя!";
@@ -81,7 +81,7 @@ if ($user['battle'] > 0) {
} else {
$ttt = 1;
}
- addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »». ", $user->room);
+ addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »». ", $user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -146,7 +146,7 @@ if ($user['battle'] > 0) {
$rr = "" . Nick::id($user['id'])->full(1) . " и " . Nick::id($jert['id'])->full(1) . "";
- addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user->room);
+ addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/attackk_close.php b/magic/attackk_close.php
index 7db87e6..4211c78 100644
--- a/magic/attackk_close.php
+++ b/magic/attackk_close.php
@@ -39,7 +39,7 @@ elseif (!$us['online']) {
echo "Персонаж под защитой от нападений ...";
} elseif ($owntravma['id'] && !$us['battle']) {
echo "Персонаж тяжело травмирован...";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -133,7 +133,7 @@ elseif (!$us['online']) {
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/attackk_open.php b/magic/attackk_open.php
index 372e0a7..4fee63f 100644
--- a/magic/attackk_open.php
+++ b/magic/attackk_open.php
@@ -39,7 +39,7 @@ if ($user['battle'] > 0) {
echo "Вы ожидаете поединка...";
} elseif ($owntravma['id'] && !$us['battle']) {
echo "Персонаж тяжело травмирован...";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -133,7 +133,7 @@ if ($user['battle'] > 0) {
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/battack.php b/magic/battack.php
index a5d137b..60b77ae 100644
--- a/magic/battack.php
+++ b/magic/battack.php
@@ -39,7 +39,7 @@ elseif (!$us['online']) {
echo "Чтите честь ваших сокланов.";
} elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) {
echo "Чтите честь братьев.";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -106,7 +106,7 @@ elseif (!$us['online']) {
} else {
$ttt = 1;
}
- addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room);
+ addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -169,7 +169,7 @@ elseif (!$us['online']) {
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ');");
addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/bexit.php b/magic/bexit.php
index 577d4bc..8190e2d 100644
--- a/magic/bexit.php
+++ b/magic/bexit.php
@@ -9,7 +9,7 @@ $raid_t = mysql_fetch_array(mysql_query("SELECT * FROM variables WHERE var='raid
if ($user['battle'] == 0) {
echo "Это боевая магия...";
-} elseif ($user->room == 600 || $user->room == 601 || $user->room == 602 || $us['room'] == 43 || $us['room'] == 45) {
+} elseif ($user->getRoom() == 600 || $user->getRoom() == 601 || $user->getRoom() == 602 || $us['room'] == 43 || $us['room'] == 45) {
echo "В этой локации выход из боя запрещен!";
} elseif ($user['battle'] == $raid_t['value']) {
echo "Вы защищаете весь город, а не только себя. Победа или смерть!";
diff --git a/magic/brat.php b/magic/brat.php
index d9d0936..2838264 100644
--- a/magic/brat.php
+++ b/magic/brat.php
@@ -24,7 +24,7 @@ elseif ($user['zayavka'] > 0) {
} elseif ($us['align']!=3) {
echo "Персонаж не с темной склонностью!";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -78,7 +78,7 @@ elseif ($user['zayavka'] > 0) {
} else {
$ttt = 2;
}
- addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room);
+ addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -142,7 +142,7 @@ elseif ($user['zayavka'] > 0) {
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/cityattack.php b/magic/cityattack.php
index 9206970..4c0a7c3 100644
--- a/magic/cityattack.php
+++ b/magic/cityattack.php
@@ -1,5 +1,5 @@
room == 20) {
+if ($user->getRoom() == 20) {
//нападение
$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;"));
@@ -18,7 +18,7 @@ if ($user->room == 20) {
echo "Вы ожидаете поединка...";
} elseif ($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
echo "Чтите честь ваших сокланов.";
- } elseif ($user->room != $us['room']) {
+ } elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['level'] < 3) {
echo "Нельзя напасть на персонажа ниже 3 уровня! Даже ночью, даже на Центральной площади...";
@@ -61,7 +61,7 @@ if ($user->room == 20) {
} else {
$ttt = 1;
}
- addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »». ", $user->room);
+ addch("" . Nick::id($user['id'])->short() . " вмешался в поединок »». ", $user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -125,7 +125,7 @@ if ($user->room == 20) {
$rr = "" . Nick::id($user['id'])->full(1) . " и " . Nick::id($jert['id'])->full(1) . "";
- addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user->room);
+ addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($jert['id'])->short() . " начался. ", $user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}',"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/cpattack.php b/magic/cpattack.php
index 47f53d6..9059c4d 100644
--- a/magic/cpattack.php
+++ b/magic/cpattack.php
@@ -51,7 +51,7 @@ elseif (!$us['online']) {
echo "Вы ожидаете поединка...";
} elseif ($owntravma['id'] && !$us['battle']) {
echo "Персонаж тяжело травмирован...";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -106,7 +106,7 @@ elseif (!$us['online']) {
} else {
$ttt = 1;
}
- addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room);
+ addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -169,7 +169,7 @@ elseif (!$us['online']) {
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ');");
diff --git a/magic/defence.php b/magic/defence.php
index 4a989fd..9c7e040 100644
--- a/magic/defence.php
+++ b/magic/defence.php
@@ -13,7 +13,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";}
elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; }
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Защита от Оружия"; }
-elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
+elseif ($user->getRoom() != $us['room']) { echo "Персонаж в другой комнате!"; }
elseif (!$us['online']) {echo "Персонаж не в игре!";}
elseif (rand(1,100) < $int) {
diff --git a/magic/devastate.php b/magic/devastate.php
index 0dbbb65..bef799f 100644
--- a/magic/devastate.php
+++ b/magic/devastate.php
@@ -14,7 +14,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";}
elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; }
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Сокрушение"; }
-elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
+elseif ($user->getRoom() != $us['room']) { echo "Персонаж в другой комнате!"; }
elseif (!$us['online']) {echo "Персонаж не в игре!";}
elseif (rand(1,100) < $int) {
diff --git a/magic/eattack.php b/magic/eattack.php
index b14f2cd..e055bba 100644
--- a/magic/eattack.php
+++ b/magic/eattack.php
@@ -46,7 +46,7 @@ elseif ($user['zayavka'] > 0) {
echo "Чтите честь ваших сокланов.";
} elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) {
echo "Чтите честь братьев.";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -111,7 +111,7 @@ elseif ($user['zayavka'] > 0) {
} else {
$ttt = 1;
}
- addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room);
+ addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -182,7 +182,7 @@ $outok=1;
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ');");
diff --git a/magic/ebattack.php b/magic/ebattack.php
index a05bd3c..0ff0873 100644
--- a/magic/ebattack.php
+++ b/magic/ebattack.php
@@ -46,7 +46,7 @@ elseif ($user['zayavka'] > 0) {
echo "Чтите честь ваших сокланов.";
} elseif ($user['align'] >1 && $user['align'] <2 && $us['align'] >1 && $us['align'] <2) {
echo "Чтите честь братьев.";
-} elseif ($user->room != $us['room']) {
+} elseif ($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] ==45) {
echo "Нападения в этой локации запрещены!";
@@ -111,7 +111,7 @@ elseif ($user['zayavka'] > 0) {
} else {
$ttt = 1;
}
- addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->room);
+ addch ("".Nick::id($user['id'])->short()." вмешался в поединок »». ",$user->getRoom());
//mysql_query('UPDATE `logs` SET `log` = CONCAT(`log`,\''.date("H:i").' '.nick::id($user['id'])->short().' вмешался в поединок! \') WHERE `id` = '.$jert['battle'].'');
@@ -182,7 +182,7 @@ $outok=1;
$rr = "".Nick::id($user['id'])->full(1)." и ".Nick::id($jert['id'])->full(1)."";
- addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->room);
+ addch ("Бой между ".Nick::id($user['id'])->short()." и ".Nick::id($jert['id'])->short()." начался. ",$user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ');");
addlog($id,"Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
diff --git a/magic/elikbroni.php b/magic/elikbroni.php
index fa5f26b..383d5ab 100644
--- a/magic/elikbroni.php
+++ b/magic/elikbroni.php
@@ -12,7 +12,7 @@ else {$int=0;}
if ($user['battle'] > 0) {echo "РќРµ РІ Р±РѕСЋ...";}
elseif ($user['level'] < 0) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
elseif ($effect['time']) {echo "РќР° персонаже уже есть заклятие Рликсир Р±СЂРѕРЅРё +5"; }
-elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
+elseif ($user->getRoom() != $us['room']) { echo "Персонаж в другой комнате!"; }
elseif (!$us['online']) {echo "Персонаж не в игре!";}
elseif (rand(0,100) < $int) {
diff --git a/magic/elikurona.php b/magic/elikurona.php
index 086e31e..5afc161 100644
--- a/magic/elikurona.php
+++ b/magic/elikurona.php
@@ -12,7 +12,7 @@
if ($user['battle'] > 0) {echo "РќРµ РІ Р±РѕСЋ...";}
elseif ($user['level'] < 0) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
elseif ($effect['time']) {echo "РќР° персонаже уже есть заклятие Рликсир СѓСЂРѕРЅР° +3"; }
- elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
+ elseif ($user->getRoom() != $us['room']) { echo "Персонаж в другой комнате!"; }
elseif (!$us['online']) {echo "Персонаж не в игре!";}
elseif (rand(0,100) < $int) {
diff --git a/magic/fist_def.php b/magic/fist_def.php
index 8e50093..531edc4 100644
--- a/magic/fist_def.php
+++ b/magic/fist_def.php
@@ -7,7 +7,7 @@ $int=101;
if ($user['battle'] > 0) {echo "Не в бою...";}
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Защита от кулачного нападения"; }
-elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
+elseif ($user->getRoom() != $us['room']) { echo "Персонаж в другой комнате!"; }
elseif (!$us['online']) {echo "Персонаж не в игре!";}
elseif (rand(1,100) < $int) {
diff --git a/magic/luck.php b/magic/luck.php
index 49ba4ea..f53373d 100644
--- a/magic/luck.php
+++ b/magic/luck.php
@@ -33,7 +33,7 @@ if ($user['battle'] > 0) {echo "Не в бою...";}
elseif ($user['level'] < 4) { echo "Вашего уровня не достаточно для использования этого заклинания!"; }
elseif ($us['level'] < 4) { echo "Запрещено применять на персонажей до 4 уровня!"; }
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Удача"; }
-elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
+elseif ($user->getRoom() != $us['room']) { echo "Персонаж в другой комнате!"; }
elseif (!$us['online']) {echo "Персонаж не в игре!";}
elseif (rand(1,100) < $int) {
diff --git a/magic/pers_blood.php b/magic/pers_blood.php
index 317bb13..ba285b0 100644
--- a/magic/pers_blood.php
+++ b/magic/pers_blood.php
@@ -25,7 +25,7 @@ if($vip['pers_attack'] <= 0) {
echo "Персонаж тяжело травмирован...";
} elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
echo "Чтите честь ваших сокланов.";
-} elseif($user->room != $us['room']) {
+} elseif($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) {
echo "Нападения в этой локации запрещены!";
@@ -76,7 +76,7 @@ if($vip['pers_attack'] <= 0) {
$ttt = 1;
}
- addch("".$los." вмешался в поединок »».", $user->room);
+ addch("".$los." вмешался в поединок »».", $user->getRoom());
if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); }
addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок! ');
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1');
@@ -115,7 +115,7 @@ if($vip['pers_attack'] <= 0) {
$ld = Nick::id($user['id'])->full(1);
$lds = Nick::id($user['id'])->short();
$rr = "".$ld." и ".Nick::id($jert['id'])->full(1)."";
- addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room);
+ addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->getRoom());
addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
header("Location: fbattle.php");
diff --git a/magic/stop.php b/magic/stop.php
index 355a42e..c402462 100644
--- a/magic/stop.php
+++ b/magic/stop.php
@@ -6,7 +6,7 @@ if (empty($_SESSION['uid'])) {
if ($user['invis'] == 1) {
$user['login'] = 'невидимка';
}
-if (($user->room > 2000) && ($user->room < 2100)) {
+if (($user->getRoom() > 2000) && ($user->getRoom() < 2100)) {
echo "Не в Проходе...";
} else {
$magictime = (time() + 10 * 60);
@@ -18,7 +18,7 @@ if (($user->room > 2000) && ($user->room < 2100)) {
echo "На персонаже \"$target\" уже есть путы ";
} else {
- if ($tar['room'] == $user->room) {
+ if ($tar['room'] == $user->getRoom()) {
if (mysql_query("INSERT INTO `effects` (`owner`,`name`,`time`,`type`) values ('" . $tar['id'] . "','Путы','$magictime',10);")) {
$ldtarget = $target;
diff --git a/magic/stop_200.php b/magic/stop_200.php
index 8d7586e..2d6cba0 100644
--- a/magic/stop_200.php
+++ b/magic/stop_200.php
@@ -7,7 +7,7 @@ if (empty($_SESSION['uid'])) {
if ($user['invis'] == 1) {
$user['login'] = 'невидимка';
}
-if (($user->room > 2000) && ($user->room < 2100)) {
+if (($user->getRoom() > 2000) && ($user->getRoom() < 2100)) {
echo "Не в Проходе...";
} else {
$magictime = (time() + 10 * 60 * 10);
@@ -19,7 +19,7 @@ if (($user->room > 2000) && ($user->room < 2100)) {
echo "На персонаже \"$target\" уже есть путы ";
} else {
- if ($tar['room'] == $user->room) {
+ if ($tar['room'] == $user->getRoom()) {
if (mysql_query("INSERT INTO `effects` (`owner`,`name`,`time`,`type`) values ('" . $tar['id'] . "','Паралич','$magictime',10);")) {
$ldtarget = $target;
diff --git a/magic/usability_klan/attack.php b/magic/usability_klan/attack.php
index 067a153..ae1ed9e 100644
--- a/magic/usability_klan/attack.php
+++ b/magic/usability_klan/attack.php
@@ -32,7 +32,7 @@ if($vip['attack'] <= 0) {
echo "Персонаж тяжело травмирован...";
} elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
echo "Чтите честь ваших сокланов.";
-} elseif($user->room != $us['room']) {
+} elseif($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) {
echo "Нападения в этой локации запрещены!";
@@ -83,7 +83,7 @@ if($vip['attack'] <= 0) {
$ttt = 1;
}
- addch("".$los." вмешался в поединок »».", $user->room);
+ addch("".$los." вмешался в поединок »».", $user->getRoom());
if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); }
addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок! ');
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\') WHERE `id` = "'.$jert['battle'].'" LIMIT 1');
@@ -122,7 +122,7 @@ if($vip['attack'] <= 0) {
$ld = Nick::id($user['id'])->full(1);
$lds = Nick::id($user['id'])->short();
$rr = "".$ld." и ".Nick::id($jert['id'])->full(1)."";
- addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room);
+ addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->getRoom());
addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
mysql_query("UPDATE users SET `battle` = {$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
header("Location: fbattle.php");
diff --git a/magic/usability_klan/attack_blood.php b/magic/usability_klan/attack_blood.php
index 24b3834..4e2b1a6 100644
--- a/magic/usability_klan/attack_blood.php
+++ b/magic/usability_klan/attack_blood.php
@@ -32,7 +32,7 @@ if($vip['bloodattack'] <= 0) {
echo "Персонаж тяжело травмирован...";
} elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
echo "Чтите честь ваших сокланов.";
-} elseif($user->room != $us['room']) {
+} elseif($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) {
echo "Нападения в этой локации запрещены!";
@@ -83,7 +83,7 @@ if($vip['bloodattack'] <= 0) {
$ttt = 1;
}
- addch("".$los." вмешался в поединок »».", $user->room);
+ addch("".$los." вмешался в поединок »».", $user->getRoom());
if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); }
addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок! ');
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1');
@@ -122,7 +122,7 @@ if($vip['bloodattack'] <= 0) {
$ld = Nick::id($user['id'])->full(1);
$lds = Nick::id($user['id'])->short();
$rr = "".$ld." и ".Nick::id($jert['id'])->full(1)."";
- addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room);
+ addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->getRoom());
addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
header("Location: fbattle.php");
diff --git a/magic/usability_user/attack.php b/magic/usability_user/attack.php
index 9357538..f2f17f5 100644
--- a/magic/usability_user/attack.php
+++ b/magic/usability_user/attack.php
@@ -32,7 +32,7 @@ if($vip['attack'] <= 0) {
echo "Персонаж тяжело травмирован...";
} elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
echo "Чтите честь ваших сокланов.";
-} elseif($user->room != $us['room']) {
+} elseif($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) {
echo "Нападения в этой локации запрещены!";
@@ -83,7 +83,7 @@ if($vip['attack'] <= 0) {
$ttt = 1;
}
- addch("".$los." вмешался в поединок »».", $user->room);
+ addch("".$los." вмешался в поединок »».", $user->getRoom());
if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); }
addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок! ');
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\') WHERE `id` = "'.$jert['battle'].'" LIMIT 1');
@@ -122,7 +122,7 @@ if($vip['attack'] <= 0) {
$ld = Nick::id($user['id'])->full(1);
if($user['invis'] == 1) { $lds = 'невидимка'; } else { $lds = Nick::id($user['id'])->short(); }
$rr = "".$ld." и ".Nick::id($jert['id'])->full(1)."";
- addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room);
+ addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->getRoom());
addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
mysql_query("UPDATE users SET `battle` = {$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
header("Location: fbattle.php");
diff --git a/magic/usability_user/attack_blood.php b/magic/usability_user/attack_blood.php
index 4ca2891..ff73615 100644
--- a/magic/usability_user/attack_blood.php
+++ b/magic/usability_user/attack_blood.php
@@ -32,7 +32,7 @@ if($vip['bloodattack'] <= 0) {
echo "Персонаж тяжело травмирован...";
} elseif($user['klan'] != '' && ($user['klan'] == $us['klan'])) {
echo "Чтите честь ваших сокланов.";
-} elseif($user->room != $us['room']) {
+} elseif($user->getRoom() != $us['room']) {
echo "Персонаж в другой комнате!";
} elseif ($us['room'] == 31 || $us['room'] == 46 || $us['room'] == 47 || $us['room'] == 48 || $us['room'] == 49 ||$us['room'] == 600 || $us['room'] == 601 || $us['room'] == 45 || $us['room'] == 602 || $us['room'] == 43 || $us['room'] == 45) {
echo "Нападения в этой локации запрещены!";
@@ -83,7 +83,7 @@ if($vip['bloodattack'] <= 0) {
$ttt = 1;
}
- addch("".$los." вмешался в поединок »».", $user->room);
+ addch("".$los." вмешался в поединок »».", $user->getRoom());
if($user['invis'] == 1) { $lod = 'невидимка'; } else { $lod = Nick::id($user['id'])->short(); }
addlog($jert['battle'], ''.date("H:i").' '.$lod.' вмешался в поединок! ');
mysql_query('UPDATE `battle` SET `teams` = \''.serialize($battle).'\', `t'.$ttt.'` = CONCAT(`t'.$ttt.'`,\';'.$user['id'].'\'), `blood` = 1 WHERE `id` = "'.$jert['battle'].'" LIMIT 1');
@@ -122,7 +122,7 @@ if($vip['bloodattack'] <= 0) {
$ld = Nick::id($user['id'])->full(1);
$lds = Nick::id($user['id'])->short();
$rr = "".$ld." и ".Nick::id($jert['id'])->full(1)."";
- addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->room);
+ addch("Бой между ".$lds." и ".Nick::id($jert['id'])->short()." начался.", $user->getRoom());
addlog($id, "Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ");
mysql_query("UPDATE users SET `battle` ={$id},`zayavka`=0 WHERE `id`= {$user['id']} OR `id` = {$jert['id']}");
header("Location: fbattle.php");
diff --git a/magic/vampir.php b/magic/vampir.php
index b6736bc..a244746 100644
--- a/magic/vampir.php
+++ b/magic/vampir.php
@@ -57,11 +57,11 @@ if ($user['battle'] > 0) {
echo "Нельзя укусить новичка, они защищены Мироздателем!";
} elseif ($us['align'] > 2 && $us['align'] < 3) {
echo "Вы решили укусить Ангела? ;)";
- } elseif ($user->room != $us['room']) {
+ } elseif ($user->getRoom() != $us['room']) {
echo "Персонаж находится в другой комнате.)";
} elseif ($user['battle']) {
echo "Не в бою...";
- } elseif ($user->room == 31) {
+ } elseif ($user->getRoom() == 31) {
echo "Нельзя укусить в этой комнате!";
} elseif (((int)date("H") < 22) && ((int)date("H") >= 6)) {
echo "Вампиры кусают только по ночам";
@@ -151,7 +151,7 @@ if ($user['battle'] > 0) {
// создаем лог
$rr = "" . Nick::id($user['id'])->full(1) . " и " . Nick::id($us['id'])->full(1) . "";
- addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($us['id'])->short() . " начался. ", $user->room);
+ addch("Бой между " . Nick::id($user['id'])->short() . " и " . Nick::id($us['id'])->short() . " начался. ", $user->getRoom());
//mysql_query("INSERT INTO `logs` (`id`,`log`) VALUES('{$id}','Часы показывали ".date("Y.m.d H.i").", когда ".$rr." бросили вызов друг другу. ');");
addlog($id, 'Часы показывали ' . date("Y.m.d H.i") . ', когда ' . $rr . ' бросили вызов друг другу. ');
diff --git a/magic/zz.php b/magic/zz.php
index 379ce1f..3bf89f1 100644
--- a/magic/zz.php
+++ b/magic/zz.php
@@ -15,7 +15,7 @@ elseif ($user['level'] < $magic_need['nlevel']) { echo "ВашегР
elseif ($user['mgray'] < $magic_need['ngray']) { echo "Не достаточно владения Серой магией для использования этого заклинания!"; }
elseif ($user['intel'] < $magic_need['nintel']) { echo "Вашего интеллекта не достаточно для использования этого заклинания!"; }
elseif ($effect['time']) {echo "На персонаже уже есть заклятие Микстура жизненных сил"; }
-elseif ($user->room != $us['room']) { echo "Персонаж в другой комнате!"; }
+elseif ($user->getRoom() != $us['room']) { echo "Персонаж в другой комнате!"; }
elseif (!$us['online']) {echo "Персонаж не в игре!";}
elseif (rand(1,100) < $int) {
diff --git a/main.php b/main.php
index 93c125e..91173ed 100644
--- a/main.php
+++ b/main.php
@@ -44,7 +44,7 @@ while ($row = $data->fetch_assoc()) {
}
//Обработчики нажатий на кнопки.
-if ($_POST['battlefield'] ?? 0 && $user->room == 1) {
+if ($_POST['battlefield'] ?? 0 && $user->getRoom() == 1) {
header('Location: zayavka.php');
exit();
}
@@ -52,11 +52,11 @@ if ($_POST['module_quest'] ?? 0) {
header('Location: module_quest.php');
exit();
}
-if ($_POST['move_inside'] ?? 0 && $user->room == 20) {
+if ($_POST['move_inside'] ?? 0 && $user->getRoom() == 20) {
header('Location: main.php?goto=arena');
exit();
}
-if ($_POST['move_outside'] ?? 0 && $user->room == 1) {
+if ($_POST['move_outside'] ?? 0 && $user->getRoom() == 1) {
header('Location: main.php?goto=plo');
exit();
}
@@ -67,12 +67,12 @@ if ($_POST['main_page'] ?? 0) {
if ($edit === null) {
/* === проверяем соответствие комнаты и скрипта === */
- if (in_array($user->room, [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111])) {
+ if (in_array($user->getRoom(), [20, 21, 26, 48, 51, 52, 651, 2655, 2601, 2701, 2702, 2111])) {
header('Location: city.php');
exit();
}
- if (in_array($user->room, [22, 23, 25, 27, 29, 30, 31, 34, 45, 53, 61, 402, 403, 600, 601, 602, 603, 620, 621, 650, 660, 661, 662, 666, 760, 1051, 1052, 1055])) {
- header('location: ' . Travel::$roomFileName[$user->room]);
+ if (in_array($user->getRoom(), [22, 23, 25, 27, 29, 30, 31, 34, 45, 53, 61, 402, 403, 600, 601, 602, 603, 620, 621, 650, 660, 661, 662, 666, 760, 1051, 1052, 1055])) {
+ header('location: ' . Travel::$roomFileName[$user->getRoom()]);
exit();
}
}
@@ -174,7 +174,7 @@ if ($goto) {
$eff = db::c()->query('SELECT 1 FROM `users_effects` WHERE `owner_id` = ?i AND (`type` = 14 OR `type` = 13)', $user->getId());
//(масса: = $getItemsBonuses->getItemsWeight() . '/' . $user->strength * 4
- if ($d['sum_weight'] > $user->strength * 4 && $goto) {
+ if ($d['sum_weight'] > $user->getStrength() * 4 && $goto) {
err('У вас переполнен рюкзак, вы не можете передвигаться...');
$imove = false;
}
@@ -182,15 +182,15 @@ if ($goto) {
err('У вас тяжелая травма, вы не можете передвигатся...');
$imove = false;
}
- if ($goto == 'plo' && !$user->zayavka && $imove && $user->room != 20) {
- db::c()->query('UPDATE users, online SET users.room = 20, online.room = 20 WHERE online.user_id = users.id AND online.user_id = ?i', $_SESSION['uid']);
+ if ($goto == 'plo' && !$user->getZayavka() && $imove && $user->getRoom() != 20) {
+ db::c()->query('UPDATE users, online SET users.room = 20, online.room = 20 WHERE online.user_id = users.id AND online.user_id = ?i', $user->getId());
header('Location: city.php');
exit("Топ-топ-топ...");
} else {
err('Подали заявку на бой и убегаете из клуба? Нехорошо...');
}
- if ($goto == 'arena' && $user->room == 20 && $imove) {
- db::c()->query('UPDATE users, online SET users.room = 1, online.room = 1 WHERE online.user_id = users.id AND online.user_id = ?i', $_SESSION['uid']);
+ if ($goto == 'arena' && $user->getRoom() == 20 && $imove) {
+ db::c()->query('UPDATE users, online SET users.room = 1, online.room = 1 WHERE online.user_id = users.id AND online.user_id = ?i', $user->getId());
header('Location: main.php');
exit("Топ-топ-топ...");
}
@@ -216,7 +216,7 @@ function setShadow($image)
}
}
-if ($obraz && ($user->shadow == 'g0.gif' || $user->shadow == 'man0.gif')) {
+if ($obraz && ($user->getShadow() == 'g0.gif' || $user->getShadow() == 'man0.gif')) {
setShadow($obraz);
}
@@ -379,7 +379,7 @@ Template::header('Игра');
|
Уровень: = $user->getLevel() ?>
- Опыт: = $user->experience ?>
+ Опыт: = $user->getExperience() ?>
Побед: ??
Поражений: ??
Ничьих: ??
@@ -389,21 +389,21 @@ Template::header('Игра');
- Сила: = ($user->free_stat_points ? $user->getStat('strength', 1) . '(' . strval($user->strength + $getItemsBonuses->getStrengthBonus()) . ')' : $user->strength + $getItemsBonuses->getStrengthBonus()) ?>
+ Сила: = ($user->getFreeStatPoints() ? $user->getStat('strength', 1) . '(' . strval($user->getStrength() + $getItemsBonuses->getStrengthBonus()) . ')' : $user->getStrength() + $getItemsBonuses->getStrengthBonus()) ?>
- Ловкость: = ($user->free_stat_points ? $user->getStat('dexterity', 1) . '(' . strval($user->dexterity + $getItemsBonuses->getDexterityBonus()) . ')' : $user->dexterity + $getItemsBonuses->getDexterityBonus()) ?>
+ Ловкость: = ($user->getFreeStatPoints() ? $user->getStat('dexterity', 1) . '(' . strval($user->getDexterity() + $getItemsBonuses->getDexterityBonus()) . ')' : $user->getDexterity() + $getItemsBonuses->getDexterityBonus()) ?>
- Интуиция: = ($user->free_stat_points ? $user->getStat('intuition', 1) . '(' . strval($user->intuition + $getItemsBonuses->getIntuitionBonus()) . ')' : $user->intuition + $getItemsBonuses->getIntuitionBonus()) ?>
+ Интуиция: = ($user->getFreeStatPoints() ? $user->getStat('intuition', 1) . '(' . strval($user->getIntuition() + $getItemsBonuses->getIntuitionBonus()) . ')' : $user->getIntuition() + $getItemsBonuses->getIntuitionBonus()) ?>
- Выносливость: = ($user->free_stat_points ? $user->getStat('endurance', 1) . '(' . strval($user->endurance + $getItemsBonuses->getEnduranceBonus()) . ')' : $user->endurance + $getItemsBonuses->getEnduranceBonus()) ?>
+ Выносливость: = ($user->getFreeStatPoints() ? $user->getStat('endurance', 1) . '(' . strval($user->getEndurance() + $getItemsBonuses->getEnduranceBonus()) . ')' : $user->getEndurance() + $getItemsBonuses->getEnduranceBonus()) ?>
- Интеллект: = ($user->free_stat_points ? $user->getStat('intelligence', 1) . '(' . strval($user->intelligence + $getItemsBonuses->getIntelliganceBonus()) . ')' : $user->intelligence + $getItemsBonuses->getIntelliganceBonus()) ?>
+ Интеллект: = ($user->getFreeStatPoints() ? $user->getStat('intelligence', 1) . '(' . strval($user->getIntelligence() + $getItemsBonuses->getIntelliganceBonus()) . ')' : $user->getIntelligence() + $getItemsBonuses->getIntelliganceBonus()) ?>
- Мудрость: = ($user->free_stat_points ? $user->getStat('wisdom', 1) . '(' . strval($user->wisdom + $getItemsBonuses->getWisdomBonus()) . ')' : $user->wisdom + $getItemsBonuses->getWisdomBonus()) ?>
+ Мудрость: = ($user->getFreeStatPoints() ? $user->getStat('wisdom', 1) . '(' . strval($user->getWisdom() + $getItemsBonuses->getWisdomBonus()) . ')' : $user->getWisdom() + $getItemsBonuses->getWisdomBonus()) ?>
- free_stat_points): ?>
+ getFreeStatPoints()): ?>
Возможных
- увеличений: = $user->free_stat_points ?>
+ увеличений: = $user->getFreeStatPoints() ?>
Здоровье: = $user->getHealth() ?>
@@ -411,31 +411,31 @@ Template::header('Игра');
Уворот: = $getItemsBonuses->getEvasionBonus() ?>
Точность: = $getItemsBonuses->getAccuracyBonus() ?>
Шанс крита: = $getItemsBonuses->getCriticalsBonus() ?>
- Урон: = $user->minDamage + $getItemsBonuses->getMinPhysDamage() ?>
- - = $user->maxDamage + $getItemsBonuses->getMaxPhysDamage() ?>
+ Урон: = $user->getMinDamage() + $getItemsBonuses->getMinPhysDamage() ?>
+ - = $user->getMaxDamage() + $getItemsBonuses->getMaxPhysDamage() ?>
Защита от огня: ??
Защита от воды: ??
Защита от вохдуха: ??
Защита от земли: ??
Защита от яда: ??
- Броня головы: = $user->headArmor ?>
- Броня корпуса: = $user->chestArmor ?>
- Броня ног: = $user->legArmor ?>
+ Броня головы: = $user->getHeadArmor() ?>
+ Броня корпуса: = $user->getChestArmor() ?>
+ Броня ног: = $user->getLegArmor() ?>
|
| | |