mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00
added same printing to spells
more elegant way of showing message on reload creatures and spells
This commit is contained in:
parent
4fa32e79ce
commit
57c2547098
@ -137,10 +137,10 @@ if(isset($_POST['reload_monsters']) && $canEdit)
|
|||||||
if(!in_array($name, $names_added)) {
|
if(!in_array($name, $names_added)) {
|
||||||
try {
|
try {
|
||||||
$db->query("INSERT INTO myaac_monsters (hide_creature, name, mana, exp, health, speed_lvl, use_haste, voices, immunities, summonable, convinceable, race, gfx_name, file_path) VALUES (0, ".$db->quote($name).", '".$mana."', '".$exp."', '".$health."', '".$speed_lvl."', '".$use_haste."', ".$db->quote($voices_string).", ".$db->quote($immunities_string).", '".$flags['summonable']."', '".$flags['convinceable']."', '".$race."', ".$db->quote($gfx_name).", " . $db->quote($allmonsters->currentFile()) . ")");
|
$db->query("INSERT INTO myaac_monsters (hide_creature, name, mana, exp, health, speed_lvl, use_haste, voices, immunities, summonable, convinceable, race, gfx_name, file_path) VALUES (0, ".$db->quote($name).", '".$mana."', '".$exp."', '".$health."', '".$speed_lvl."', '".$use_haste."', ".$db->quote($voices_string).", ".$db->quote($immunities_string).", '".$flags['summonable']."', '".$flags['convinceable']."', '".$race."', ".$db->quote($gfx_name).", " . $db->quote($allmonsters->currentFile()) . ")");
|
||||||
echo "Added: ".$name."<br/>";
|
success("Added: ".$name."<br/>");
|
||||||
}
|
}
|
||||||
catch(PDOException $error) {
|
catch(PDOException $error) {
|
||||||
echo 'Error while adding monster (' . $name . '): ' . $error->getMessage();
|
warning('Error while adding monster (' . $name . '): ' . $error->getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
$names_added[] = $name;
|
$names_added[] = $name;
|
||||||
|
@ -68,8 +68,13 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
|||||||
}
|
}
|
||||||
$type = 2;
|
$type = 2;
|
||||||
$count = $spell->getConjureCount();
|
$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) {}
|
try {
|
||||||
echo "Added: ".$name."<br>";
|
$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
|
//add instant spells
|
||||||
@ -118,8 +123,13 @@ if(isset($_POST['reload_spells']) && $canEdit)
|
|||||||
}
|
}
|
||||||
$type = 1;
|
$type = 1;
|
||||||
$count = 0;
|
$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) {}
|
try {
|
||||||
echo "Added: ".$name."<br/>";
|
$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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user