Новая функция подсчёта массы вещей: выделение пороговых значений.
This commit is contained in:
parent
e510ca6346
commit
0810022ed3
@ -2741,7 +2741,9 @@ function getItemsMassaInfo()
|
||||
{
|
||||
$i_row = db::c()->query('SELECT SUM(`massa`) AS `massa`, SUM(`gmeshok`) AS `massa_bonus` FROM `inventory` WHERE `setsale` = 0 AND `owner` = ?i',$_SESSION['uid'])->fetch_assoc();
|
||||
$u_row = db::c()->query('SELECT `sila` FROM `users` WHERE `id` = ?i', $_SESSION['uid'])->fetch_assoc();
|
||||
return $i_row['massa'] . "/" . ($u_row['sila'] * 4 + $i_row['massa_bonus']);
|
||||
if ($i_row['massa'] > $u_row['sila'] * 4 + $i_row['massa_bonus'])
|
||||
return "<span style='color:maroon;'>" . $i_row['massa'] . "</span>/" . ($u_row['sila'] * 4 + $i_row['massa_bonus']);
|
||||
else return $i_row['massa'] . "/" . ($u_row['sila'] * 4 + $i_row['massa_bonus']);
|
||||
}
|
||||
|
||||
function addlog($id, $log)
|
||||
|
Loading…
Reference in New Issue
Block a user