Changeset 478 for dev/mods/rank_mod

Show
Ignore:
Timestamp:
11/28/09 00:50:59 (11 years ago)
Author:
kovell
Message:

Updated URL in history mod. Fixed t2 missiles => EWAR rank in rank mod.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/rank_mod/rank.php

    r447 r478  
    9191array( 'type' => 'destroyer', 'name' => 'Destroyer', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),              // 1 
    9292array( 'type' => 'cruiser', 'name' => 'Cruiser', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),                  // 2 
    93 array( 'type' => 'battlecruiser', 'name' => 'Battlecruiser', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),      // 3     
     93array( 'type' => 'battlecruiser', 'name' => 'Battlecruiser', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),      // 3 
    9494array( 'type' => 'battleship', 'name' => 'Battleship', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),            // 4 
    9595array( 'type' => 'capital', 'name' => 'Capital', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),                  // 5 
     
    130130foreach ($ship_sub_badges as $subclass) { 
    131131  if ($subclass['parent'] > $last_parent) { 
    132     $shipbadges[$subclass['parent']]['cnt']=$subclass['parent'];         
     132    $shipbadges[$subclass['parent']]['cnt']=$subclass['parent']; 
    133133    $ship_badges[] = $shipbadges[$subclass['parent']]; 
    134134    $last_parent = $subclass['parent']; 
     
    150150array( 'type' => 'redcross', 'name' => 'Scorer', 'cnt' => 0,  'mname' =>'Iron Cross'),          // 1 
    151151array( 'type' => 'cross', 'name' => 'Solo Killer', 'cnt' => 0, 'mname' =>'Winged Cross'),       // 2 
    152 array( 'type' => 'wing1', 'name' => 'Damagedealer', 'cnt' => 0, 'mname' =>'Diamond Wing'),      // 3     
     152array( 'type' => 'wing1', 'name' => 'Damagedealer', 'cnt' => 0, 'mname' =>'Diamond Wing'),      // 3 
    153153array( 'type' => 'skull', 'name' => 'Final Blows', 'cnt' => 0, 'mname' =>'Red Skull'),          // 4 
    154154array( 'type' => 'globe', 'name' => 'Podkiller', 'cnt' => 0, 'mname' =>'Silver Globe'),         // 5 
     
    162162array( 'type' => 'destroyer', 'name' => 'Destroyer', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),              // 1 
    163163array( 'type' => 'cruiser', 'name' => 'Cruiser', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),                  // 2 
    164 array( 'type' => 'battlecruiser', 'name' => 'Battlecruiser', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),      // 3     
     164array( 'type' => 'battlecruiser', 'name' => 'Battlecruiser', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),      // 3 
    165165array( 'type' => 'battleship', 'name' => 'Battleship', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),            // 4 
    166166array( 'type' => 'capital', 'name' => 'Capital', 'cnt' => 0, 'icon' => 0, 'ribbon' => 0, 'class' =>0),                  // 5 
     
    214214 
    215215$qry = new DBQuery(); 
    216 $query = "SELECT COUNT(*) as cnt, rank.med_id as med_id, rank.time_id as time_id  
    217           FROM `kb3_rank_medals` rank  
    218           WHERE rank.plt_id =".$pilot_id."  
     216$query = "SELECT COUNT(*) as cnt, rank.med_id as med_id, rank.time_id as time_id 
     217          FROM `kb3_rank_medals` rank 
     218          WHERE rank.plt_id =".$pilot_id." 
    219219          AND rank.med_site ='".KB_SITE."' 
    220           GROUP BY rank.med_id  
     220          GROUP BY rank.med_id 
    221221          ORDER BY 2 ASC"; 
    222222$qry->execute($query); 
     
    282282while ($row = $weaponlist->getRow()) 
    283283{ 
    284   $group = $row['itm_grp']; 
    285   if($group == 771 
    286         || ($group >= 506 && $group <= 511) 
    287         || $group == 524 
    288         || ($group >= 384 && $group <= 387) 
    289         || ($group >= 394 && $group <= 396) 
    290         || ($group >= 862 && $group <= 864) 
    291         || $group == 772 
    292         || $group == 89 
    293         || $group == 90 
    294         || $group == 476 
    295   ) { $group = 506; } 
    296   if ($group == 544  
    297         || $group == 549 
    298         || $group == 639 
    299         || $group == 641 
    300   ) { $group = 100; } 
    301   switch ($group) 
    302   { 
    303         case 53: $weaponbadges[1]['cnt']+=$row['cnt']; break; 
    304         case 55: $weaponbadges[2]['cnt']+=$row['cnt']; break; 
    305         case 74: $weaponbadges[0]['cnt']+=$row['cnt']; break; 
    306         case 506: $weaponbadges[3]['cnt']+=$row['cnt']; break; 
    307         case 100: $weaponbadges[5]['cnt']+=$row['cnt']; break; 
    308         default: $weaponbadges[4]['cnt']+=$row['cnt']; break; 
    309   } 
     284        $group = $row['itm_grp']; 
     285        if(in_array($group,array(89,90,384,385,386,387,394,395,396,476,507,508,509,510,511,524,653,654,655,656,657,771,772,862,863,864))) 
     286                $group = 506; 
     287        if (in_array($group, array(544, 549, 639, 641))) 
     288                $group = 100; 
     289        switch ($group) 
     290        { 
     291                case 53: $weaponbadges[1]['cnt']+=$row['cnt']; break; 
     292                case 55: $weaponbadges[2]['cnt']+=$row['cnt']; break; 
     293                case 74: $weaponbadges[0]['cnt']+=$row['cnt']; break; 
     294                case 506: $weaponbadges[3]['cnt']+=$row['cnt']; break; 
     295                case 100: $weaponbadges[5]['cnt']+=$row['cnt']; break; 
     296                default: $weaponbadges[4]['cnt']+=$row['cnt']; break; 
     297        } 
    310298} 
    311299 
     
    435423} 
    436424 
    437 ?>