Сихронизация с актуальной версией.

This commit is contained in:
2022-08-11 13:38:38 +03:00
parent 9306b5f5d8
commit 6cd7b13db0
315 changed files with 27411 additions and 40772 deletions
@@ -207,6 +207,11 @@ class TournamentModel
battle_users.battle = last_battle.id and
battle_users.team != last_battle.team_win and
battle_users.uid in (select uid from tournaments_users where death_time = 0)';
$query2 = 'select bu.uid from battle b
inner join battle_users bu on b.team_win != bu.team and b.id = bu.battle
inner join tournaments_users tu on bu.uid = tu.uid
where typeBattle = 25000 and death_time = 0 order by b.time_start desc limit 1';
$db = new Db;
$row = $db::getRow($query);
return $row['uid'];
@@ -222,9 +227,9 @@ class TournamentModel
public static function removeFighter($uid, $winner = false)
{
if (!$uid) return;
$winner_timer_add = $winner? 500 : 0; # Ïîñëåäíûé ÄÎËÆÅÍ áûòü ïîñëåäíèì.
//$winner_timer_add = $winner? 500 : 0; # Ïîñëåäíûé ÄÎËÆÅÍ áûòü ïîñëåäíèì.
$db = new Db();
$db::sql('update tournaments_users set death_time = unix_timestamp() + ? where death_time = 0 and uid = ?', [$winner_timer_add, $uid]);
$db::sql('update tournaments_users set death_time = unix_timestamp() + 500 where death_time = 0 and uid = ?', [$uid]);
self::teleport($uid, 9);
//fixme: Êëàññû íå ïîäêëþ÷àþòñÿ äðóã ê äðóãó. Íóæíî ìåíÿòü àðõèòåêòóðó èãðû. :(
Db::sql("update users_achiv set trn = trn + 1 where id = ?", [$uid]);