Ejemplo n.º 1
0
 function get_item_icon($slot, $id = 0)
 {
     global $config, $_SYSTEM, $_DOMAIN, $mysql;
     if ($id == 0) {
         $id = $this->items[$slot];
     }
     if ($id) {
         $r = $mysql->getRow("SELECT `itemicon` FROM `itemicon` WHERE itemnumber = ?1", $id, 'armory');
         if (!$r || !$r['itemicon'] || !file_exists('images/icons/64x64/' . strtolower(basename($r['itemicon'])) . '.jpg') || trim(basename($r['itemicon'])) == '') {
             //('images/icon/'.str_replace('.png','',strtolower(basename($r['itemicon']))).'.jpg');
             if ($_SYSTEM->update_icon_db($id)) {
                 return character::get_item_icon(0, $id);
             } else {
                 return $_DOMAIN . 'images/icon/' . strtolower(basename($r['itemicon'])) . '.jpg';
             }
             // Aktualizacja nie udana :(
         } else {
             return $_DOMAIN . 'images/icon/' . strtolower(basename($r['itemicon'])) . '.jpg';
         }
         //return 'http://wow.allakhazam.com/images/icons/'.$r['itemicon'];
     }
     return false;
 }