refactor and custom user entities

This commit is contained in:
2023-11-06 02:40:12 +02:00
parent ce2691971b
commit 1645f58a63
14 changed files with 828 additions and 587 deletions

View File

@@ -83,7 +83,7 @@ class FightRequest
'select * from zayvki where btl_id = 0 and cancel = 0 and start = 0 and razdel in (4,5) order by id desc limit 22'
);
foreach ($sp as $pl) {
$uz = Db::getRow(
$uz = Db::getRows(
'select * from users left join stats on users.id = stats.id where zv = ?',
[$pl['id']]
);
@@ -244,7 +244,7 @@ class FightRequest
$z['timeout'],
$z['type'],
$z['invise'],
$z['travmChance'],
$z['travmChance'] ?? 0,
$z['exp'],
];
$q = 'insert into battle (
@@ -468,8 +468,6 @@ class FightRequest
'id' => $botInfo['id'],
'login' => $botInfo['login'],
'level' => $botInfo['level'],
'city' => $botInfo['city'],
'cityreg' => $botInfo['city'],
'name' => $botInfo['login'],
'sex' => $botInfo['sex'],
'hobby' => '',