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

@@ -39,6 +39,16 @@
*/
class OTS_Monster extends DOMDocument
{
private $loaded = false;
public function loadXML($source , $options = 0)
{
$this->loaded = parent::loadXML($source, $options);
}
public function loaded()
{
return $this->loaded;
}
/**
* Returns monster name.
*