Esempio n. 1
0
 /**
  * @param string $id
  * @param integer $activity
  * @param string $attacker_name
  * @param string $attacker_planet_coordinates
  * @param string $attacker_planet_name
  * @param integer $attacker_planet_type
  * @param string $defender_name
  * @param string $defender_planet_coordinates
  * @param string $defender_planet_name
  * @param integer $defender_planet_type
  * @param string $event_time
  * @param integer $event_timestamp
  * @param integer $loot_percentage
  * @param integer $spy_fail_chance
  * @param integer $total_defense_count
  * @param integer $total_ship_count
  */
 public function __construct($id, $activity, $attacker_name, $attacker_planet_coordinates, $attacker_planet_name, $attacker_planet_type, $attacker_alliance_name, $attacker_alliance_tag, $defender_name, $defender_planet_coordinates, $defender_planet_name, $defender_planet_type, $defender_alliance_name, $defender_alliance_tag, $time, $timestamp, $loot_percentage, $spy_fail_chance, $total_defense_count, $total_ship_count)
 {
     parent::__construct($id, $time, $timestamp);
     $this->_activity = $activity;
     $this->_attacker = new ReportPlayer($attacker_name);
     $this->_attacker->setPlanet(new Planet($attacker_planet_type, $attacker_planet_coordinates, $attacker_planet_name));
     $this->_attacker->setAlliance(new Alliance($attacker_alliance_tag, $attacker_alliance_name));
     $this->_defender = new SpiedPlayer($defender_name);
     $this->_defender->setPlanet(new Planet($defender_planet_type, $defender_planet_coordinates, $defender_planet_name));
     $this->_defender->setAlliance(new Alliance($defender_alliance_tag, $defender_alliance_name));
     $this->_loot_percentage = $loot_percentage;
     $this->_spy_fail_chance = $spy_fail_chance;
     $this->_total_defense_count = $total_defense_count;
     $this->_total_ship_count = $total_ship_count;
 }
Esempio n. 2
0
 public function jsonSerialize()
 {
     return array_merge(array('resources' => $this->resources, 'buildings' => $this->buildings, 'research' => $this->research, 'ships' => $this->ships, 'defence' => $this->defence), parent::jsonSerialize());
 }
Esempio n. 3
0
 public function jsonSerialize()
 {
     return array_merge(array('defence' => $this->defence), parent::jsonSerialize());
 }