/** * @version 0.1.3 * @since 0.0.7 * @return array List of conjure spells names. * @throws E_OTS_NotLoaded If spells list is not loaded. * @deprecated 0.1.3 Use POT::getSpellsList()->getConjuresList(). */ public function getConjuresList() { if (isset($this->spells)) { return $this->spells->getConjuresList(); } throw new E_OTS_NotLoaded(); }
//SPELLS if ($action == "install_spells") { try { $SQL->query('DELETE FROM ' . $SQL->tableName('z_spells') . ';'); } catch (PDOException $error) { } $main_content .= '<h2>Reload spells.</h2>'; $main_content .= '<h2>All records deleted from table \'z_spells\' in database.</h2>'; foreach ($vocation_name[0] as $prom => $arr) { foreach ($arr as $voc_id => $voc_name) { $vocations_ids[$voc_name] = $voc_id; } } $allspells = new OTS_SpellsList($config['site']['server_path'] . "data/spells/spells.xml"); //add conjure spells $conjurelist = $allspells->getConjuresList(); $main_content .= "<h3>Conjure:</h3>"; foreach ($conjurelist as $spellname) { $spell = $allspells->getConjure($spellname); $lvl = $spell->getLevel(); $mlvl = $spell->getMagicLevel(); $mana = $spell->getMana(); $name = $spell->getName(); $soul = $spell->getSoul(); $spell_txt = $spell->getWords(); $vocations = $spell->getVocations(); $vocations_to_db = ""; $voc_nr = 0; foreach ($vocations as $vocation_to_add_name) { $voc_str = ''; foreach ($vocation_name[0] as $prom => $arr) {