WIP: Info class

This commit is contained in:
2024-01-06 17:30:34 +02:00
parent a2c658166d
commit 4a7535d67d
44 changed files with 1713 additions and 919 deletions
+8 -10
View File
@@ -57,11 +57,9 @@ if (!isset($CRON_CORE)) {
}
}
$btl->is = $u->is;
$btl->items = $u->items;
$btl->info = $btl->battleInfo($u->info['battle']);
$isBattle = $btl->initRefresh($u);
if (!isset($btl->info['id'])) {
if (!$isBattle) {
if ($u->info['battle'] == -1) {
//завершаем поединок
$upd = mysql_query(
@@ -142,7 +140,7 @@ if (!isset($btl->info['id'])) {
if (!isset($_POST['usepriem'])) {
$btl->testFinish();
}
if ($btl->info['team_win'] == -1) {
if ($btl->i->getTeamwin() == -1) {
$js .= $btl->genTeams($u->info['id']);
} else {
$btl->mainStatus = 3;
@@ -160,12 +158,12 @@ if (!isset($btl->info['id'])) {
$btl->mainStatus = 2;
}
} else {
if ($u->info['enemy'] != 0 && $btl->info['team_win'] == -1 && $u->info['hpNow'] >= 1) {
if ($u->info['enemy'] != 0 && $btl->i->getTeamwin() == -1 && $u->info['hpNow'] >= 1) {
$js .= $btl->myInfo($u->info['enemy'], 2);
}
}
if ($btl->info['izlom'] > 0) {
$js .= 'volna(' . (1 + $btl->info['izlomRoundSee']) . ');';
if ($btl->i->izlom > 0) {
$js .= 'volna(' . (1 + $btl->i->izlomroundsee) . ');';
}
$i = 1;
while ($i <= 7) {
@@ -200,7 +198,7 @@ if (!isset($btl->info['id'])) {
}
unset($jslog);
//}
$rehtml .= '<script type="text/javascript">var battle = ' . (0 + $btl->info['id']) . ';top.cb_statusTest();eatk=' . $atk1 . ';
$rehtml .= '<script type="text/javascript">var battle = ' . (0 + $btl->i->id) . ';top.cb_statusTest();eatk=' . $atk1 . ';
if(document.getElementById("nabito")!=undefined)
{
document.getElementById("nabito").innerHTML = "' . (floor(
@@ -215,7 +213,7 @@ if (!isset($btl->info['id'])) {
}
if(document.getElementById("timer_out")!=undefined)
{
document.getElementById("timer_out").innerHTML = "' . round(($btl->info['timeout'] / 60), 2) . '";
document.getElementById("timer_out").innerHTML = "' . round(($btl->i->timeout / 60), 2) . '";
}
$(\'#pers_magic\').html("' . $u->btlMagicList() . '");
g_iCount = 30;