Убрал вызов User->addDelo.

This commit is contained in:
2023-12-01 23:05:11 +02:00
parent ad80a30a5f
commit 4c6a5d055b
17 changed files with 1187 additions and 1100 deletions
+18 -15
View File
@@ -4,6 +4,7 @@ namespace Location;
use Chat;
use ChatMessage;
use Delo;
use User;
class DeathTower
@@ -12,7 +13,7 @@ class DeathTower
{
$user = User::start();
if ($bu) {
/* â ýòîì áîþ ïðîâåðÿåì þçåðîâ */
/* */
$i = 0;
while ($i < count($bu[$i])) {
if ($bu[$i]['lose'] > 0 || $bu[$i]['nich']) {
@@ -22,7 +23,7 @@ class DeathTower
mysql_query(
'UPDATE `bs_turnirs` SET `users_finish` = `users_finish` + 1 WHERE `id` = "' . $id['id'] . '" LIMIT 1'
);
/* óäàëÿåì þçåðà */
/* */
if ($bu['inBot'] == 0) {
$pls1 = mysql_fetch_array(
mysql_query(
@@ -33,7 +34,7 @@ class DeathTower
mysql_query('DELETE FROM `users` WHERE `id` = "' . $bu[$i]['id'] . '" LIMIT 1');
mysql_query('DELETE FROM `stats` WHERE `id` = "' . $bu[$i]['id'] . '" LIMIT 1');
//âûêèäûâàåì ïðåäìåòû íà çåìëþ
//
$spi = mysql_query(
'SELECT `id`,`item_id` FROM `items_users` WHERE `uid` = "' . $bu[$i]['id'] . '" LIMIT 500'
);
@@ -88,9 +89,9 @@ class DeathTower
$chat = new Chat();
$cmsg = new ChatMessage();
/* çàâåðøàåì ÁÑ */
/* */
if (isset($win['id']) && $win['lose'] == 0 && $win['nich'] == 0 && $win['id'] > 0) {
//åñòü ïîáåäèòåëü
//
$bsep = 0;
if ($winr['level'] < 6) {
$bsep = 2500;
@@ -103,7 +104,7 @@ class DeathTower
} else {
$bsep = 50000;
}
/* Âûäàåì ïðèç */
/* */
$mn = (round($id['money'] / 100 * 85));
mysql_query(
'UPDATE `users` SET `money` = `money` + "' . $mn . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1'
@@ -111,10 +112,10 @@ class DeathTower
mysql_query(
'UPDATE `stats` SET `exp` = `exp` + "' . $bsep . '" WHERE `id` = "' . $winr['id'] . '" LIMIT 1'
);
/* ÷àò */
/* */
$cmsg->setTo($winr['login']);
$cmsg->setText(
"Ïîçäðàâëÿåì! Âû ïîáåäèëè â òóðíèðå &quot;Áàøíÿ Ñìåðòè&quot;! Ïîëó÷åíî îïûòà: $bsep, äåíüãè: $mn êð."
"! &quot; &quot;! : $bsep, : $mn ."
);
$cmsg->setType(6);
$chat->sendMsg($cmsg);
@@ -122,21 +123,23 @@ class DeathTower
$cmsg->setTo('');
$cmsg->setIsAlert(true);
$cmsg->setText(
"Çàâåðøèëñÿ òóðíèð &quot;Áàøíÿ Ñìåðòè&quot;, ïîáåäèòåëü òóðíèðà: <strong>{$winr['login']}</strong>! Ïîçäðàâëÿåì!"
" &quot; &quot;, : <strong>{$winr['login']}</strong>! !"
);
$cmsg->setType(5);
$chat->sendMsg($cmsg);
$user->addDelo(
1, $uid,
'&quot;<span style="color: #C65F00; ">WinTournament.' . $user->info['city'] . '</span>&quot; (Áàøíÿ Ñìåðòè): Ïîëó÷åíî &quot;<strong>' . $mn . '</strong> êð.&quot;',
time(), $user->info['city'], 'WinTournament.' . $user->info['city'], 0, 0
Delo::add(
1,
'WinTournament.' . $user->info['city'],
$uid,
'&quot;<span style="color: #C65F00; ">WinTournament.' . $user->info['city'] . '</span>&quot; ( ): &quot;<strong>' . $mn . '</strong> .&quot;',
);
} else {
/* ÷àò */
/* */
$cmsg->setIsAlert(true);
$cmsg->setType(5);
$cmsg->setText('Çàâåðøèëñÿ òóðíèð «Áàøíÿ Ñìåðòè», ïîáåäèòåëü òóðíèðà: îòñóòñòâóåò.');
$cmsg->setText(' , : .');
}
$sp = mysql_query(