<commit_before><?php
/*
  This file is part of WOT Game.

    WOT Game is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    WOT Game is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with WOT Game.  If not, see <http://www.gnu.org/licenses/>.
*/

require_once(LW_DIR.'lib/data/fleet/NavalFormationAttackFleet.class.php');

/**
 * Creates a report for a foreign user of a planet.
 * 
 * @author		2007-2009 Biggerskimo
 * @copyright	Lost Worlds <http://lost-worlds.net>
 */
class EspionageFleet extends NavalFormationAttackFleet {
	protected $missionID = 6;
	
	protected $estandByFleets = array();	
	protected $blocks = 0;
	public $destroyChance = 0;
	public $ereport = '';
	
	public $fight = false;
	
	protected $resourceTypes = array('metal', 'crystal', 'deuterium', 'energy_max');
	protected $colCount = 2;
	
	const RESOURCES = 0x01;
	const FLEET = 0x02;
	const DEFENSE = 0x04;
	const BUILDINGS = 0x08;
	const RESEARCH = 0x10;

	/**
	 * @see AbstractFleetEventHandler::executeImpact()
	 */
    public function executeImpact() {
    	$this->initStandByFleets();
    	
    	$this->ereport .= '<a id="ereport'.$this->fleetID.'"></a>';
    	$this->create();
    	$this->ereport .= '<div class="ereportbottom" style="text-align: center;">';		
		$this->destroy();
		$this->ereport .= '<a style="display: block;" href="game/index.php?page=FleetStartShips&amp;targetPlanetID='.$this->targetPlanetID.'&amp;backlink=../messages.php%3Ffolder=4%23ereport'.$this->fleetID.'">'.WCF::getLanguage()->get('wot.mission.mission'.$this->missionID.'.impact.owner.attack').'</a>';
		$this->ereport .= '<a style="display: block;" href="game/index.php?form=Simulator&amp;planetID='.$this->targetPlanetID.'">'.WCF::getLanguage()->get('wot.mission.mission'.$this->missionID.'.impact.owner.simulate').'</a>';
		$this->ereport .= '</div>';
		
    	$senderName = $this->parse(WCF::getLanguage()->get('wot.mission.mission6.sender.owner'));
		$subject = $this->parse(WCF::getLanguage()->get('wot.mission.mission6.impact.owner.subject'));
		MessageEditor::create($this->ownerID, $subject, $this->ereport, 0, $senderName, 4);
		
		$this->saveData(true);
    }
    
	/**
	 * @see Mission::check()
	 */
	public static function check(FleetQueue $fleetQueue) {
		$probes = isset($fleetQueue->ships[210]);
		$foreignPlanet = ($fleetQueue->getTargetPlanet()->id_owner != WCF::getUser()->userID);
		
		if($probes && $foreignPlanet) {
			return true;
		}
		
		return false;
	}
    <commit_msg>Bugfix für die leeren KBs in der DB<commit_after><?php
/*
  This file is part of WOT Game.

    WOT Game is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    WOT Game is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with WOT Game.  If not, see <http://www.gnu.org/licenses/>.
*/

require_once(LW_DIR.'lib/data/fleet/NavalFormationAttackFleet.class.php');

/**
 * Creates a report for a foreign user of a planet.
 * 
 * @author		2007-2009 Biggerskimo
 * @copyright	Lost Worlds <http://lost-worlds.net>
 */
class EspionageFleet extends NavalFormationAttackFleet {
	protected $missionID = 6;
	
	protected $estandByFleets = array();	
	protected $blocks = 0;
	public $destroyChance = 0;
	public $ereport = '';
	
	public $fight = false;
	
	protected $resourceTypes = array('metal', 'crystal', 'deuterium', 'energy_max');
	protected $colCount = 2;
	
	const RESOURCES = 0x01;
	const FLEET = 0x02;
	const DEFENSE = 0x04;
	const BUILDINGS = 0x08;
	const RESEARCH = 0x10;

	/**
	 * @see AbstractFleetEventHandler::executeImpact()
	 */
    public function executeImpact() {
    	$this->initStandByFleets();
    	
    	$this->ereport .= '<a id="ereport'.$this->fleetID.'"></a>';
    	$this->create();
    	$this->ereport .= '<div class="ereportbottom" style="text-align: center;">';		
		$this->destroy();
		$this->ereport .= '<a style="display: block;" href="game/index.php?page=FleetStartShips&amp;targetPlanetID='.$this->targetPlanetID.'&amp;backlink=../messages.php%3Ffolder=4%23ereport'.$this->fleetID.'">'.WCF::getLanguage()->get('wot.mission.mission'.$this->missionID.'.impact.owner.attack').'</a>';
		$this->ereport .= '<a style="display: block;" href="game/index.php?form=Simulator&amp;planetID='.$this->targetPlanetID.'">'.WCF::getLanguage()->get('wot.mission.mission'.$this->missionID.'.impact.owner.simulate').'</a>';
		$this->ereport .= '</div>';
		
    	$senderName = $this->parse(WCF::getLanguage()->get('wot.mission.mission6.sender.owner'));
		$subject = $this->parse(WCF::getLanguage()->get('wot.mission.mission6.impact.owner.subject'));
		MessageEditor::create($this->ownerID, $subject, $this->ereport, 0, $senderName, 4);
		
		$this->saveData($this->fight);
    }
    
	/**
	 * @see Mission::check()
	 */
	public static function check(FleetQueue $fleetQueue) {
		$probes = isset($fleetQueue->ships[210]);
		$foreignPlanet = ($fleetQueue->getTargetPlanet()->id_owner != WCF::getUser()->userID);
		
		if($probes && $foreignPlanet) {
			return true;
		}
		
		return false;
	}
    
{'fraction_non_alphanumeric': 0.15879755434782608, 'fraction_numerical': 0.013247282608695652, 'mean_word_length': 4.134263295553618, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 78, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4890071', 'n_tokens_mistral': 2090, 'n_tokens_neox': 1916, 'n_words': 467}