mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-17 11:13:27 +02:00
added id field on monsters, so you can delete in phpmyadmin
fixed adding some creatures with ' and "
This commit is contained in:
@@ -135,9 +135,15 @@ if(isset($_POST['reload_monsters']) && $canEdit)
|
||||
$flags['convinceable'] = '0';
|
||||
|
||||
if(!in_array($name, $names_added)) {
|
||||
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, '".$name."', '".$mana."', '".$exp."', '".$health."', '".$speed_lvl."', '".$use_haste."', '".$voices_string."', '".$immunities_string."', '".$flags['summonable']."', '".$flags['convinceable']."', '".$race."', '".$gfx_name."', '" . $allmonsters->currentFile() . "')"); } catch(PDOException $error) {}
|
||||
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()) . ")");
|
||||
echo "Added: ".$name."<br/>";
|
||||
}
|
||||
catch(PDOException $error) {
|
||||
echo 'Error while adding monster (' . $name . '): ' . $error->getMessage();
|
||||
}
|
||||
|
||||
$names_added[] = $name;
|
||||
echo "Added: ".$name."<br/>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user