Полный отказ от $u->testAction() целиком.
This commit is contained in:
@@ -1106,12 +1106,9 @@ class Priems
|
||||
return;
|
||||
}
|
||||
|
||||
$alreadyReleased = $this->u->testAction(
|
||||
'`uid` = "' . $this->u->info['id'] . '" AND `vars` = "animal_use' . $btl->i->id . '" LIMIT 1',
|
||||
1
|
||||
);
|
||||
$alreadyReleased = ActionModel::testCount(["uid = {$this->u->info['id']}", "vars = animal_use{$btl->i->id}"]);
|
||||
|
||||
if (!empty($alreadyReleased['id'])) {
|
||||
if (!empty($alreadyReleased)) {
|
||||
echo 'Вы уже выпускали зверя в этом бою ...';
|
||||
return;
|
||||
}
|
||||
@@ -2070,21 +2067,11 @@ class Priems
|
||||
|
||||
public function getTechniquesInfo(?int $id = null): array
|
||||
{
|
||||
# SELECT * FROM `priems` WHERE `level`<="' . $this->u->info['level'] . '" AND `activ` > "0" AND `id` = "' . $id . '" LIMIT 1
|
||||
|
||||
if (isset($id)) {
|
||||
return Db::getRow('select * from priems where level <= ? and activ > 0 and id = ? order by img,level', [$this->u->info['level'], $id]);
|
||||
// return Db::getRow(
|
||||
// 'select * from techniques_categories left join priems on techniques_categories.technique_id = priems.id
|
||||
// where priems.level <= ? and priems.activ > 0 and priems.id = ? order by priems.img,priems.level', [User::start()->info['level'], $id]
|
||||
// );
|
||||
}
|
||||
|
||||
return Db::getRows('select * from priems where level <= ? and activ > 0 order by img,level', [$this->u->info['level']]);
|
||||
// return Db::getRows(
|
||||
// 'select * from techniques_categories left join priems on techniques_categories.technique_id = priems.id
|
||||
// where priems.level <= ? and priems.activ > 0 order by priems.img,priems.level', [User::start()->info['level']]
|
||||
// );
|
||||
}
|
||||
|
||||
public function seeMyPriems(): void
|
||||
@@ -2291,11 +2278,8 @@ class Priems
|
||||
$i++;
|
||||
}
|
||||
if ($this->u->info['animal'] > 0) {
|
||||
$use_lst = $this->u->testAction(
|
||||
'`uid` = "' . $this->u->info['id'] . '" AND `vars` = "animal_use' . $btl->i->id . '" LIMIT 1',
|
||||
1
|
||||
);
|
||||
if (!isset($use_lst['id'])) {
|
||||
$use_lst = (bool)ActionModel::testCount(["uid = {$this->u->info['id']}", "vars = animal_use{$btl->i->id}"]);
|
||||
if (!$use_lst) {
|
||||
$pr .= '<a onMouseOver="top.hi(this,\'<b>Выпустить зверя</b><Br>Ваш зверь вмешивается в поединок. Можно применять один раз за бой.\',event,3,0,1,1,\'width:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" href="javascript:void(0);" onClick="usepriem(100500);"><img style="margin-top:1px; margin-left:3px;" src="//img.new-combats.tech/i/eff/pet_unleash.gif" width="40" height="25" /></a>';
|
||||
} else {
|
||||
$pr .= '<img onMouseOver="top.hi(this,\'<b>Выпустить зверя</b><Br>Ваш зверь вмешивается в поединок. Можно применять один раз за бой.\',event,3,0,1,1,\'width:240px\');" onMouseOut="top.hic();" onMouseDown="top.hic();" style="margin-top:1px; margin-left:2px;" class="nopriemuse" src="//img.new-combats.tech/i/eff/pet_unleash.gif" width="40" height="25" />';
|
||||
|
||||
Reference in New Issue
Block a user