* @author Slawkens * @copyright 2017 MyAAC * @version 0.6.0 * @link http://my-aac.org */ defined('MYAAC') or die('Direct access not allowed!'); $title = 'Spells'; $canEdit = hasFlag(FLAG_CONTENT_SPELLS) || admin(); if(isset($_POST['reload_spells']) && $canEdit) { require LIBS . 'spells.php'; Spells::loadFromXML(true); } if($canEdit) { ?>
Spell Search
Only for vocation:    
query('SELECT * FROM ' . $db->tableName(TABLE_PREFIX . 'spells') . ' WHERE ' . $db->fieldName('hidden') . ' != 1 ORDER BY ' . $order . ', level'); if(isset($vocation_id) && $vocation_id != 'All' && $vocation_id != '') { foreach($spells as $spell) { $spell_vocations = explode(",", $spell['vocations']); if(in_array($vocation_id, $spell_vocations) || empty($spell['vocations'])) { echo ''; if($spell['type'] == 2) echo ''; else echo ''; echo ''; } } } else { foreach($spells as $spell) { $spell_vocations = explode(",", $spell['vocations']); echo ''; if($spell['type'] == 1) echo ''; else echo ''; echo ''; } } ?>
Name Words Type
(count)
Mana Level Magic
Level
Soul Premium Vocations:
' . $spell['name'] . '' . $spell['words'] . 'Conjure ('.$spell['conjure_count'].')Instant' . $spell['mana'] . '' . $spell['level'] . '' . $spell['maglevel'] . '' . $spell['soul'] . '' . ($spell ['premium'] == 1 ? 'yes' : 'no') . '' . $config['vocations'][$vocation_id] . '
' .$spell['name'] . '' . $spell['words'] . 'InstantConjure ('.$spell['conjure_count'].')' . $spell['mana'] . '' . $spell['level'] . '' . $spell['maglevel'] . '' . $spell['soul'] . ''. ($spell ['premium'] == 1 ? 'yes' : 'no') .''; $showed_vocations = 0; foreach($spell_vocations as $spell_vocation) { if(isset($config['vocations'][$spell_vocation])) { echo $config['vocations'][$spell_vocation]; $showed_vocations++; } if($showed_vocations != count($spell_vocations)) echo '
'; } echo '