Show
Ignore:
Timestamp:
12/02/06 05:17:10 (14 years ago)
Author:
exi
Message:

Reduced one potential sql-bug.
Added ability to identify items as t2 via their techlevel rather than just 'II'.
Fixed item location 0 to not cause skipping that item.
Added anzahl/quantity-replace for the german killpreparser.
Fixed final blow award to show correct numbers.
Removed unnecessary code from db.php.
Added a table data check to the sql importer and made the importer more verbose, this should minimize support requests caused by empty table data.
Fixed a small misalignment of the comment block.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/class.item.php

    r121 r133  
    2424        return $this->row_['itm_name']; 
    2525    } 
    26      
    2726 
    2827 
    29   function getIcon($size = 32) 
     28 
     29    function getIcon($size = 32) 
    3030    { 
    3131        $this->execQuery(); 
     
    4747        } 
    4848 
    49         if (substr($this->getName(), strlen($this->getName()) - 2, 2) == "II") 
     49        if (substr($this->getName(), strlen($this->getName()) - 2, 2) == "II" || $this->row_['techlevel']) 
    5050        { 
    5151            $icon .= IMG_URL.'/items/32_32/t2.gif'; 
     
    5959        $smarty->assign('icon', $icon); 
    6060        return $smarty->fetch('icon.tpl'); 
    61     }  
     61    } 
    6262 
    6363    function getSlot() 
     
    7373            $this->sql_ = "select * 
    7474                           from kb3_items, kb3_item_types 
    75                                where itm_id = ".$this->id_." 
     75                               where itm_id = '".$this->id_."' 
    7676                               and itm_type = itt_id"; 
    77             $this->qry_->execute($this->sql_) or die($this->qry_->getErrorMsg()); 
     77            $this->qry_->execute($this->sql_); 
    7878            $this->row_ = $this->qry_->getRow(); 
    7979        } 
     
    9797                                    where itm_name = '".slashfix(substr($name,0,-1))."'"); 
    9898                    $row = $qry->getRow(); 
    99                     $qry->execute("INSERT INTO kb3_items (itm_name,itm_volume,itm_type,itm_externalid,itm_techlevel, itm_icon) 
     99                    $qry->execute("INSERT INTO kb3_items (itm_name,itm_volume,itm_type,itm_externalid,itm_techlevel,itm_icon) 
    100100                                    VALUES ('".slashfix($name)."','".$row['itm_volume']."','".$row['itm_type']."','".$row['itm_externalid']."','2','".$row['itm_icon']."')"); 
    101                     $this->id_ = $qry->getInsertID(); 
    102101                } 
    103102                else 
     
    106105                    $qry->execute("INSERT INTO kb3_items (itm_name,itm_type) 
    107106                                    VALUES ('".slashfix($name)."','721')"); 
    108                     $this->id_ = $qry->getInsertID(); 
    109107                } 
     108                $row['itm_id'] = $qry->getInsertID(); 
    110109            } 
    111110        }