This commit is contained in:
slawkens
2017-10-17 15:28:34 +02:00
10 changed files with 125 additions and 53 deletions

View File

@@ -65,7 +65,12 @@ $canEdit = hasFlag(FLAG_CONTENT_MONSTERS) || admin();
if(isset($_POST['reload_monsters']) && $canEdit)
{
require LIBS . 'creatures.php';
Creatures::loadFromXML(true);
if(Creatures::loadFromXML(true))
if(Creatures::getMonstersList()->hasErrors())
error('There were some problems loading your monsters.xml file. Please check system/logs/error.log for more info.');
else {
error(Creatures::getLastError());
}
}
if($canEdit)

View File

@@ -16,7 +16,9 @@ $canEdit = hasFlag(FLAG_CONTENT_SPELLS) || admin();
if(isset($_POST['reload_spells']) && $canEdit)
{
require LIBS . 'spells.php';
Spells::loadFromXML(true);
if(!Spells::loadFromXML(true)) {
error(Spells::getLastError());
}
}
if($canEdit)