mirror of
https://github.com/Znote/ZnoteAAC.git
synced 2026-01-23 02:46:23 +01:00
fix division by zero issue when manamax is 0 (#376)
This commit is contained in:
committed by
Stefan A. Brannfjell
parent
98f90eb442
commit
6584811ed6
@@ -230,7 +230,12 @@ if (isset($_GET['name']) === true && empty($_GET['name']) === false) {
|
|||||||
|
|
||||||
$bar_length = 100;
|
$bar_length = 100;
|
||||||
$bar_health = (int)($bar_length * ($playerstats['health'] / $playerstats['healthmax']));
|
$bar_health = (int)($bar_length * ($playerstats['health'] / $playerstats['healthmax']));
|
||||||
|
if ($playerstats['manamax'] > 0) {
|
||||||
$bar_mana = (int)($bar_length * ($playerstats['mana'] / $playerstats['manamax']));
|
$bar_mana = (int)($bar_length * ($playerstats['mana'] / $playerstats['manamax']));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$bar_mana = 100;
|
||||||
|
}
|
||||||
|
|
||||||
$outfit_server = $config['show_outfits']['imageServer'];
|
$outfit_server = $config['show_outfits']['imageServer'];
|
||||||
$outfit_storage = $config['EQ_shower']['storage_value'];
|
$outfit_storage = $config['EQ_shower']['storage_value'];
|
||||||
|
|||||||
Reference in New Issue
Block a user