Заявки на поединки. Начало.
This commit is contained in:
@@ -28,7 +28,6 @@ class User
|
||||
|
||||
// Пока несуществующие, для совместимости.
|
||||
protected int $experience = 0;
|
||||
protected int $battle = 0;
|
||||
protected int $in_tower = 0; // Скорее башню похороним чем запустим...
|
||||
protected int $zayavka = 0;
|
||||
|
||||
@@ -77,6 +76,7 @@ class User
|
||||
{
|
||||
if (Db::getInstance()->fetchColumn('SELECT 1 FROM users_effects WHERE owner_id = ? AND type = ?', [$userId, $type])) {
|
||||
Db::getInstance()->execute('DELETE FROM users_effects WHERE owner_id = ? AND type = ?', [$userId, $type]);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -218,7 +218,7 @@ class User
|
||||
|
||||
public function getBattle(): int
|
||||
{
|
||||
return $this->battle;
|
||||
return Arena::fight()->hasNoActiveFights();
|
||||
}
|
||||
|
||||
public function getInTower(): int
|
||||
|
||||
Reference in New Issue
Block a user