mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
* check if monster file exist before loading it
This commit is contained in:
parent
3f1c638a14
commit
6d81a29bb6
@ -118,7 +118,9 @@ class OTS_MonstersList implements Iterator, Countable, ArrayAccess
|
|||||||
// loads file
|
// loads file
|
||||||
$monster = new OTS_Monster();
|
$monster = new OTS_Monster();
|
||||||
//echo $this->monstersPath . $this->monsters[$name];
|
//echo $this->monstersPath . $this->monsters[$name];
|
||||||
|
if(file_exists($this->monstersPath . $this->monsters[$name])) {
|
||||||
$monster->loadXML(trim(file_get_contents($this->monstersPath . $this->monsters[$name])));
|
$monster->loadXML(trim(file_get_contents($this->monstersPath . $this->monsters[$name])));
|
||||||
|
}
|
||||||
return $monster;
|
return $monster;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user