* added new tooltip to view characters equipment item name

* this requires loaded items - go to admin panel and select Items menu, then reload
* added items.xml loader class and weapons.xml loader class
* load also runes into spells table
* (internal) changed spells.vocations database field to store json data instead of comma separated
* (internal) renamed existing Items class to Items_Images
This commit is contained in:
slawkens
2017-10-19 17:11:49 +02:00
parent 23c1df72aa
commit 913b4297cf
17 changed files with 1297 additions and 298 deletions

View File

@@ -119,12 +119,21 @@ function getGuildLink($name, $generate = true)
function getItemImage($id, $count = 1)
{
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'] . '"';
}
$file_name = $id;
if($count > 1)
$file_name .= '-' . $count;
global $config;
return '<img src="' . $config['item_images_url'] . $file_name . '.gif" width="32" height="32" border="0" alt=" ' .$id . '" />';
return '<img src="' . $config['item_images_url'] . $file_name . '.gif"' . $tooltip . ' width="32" height="32" border="0" alt=" ' .$id . '" />';
}
function getFlagImage($country)