mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 09:44:55 +02:00
added same printing to spells
more elegant way of showing message on reload creatures and spells
This commit is contained in:
@@ -68,8 +68,13 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
||||
}
|
||||
$type = 2;
|
||||
$count = $spell->getConjureCount();
|
||||
try { $db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')"); } catch(PDOException $error) {}
|
||||
echo "Added: ".$name."<br>";
|
||||
try {
|
||||
$db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')");
|
||||
success("Added: ".$name."<br>");
|
||||
}
|
||||
catch(PDOException $error) {
|
||||
warning('Error while adding spell (' . $name . '): ' . $error->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
//add instant spells
|
||||
@@ -118,8 +123,13 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
||||
}
|
||||
$type = 1;
|
||||
$count = 0;
|
||||
try { $db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES ('".$spell_txt."', '".$name."', '".$spell_txt."', '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')"); } catch(PDOException $error) {}
|
||||
echo "Added: ".$name."<br/>";
|
||||
try {
|
||||
$db->query("INSERT INTO myaac_spells (spell, name, words, type, mana, level, maglevel, soul, premium, vocations, conjure_count, hidden) VALUES (".$db->quote($spell_txt).", ".$db->quote($name).", ".$db->quote($spell_txt).", '".$type."', '".$mana."', '".$lvl."', '".$mlvl."', '".$soul."', '".$pacc."', '".$vocations_to_db."', '".$count."', '".$hide_spell."')");
|
||||
success("Added: ".$name."<br/>");
|
||||
}
|
||||
catch(PDOException $error) {
|
||||
warning('Error while adding spell (' . $name . '): ' . $error->getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user