Example #1
0
 $solarSystem['regionID'] = (int) $system['regionID'];
 $kill['system'] = $solarSystem;
 if (isset($raw['victim']['position'])) {
     $locationID = Info::getLocationID($mail['solarSystem']['id'], $raw['victim']['position']);
     $kill['locationID'] = (int) $locationID;
 }
 $sequence = $mdb->findField('killmails', 'sequence', ['sequence' => ['$ne' => null]], ['sequence' => -1]);
 if ($sequence == null) {
     $sequence = 0;
 }
 $kill['sequence'] = $sequence + 1;
 $kill['attackerCount'] = (int) $mail['attackerCount'];
 $victim = createInvolved($mail['victim']);
 $victim['isVictim'] = true;
 $kill['vGroupID'] = $victim['groupID'];
 $victimPoints = Points::getPoints($victim['groupID']);
 if ($victimPoints === 0) {
     Util::out("WARNING: groupID does not have points assigned: " . $victim['groupID']);
 }
 $involved = array();
 $involved[] = $victim;
 foreach ($mail['attackers'] as $attacker) {
     $att = createInvolved($attacker);
     $att['isVictim'] = false;
     $involved[] = $att;
 }
 $kill['involved'] = $involved;
 $kill['awox'] = isAwox($kill);
 $kill['solo'] = isSolo($kill);
 $items = $mail['victim']['items'];
 $i = array();