Рефакторинг, отказ от $u->testAction('',2) для разрыва зависимости с User::class. Добавлен зачаточный генератор запросов.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use Helper\Conversion;
|
||||
use Model\ActionModel;
|
||||
use Model\Constant\Stat;
|
||||
|
||||
class BotPriemLogic
|
||||
@@ -105,7 +106,6 @@ class BotPriemLogic
|
||||
|
||||
private static function testpriem($pl): int
|
||||
{
|
||||
global $u;
|
||||
$notr = 0;
|
||||
$statnames = new Stat();
|
||||
$statnames->getRequirement();
|
||||
@@ -125,8 +125,8 @@ class BotPriemLogic
|
||||
}
|
||||
|
||||
if ($pl['xuse'] > 0) {
|
||||
$xu = $u->testAction('`vars` = "use_priem_' . BotLogic::$bot['battle'] . '_' . BotLogic::$bot['id'] . '" AND `vals` = "' . $pl['id'] . '" LIMIT ' . $pl['xuse'] . '', 2);
|
||||
if ($xu[0] >= $pl['xuse']) {
|
||||
$xu = ActionModel::testCount(['vars = ' . 'use_priem_' . BotLogic::$bot['battle'] . '_' . BotLogic::$bot['id'], "vals = {$pl['id']}",], $pl['xuse']);
|
||||
if ($xu >= $pl['xuse']) {
|
||||
$notr++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user