* added new tooltip to view characters equipment item name

* this requires loaded items - go to admin panel and select Items menu, then reload
* added items.xml loader class and weapons.xml loader class
* load also runes into spells table
* (internal) changed spells.vocations database field to store json data instead of comma separated
* (internal) renamed existing Items class to Items_Images
This commit is contained in:
slawkens
2017-10-19 17:11:49 +02:00
parent 23c1df72aa
commit 913b4297cf
17 changed files with 1297 additions and 298 deletions

View File

@@ -315,19 +315,50 @@ class OTS_Spell
*/
public function getVocations()
{
$vocations = array();
global $config;
if(!isset($config['vocation_ids']))
$config['vocations_ids'] = array_flip($config['vocations']);
$vocations = array();
foreach( $this->element->getElementsByTagName('vocation') as $vocation)
{
if($vocation->getAttribute('id') != NULL)
$vocations[] = $vocation->getAttribute('id');
else
$vocations[] = $vocation->getAttribute('name');
if($vocation->getAttribute('id') != NULL) {
$voc_id = $vocation->getAttribute('id');
}
else {
$voc_id = $config['vocations_ids'][$vocation->getAttribute('name')];
}
$vocations[] = $voc_id;
}
return $vocations;
}
public function getVocationsFull()
{
global $config;
if(!isset($config['vocation_ids']))
$config['vocations_ids'] = array_flip($config['vocations']);
$vocations = array();
foreach( $this->element->getElementsByTagName('vocation') as $vocation)
{
$show = $vocation->getAttribute('showInDescription');
if($vocation->getAttribute('id') != NULL) {
$voc_id = $vocation->getAttribute('id');
}
else {
$voc_id = $config['vocations_ids'][$vocation->getAttribute('name')];
}
$vocations[$voc_id] = strlen($show) == 0 || $show != '0';
}
return $vocations;
}
/**
* Creates conjure item.
*