} //Somebody died! if ($parser->type_id == 11) { $encounter->kill($parser->target_id); } elseif ($parser->type_id == 12) { $encounter->kill($parser->origin_id); } //Hostile action didn't happen, check for expiration of combat. if ($v->timestamp - $encounter->last_active >= 6) { $boss_id = $encounter->get_boss(); //We have met the condition to end combat. $encounter->end_combat(); //Check if we have a boss of importance. if ($boss_id !== false) { //Is this boss even alive? $alive = $encounter->is_alive($boss_id); //Snag his name. $boss_name = $encounter->get_name($boss_id); $boss_data = array('s' => $encounter->get_line(true), 'e' => $encounter->get_line(false), 'l' => $encounter->get_length(), 'w' => $alive); //Add this to the killed bosses array. if (!$alive) { $v->killed_bosses[] = $boss_id; } //Last step... see if we have the minimum length. if ($boss_data['l'] >= 30) { if ($encounter->multi) { array_pop($params['bosses'][$boss_name]); } $params['bosses'][$boss_name][] = $boss_data; } }