diff --git a/config.php b/config.php index d9f03874..1e8f99e0 100644 --- a/config.php +++ b/config.php @@ -84,12 +84,6 @@ $config = array( //'2' => 'Your Second World Name' ), - // loot - 'loot_show_percentage' => true, // to true to show tooltip percent - - // links - 'items_url' => 'https://tibia.fandom.com/wiki/', // set to website which shows details about items. - // images 'outfit_images_url' => 'https://outfit-images.ots.me/outfit.php', // set to animoutfit.php for animated outfit 'outfit_images_wrong_looktypes' => [75, 126, 127, 266, 302], // this looktypes needs to have different margin-top and margin-left because they are wrong positioned @@ -100,6 +94,8 @@ $config = array( 'creature_images_url' => 'images/monsters/', // set to images/monsters if you host your own creatures in images folder 'creature_images_extension' => '.gif', 'creature_images_preview' => false, // set to true to allow picture previews for creatures + 'creatures_items_url' => 'https://tibia.fandom.com/wiki/', // set to website which shows details about items. + 'creature_loot_percentage' => true, // set to true to show the loot tooltip percent // account 'account_management' => true, // disable if you're using other method to manage users (fe. tfs account manager) diff --git a/system/pages/creatures.php b/system/pages/creatures.php index 3560ecc2..f6f86450 100644 --- a/system/pages/creatures.php +++ b/system/pages/creatures.php @@ -50,7 +50,7 @@ if (empty($_REQUEST['creature'])) { $item['name'] = getItemNameById($item['id']); $item['rarity_chance'] = round($item['chance'] / 1000, 2); $item['rarity'] = getItemRarity($item['chance']); - $item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (config('loot_show_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count']; + $item['tooltip'] = ucfirst($item['name']) . '<br/>Chance: ' . $item['rarity'] . (config('creature_loot_percentage') ? ' ('. $item['rarity_chance'] .'%)' : '') . '<br/>Max count: ' . $item['count']; $loot_list[] = $item; } diff --git a/system/templates/creature.html.twig b/system/templates/creature.html.twig index 21b1fb4a..493a4b06 100644 --- a/system/templates/creature.html.twig +++ b/system/templates/creature.html.twig @@ -155,7 +155,7 @@ {% if (item.count > 1) %} <span class="loot_amount">{{ item.count }}</span> {% endif %} - <a href="{{ config.items_url }}{{ item.name|title }}"><img title="{{ item.tooltip }}" src="{{ config.item_images_url }}{{ item.id }}{{ config.item_images_extension }}" class="loot_image"/></a> + <a href="{{ config.creatures_items_url }}{{ item.name|title }}"><img title="{{ item.tooltip }}" src="{{ config.item_images_url }}{{ item.id }}{{ config.item_images_extension }}" class="loot_image"/></a> </span> {% endfor %} </td>