mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 01:34:55 +02:00
* 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:
@@ -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.
|
||||
*
|
||||
|
Reference in New Issue
Block a user