mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 09:19:22 +02:00
Fix if loot is empty
This commit is contained in:
parent
3100faa645
commit
b8c0215720
@ -62,7 +62,9 @@ if ($monsterModel && isset($monsterModel->name)) {
|
||||
$elements = json_decode($monster['elements'], true);
|
||||
$immunities = json_decode($monster['immunities'], true);
|
||||
$loot = json_decode($monster['loot'], true);
|
||||
usort($loot, 'sort_by_chance');
|
||||
if (!empty($loot)) {
|
||||
usort($loot, 'sort_by_chance');
|
||||
}
|
||||
|
||||
foreach ($loot as &$item) {
|
||||
$item['name'] = getItemNameById($item['id']);
|
||||
|
Loading…
x
Reference in New Issue
Block a user