more fixes to loading of creatures

fixed when there are spaces at beginning of the file
fixed when file is unable to parse
This commit is contained in:
slawkens1
2017-06-07 00:16:04 +02:00
parent 57c2547098
commit 649facc5ab
3 changed files with 16 additions and 1 deletions

View File

@@ -72,6 +72,10 @@ if(isset($_POST['reload_monsters']) && $canEdit)
//add monsters
foreach($allmonsters as $lol) {
$monster = $allmonsters->current();
if(!$monster->loaded()) {
warning('Error while adding monster: ' . $allmonsters->currentFile());
continue;
}
//load monster mana needed to summon/convince
$mana = $monster->getManaCost();
//load monster experience