This commit is contained in:
2024-02-08 14:55:44 +02:00
parent 7dc27047b6
commit 88aeb4a912
3 changed files with 95 additions and 43 deletions
+25 -24
View File
@@ -5132,30 +5132,31 @@ JS;
if ($this->stats[$i]['hpAll'] < $this->stats[$i]['hpNow']) {
$this->stats[$i]['hpNow'] = $this->stats[$i]['hpAll'];
}
// Цветная метка тем, кто вылетел за таймаут в 15 минут?
$a1ms = '';
if (isset($this->ga[$this->users[$i]['id']][$you]) && $this->ga[$this->users[$i]['id']][$you]) {
$a1mc = '';
$ac = mysql_fetch_array(
mysql_query(
'SELECT * FROM `battle_act` WHERE `id` = "' . $this->ga[$this->users[$i]['id']][$you] . '" LIMIT 1'
)
);
if (isset($ac) && $ac['time'] + $this->i->timeout - 15 < time()) {
$a1mc = 'color:red;';
}
$a1ms = 'style=\"text-decoration: underline; ' . $a1mc . '\"';
} elseif (isset($this->ag[$this->users[$i]['id']][$you]) && $this->ag[$this->users[$i]['id']][$you]) {
$a1mc = '';
$ac = mysql_fetch_array(
mysql_query(
'SELECT * FROM `battle_act` WHERE `id` = "' . $this->ag[$this->users[$i]['id']][$you] . '" LIMIT 1'
)
);
if (isset($ac) && $ac['time'] + $this->i->timeout - 15 < time()) {
$a1mc = 'color:green;';
}
$a1ms = 'style=\"text-decoration: overline; ' . $a1mc . '\"';
$actcolor = '';
$actstyle = '';
$actid = 0;
if (!empty($this->ga[$this->users[$i]['id']][$you])) {
$actid = $this->ga[$this->users[$i]['id']][$you];
$actcolor = 'red';
$actstyle = 'underline';
} elseif (!empty($this->ag[$this->users[$i]['id']][$you])) {
$actid = $this->ag[$this->users[$i]['id']][$you];
$actcolor = 'green';
$actstyle = 'overline';
}
if (!empty($actid)) {
$ac = Db::getRow('select id, time from battle_act where id = ?', [$actid]);
if ($ac['id'] && $ac['time'] + $this->i->timeout - 15 < time()) {
$a1ms = " color: $actcolor;";
}
$a1ms = "style='text-decoration: $actstyle';$a1ms";
}
if ($this->users[$i]['login2'] == '') {
$this->users[$i]['login2'] = $this->users[$i]['login'];
}
@@ -5165,7 +5166,7 @@ JS;
}
$ldr = '';
if ($this->users[$i]['lider'] == $this->i->id) {
$ldr = '<img width=24 height=15 title=Лидер&nbsp;группы src=//img.new-combats.tech/i/lead' . $this->users[$i]['team'] . '.gif \>';
$ldr = '<img title=Лидер&nbsp;группы src=//img.new-combats.tech/i/lead' . $this->users[$i]['team'] . '.gif>';
}
$teams[$this->users[$i]['team']] .= ', ' . $ldr . '<span ' . $a1ms . ' class=\"CSSteam' . $this->users[$i]['team'] . '\" onClick=\"chat.addto(\'' . $this->users[$i]['login2'] . '\',\'to\'); return false;\" oncontextmenu=\"top.infoMenu(\'' . $this->users[$i]['login2'] . '\',event,\'main\'); return false;\">' . $this->users[$i]['login2'] . '</span><small> [' . floor(
$this->stats[$i]['hpNow']
@@ -5179,7 +5180,7 @@ JS;
while ($i < count($tms)) {
$teams[$tms[$i]] = ltrim($teams[$tms[$i]], ', ');
if ($teams[$tms[$i]] != '') {
$teams[$tms[$i]] = '<img src=\"//img.new-combats.tech/i/lock3.gif\" style=\"cursor:pointer\" width=\"20\" height=\"15\" onClick=\"chat.addto(\'team' . $tms[$i] . '\',\'private\'); return false;\"> ' . $teams[$tms[$i]];
$teams[$tms[$i]] = '<img src=\"//img.new-combats.tech/i/lock3.gif\" style=\"cursor:pointer\" onClick=\"chat.addto(\'team' . $tms[$i] . '\',\'private\'); return false;\"> ' . $teams[$tms[$i]];
$ret .= $teams[$tms[$i]];
if (count($tms) > $i + 1) {
$ret .= ' <span class=\"CSSvs\">&nbsp; против &nbsp;</span> ';