mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-26 17:29:21 +02:00

* save monster loot in database in json format instead loading it every time from xml file * store monster voices and immunities in json format * removed useless monsters.gfx_name field from database * convert item name to item id in loot in monsters.xml loader * after changing template you will be redirected to latest viewed page * display gallery add image form only on main gallery page * fixed displaying monster loot when item.name in loot is used instead of item.id * (intern) added new function getItemNameById($id) * (intern) renamed database field monsters.hide_creature to hidden
18 lines
648 B
PHP
18 lines
648 B
PHP
<?php
|
|
|
|
// change monsters.file_path field to loot
|
|
if(fieldExist('file_path', TABLE_PREFIX . 'monsters')) {
|
|
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` CHANGE `file_path` `loot` VARCHAR(5000);");
|
|
}
|
|
|
|
// update loot to empty string
|
|
$db->query("UPDATE `" . TABLE_PREFIX . "monsters` SET `loot` = '';");
|
|
|
|
// drop monsters.gfx_name field
|
|
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` DROP COLUMN `gfx_name`;");
|
|
|
|
// rename hide_creature to hidden
|
|
if(fieldExist('hide_creature', TABLE_PREFIX . 'monsters')) {
|
|
$db->query("ALTER TABLE `" . TABLE_PREFIX . "monsters` CHANGE `hide_creature` `hidden` TINYINT(1) NOT NULL DEFAULT 0;");
|
|
}
|
|
?>
|