Example #1
0
 /**
  * @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();
 }
Example #2
0
     $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) {
             foreach ($arr as $voc_id => $voc_name) {
                 if ($vocation_to_add_name == $voc_name) {
                     $voc_str = $prom . ';' . $voc_id;