Полный отказ от $u->testAction() целиком.

This commit is contained in:
2024-05-15 16:42:28 +03:00
parent bc136cc030
commit 5e0dda8ed0
50 changed files with 1909 additions and 1831 deletions
+6 -2
View File
@@ -1,4 +1,8 @@
<?php
use Core\Db;
use Model\ActionModel;
if (!defined('GAME')) {
die();
}
@@ -30,7 +34,7 @@ if ($u->info['admin'] > 0) {
}
#---пара проверок ;)
if (isset($objaga['id'])) {
$sleep = $u->testAction('`vars` = "sleep" AND `uid` = "' . $u->info['id'] . '" LIMIT 1', 1);
$sleep = ActionModel::get(["uid = {$u->info['id']}", 'vars = sleep']);
if ($sleep[0] > 0) {
if ($u->info['room'] != 217 && $u->info['room'] != 218 && $u->info['room'] != 219) {
mysql_query('UPDATE `users` SET `room` = 217 WHERE `id` = "' . $u->info['id'] . '" LIMIT 1');
@@ -797,7 +801,7 @@ if ($u->info['admin'] > 0) {
if ($p_count > 9) {
echo '<b><font color=red>Вы не можете создавать более десяти персонажей</font></b><br>';
} else {
\Core\Db::sql("insert into users_twink
Db::sql("insert into users_twink
(uid, twink, login, level, exp, upLevel, stats, time, ability, skills, sskills, nskills, priems, obraz, stopexp)
values (?,?,?,4,2500,22,'s1=3|s2=3|s3=3|s4=7|rinv=40|m9=5|m6=10',unix_timestamp(),34,5,4,5,
'0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0','0.gif',0)", [$u->info['id'], $p_count, $u->info['login']]);