/** * @version 0.1.3 * @since 0.0.7 * @return array List of instant spells names. * @throws E_OTS_NotLoaded If spells list is not loaded. * @deprecated 0.1.3 Use POT::getSpellsList()->getInstantsList(). */ public function getInstantsList() { if (isset($this->spells)) { return $this->spells->getInstantsList(); } throw new E_OTS_NotLoaded(); }
$pacc = $spell->isPremium(); if ($pacc) { $pacc = 'yes'; } else { $pacc = 'no'; } $type = 'conjure'; $count = $spell->getConjureCount(); try { $SQL->query('INSERT INTO ' . $SQL->tableName('z_spells') . ' (name, spell, spell_type, mana, lvl, mlvl, soul, pacc, vocations, conj_count, hide_spell) VALUES (' . $SQL->quote($name) . ', ' . $SQL->quote($spell_txt) . ', \'' . $type . '\', \'' . $mana . '\', \'' . $lvl . '\', \'' . $mlvl . '\', \'' . $soul . '\', \'' . $pacc . '\', ' . $SQL->quote($vocations_to_db) . ', \'' . $count . '\', \'' . $hide_spell . '\')'); } catch (PDOException $error) { } $main_content .= "Added: " . $name . "<br>"; } //add instant spells $instantlist = $allspells->getInstantsList(); $main_content .= "<h3>Instant:</h3>"; foreach ($instantlist as $spellname) { $spell = $allspells->getInstant($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) {