Show
Ignore:
Timestamp:
12/19/07 14:57:52 (15 years ago)
Author:
ralle030583
Message:

- fix for not showing dropped items when nothing

else was destroyed in killmail

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/kill_detail.php

    r292 r293  
    167167$smarty->assign('VictimShipImg', $ship->getImage(64)); 
    168168 
     169// preparing slot layout 
     170 
     171    $slot_array = array(); 
     172    $slot_array[1] = array('img' => 'icon08_11.png', 'text' => 'Fitted - High slot', 'items' => array()); 
     173    $slot_array[2] = array('img' => 'icon08_10.png', 'text' => 'Fitted - Mid slot', 'items' => array()); 
     174    $slot_array[3] = array('img' => 'icon08_09.png', 'text' => 'Fitted - Low slot', 'items' => array()); 
     175    $slot_array[5] = array('img' => 'icon68_01.png', 'text' => 'Fitted - Rig slot', 'items' => array()); 
     176    $slot_array[6] = array('img' => 'icon02_10.png', 'text' => 'Drone bay', 'items' => array()); 
     177    $slot_array[4] = array('img' => 'icon03_14.png', 'text' => 'Cargo Bay', 'items' => array()); 
     178 
    169179// ship fitting 
    170180if (count($kill->destroyeditems_) > 0) 
    171181{ 
    172182    $dest_array = array(); 
    173     $dest_array[1] = array('img' => 'icon08_11.png', 'text' => 'Fitted - High slot', 'items' => array()); 
    174     $dest_array[2] = array('img' => 'icon08_10.png', 'text' => 'Fitted - Mid slot', 'items' => array()); 
    175     $dest_array[3] = array('img' => 'icon08_09.png', 'text' => 'Fitted - Low slot', 'items' => array()); 
    176     $dest_array[5] = array('img' => 'icon68_01.png', 'text' => 'Fitted - Rig slot', 'items' => array()); 
    177     $dest_array[6] = array('img' => 'icon02_10.png', 'text' => 'Drone bay', 'items' => array()); 
    178     $dest_array[4] = array('img' => 'icon03_14.png', 'text' => 'Cargo Bay', 'items' => array()); 
    179  
    180183    foreach($kill->destroyeditems_ as $destroyed) 
    181184    { 
     
    187190            $formatted = $destroyed->getFormatttedValue(); 
    188191        } 
    189         $dest_array[$destroyed->getLocationID()]['items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID(),'slotID' => $destroyed->getLocationID()); 
     192        $dest_array[$destroyed->getLocationID()][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $destroyed->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID(),'slotID' => $destroyed->getLocationID()); 
    190193    } 
    191194} 
     
    194197{ 
    195198    $drop_array = array(); 
    196     $drop_array[1] = array('img' => 'icon08_11.png', 'text' => 'Fitted - High slot', 'items' => array()); 
    197     $drop_array[2] = array('img' => 'icon08_10.png', 'text' => 'Fitted - Mid slot', 'items' => array()); 
    198     $drop_array[3] = array('img' => 'icon08_09.png', 'text' => 'Fitted - Low slot', 'items' => array()); 
    199     $drop_array[5] = array('img' => 'icon68_01.png', 'text' => 'Fitted - Rig slot', 'items' => array()); 
    200     $drop_array[6] = array('img' => 'icon02_10.png', 'text' => 'Drone bay', 'items' => array()); 
    201     $drop_array[4] = array('img' => 'icon03_14.png', 'text' => 'Cargo Bay', 'items' => array()); 
    202  
    203199    foreach($kill->droppeditems_ as $dropped) 
    204200    { 
     
    210206            $formatted = $dropped->getFormatttedValue(); 
    211207        } 
    212         $drop_array[$dropped->getLocationID()]['items'][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $dropped->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID(),'slotID' => $dropped->getLocationID()); 
     208        $drop_array[$dropped->getLocationID()][] = array('Icon' => $item->getIcon(32), 'Name' => $item->getName(), 'Quantity' => $dropped->getQuantity(), 'Value' => $formatted, 'single_unit' => $value, 'itemID' => $item->getID(),'slotID' => $dropped->getLocationID()); 
    213209    } 
    214210} 
     
    229225$dropvalue = number_format($dropvalue, 2); 
    230226 
    231  
    232227$smarty->assign_by_ref('destroyed', $dest_array); 
    233228$smarty->assign_by_ref('dropped', $drop_array); 
     229$smarty->assign_by_ref('slots', $slot_array); 
    234230$smarty->assign('ItemValue', $Formatted); 
    235231$smarty->assign('DropValue', $dropvalue);