/** * @version 0.1.3 * @since 0.0.7 * @param string $name Spell name. * @return OTS_Spell Conjure spell wrapper (null if rune does not exist). * @throws E_OTS_NotLoaded If spells list is not loaded. * @deprecated 0.1.3 Use POT::getSpellsList()->getConjure(). */ public function getConjure($name) { if (isset($this->spells)) { return $this->spells->getConjure($name); } throw new E_OTS_NotLoaded(); }
$main_content .= '<center><form action="?subtopic=adminpanel" METHOD=post><div class="BigButton" style="background-image:url(' . $layout_name . '/images/buttons/sbutton.gif)" ><div onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="BigButtonOver" style="background-image:url(' . $layout_name . '/images/buttons/sbutton_over.gif);" ></div><input class="ButtonText" type="image" name="Back" alt="Back" src="' . $layout_name . '/images/buttons/_sbutton_back.gif" ></div></div></form></center>'; } //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) {