Exemplo n.º 1
0
 public function process()
 {
     $o = new Object();
     $o->setUserId($this->datas['user_id']);
     $o->setUserName($this->datas['user_name']);
     $o->setUserTeam($this->datas['user_team']);
     $o->setUserSteamid($this->datas['steam_id']);
     $o->setPosX($this->datas["pos_x"]);
     $o->setPosY($this->datas["pos_y"]);
     $o->setPosZ($this->datas["pos_z"]);
     $o->setStuff($this->datas["stuff"]);
     return $o;
 }
Exemplo n.º 2
0
 private function processThrewStuff(\eBot\Message\Type\ThrewStuff $message)
 {
     Logger::debug("Processing ThrewStuff Message");
     if (!$this->waitForRestart && $this->enable && in_array($this->getStatus(), array(self::STATUS_FIRST_SIDE, self::STATUS_SECOND_SIDE, self::STATUS_OT_FIRST_SIDE, self::STATUS_OT_SECOND_SIDE))) {
         $user = $this->processPlayer($message->getUserId(), $message->getUserName(), $message->getUserTeam(), $message->getUserSteamid());
         \mysql_query("INSERT INTO `players_heatmap` (`match_id`,`map_id`,`event_name`,`event_x`,`event_y`,`event_z`,`player_name`,`player_id`,`player_team`,`round_id`,`round_time`, `created_at`,`updated_at`)\n                VALUES\n                (" . $this->match_id . ", " . $this->currentMap->getMapId() . ", '" . $message->stuff . "', '" . $message->posX . "', '" . $message->posY . "', '" . $message->posZ . "', '" . addslashes($message->userName) . "', '" . $user->getId() . "', '" . $message->userTeam . "', '" . $this->getNbRound() . "', '" . $this->getRoundTime() . "', NOW(), NOW())\n                ");
         $this->addLog($message->userName . " (" . $message->userTeam . ") threw " . $message->stuff . " at [" . $message->posX . " " . $message->posY . " " . $message->posZ . "]");
     }
 }