mirror of
https://github.com/slawkens/myaac.git
synced 2025-10-14 17:54:55 +02:00
* PLEASE RELOAD YOUR ITEMS AND MONSTERS AFTER THIS UPDATE
* 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
This commit is contained in:
@@ -117,17 +117,26 @@ function getGuildLink($name, $generate = true)
|
||||
return generateLink($url, $name);
|
||||
}
|
||||
|
||||
function getItemImage($id, $count = 1)
|
||||
{
|
||||
function getItemNameById($id) {
|
||||
global $db;
|
||||
|
||||
$tooltip = '';
|
||||
$query = $db->query('SELECT `name` FROM `' . TABLE_PREFIX . 'items` WHERE `id` = ' . $db->quote($id) . ' LIMIT 1;');
|
||||
if($query->rowCount() == 1) {
|
||||
$item = $query->fetch();
|
||||
$tooltip = ' class="tooltip" title="' . $item['name'] . '"';
|
||||
return $item['name'];
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
function getItemImage($id, $count = 1)
|
||||
{
|
||||
$tooltip = '';
|
||||
|
||||
$name = getItemNameById($id);
|
||||
if(!empty($name)) {
|
||||
$tooltip = ' class="tooltip" title="' . $name . '"';
|
||||
}
|
||||
|
||||
$file_name = $id;
|
||||
if($count > 1)
|
||||
$file_name .= '-' . $count;
|
||||
|
Reference in New Issue
Block a user