updated stats

This commit is contained in:
kremsy
2014-01-03 21:06:24 +01:00
parent dcdb7f8226
commit bb2e3b13fd
6 changed files with 34 additions and 29 deletions

View File

@ -90,9 +90,9 @@ class StatisticCollector implements CallbackListener {
//Write Shoot Data into database
if($this->onShootArray[$login] > $this->maniaControl->settingManager->getSetting($this, self::SETTING_ON_SHOOT_PRESTORE)) {
$serverLogin = $this->maniaControl->server->getLogin();
$serverId = $this->maniaControl->server->getServerId();
$player = $this->maniaControl->playerManager->getPlayer($login);
$this->maniaControl->statisticManager->insertStat(self::STAT_ON_SHOOT, $player, $serverLogin, $this->onShootArray[$login]);
$this->maniaControl->statisticManager->insertStat(self::STAT_ON_SHOOT, $player, $serverId, $this->onShootArray[$login]);
$this->onShootArray[$login] = 0;
}
}
@ -114,8 +114,8 @@ class StatisticCollector implements CallbackListener {
//Insert Data into Database, and destroy player
if(isset($this->onShootArray[$player->login])) {
if($this->onShootArray[$player->login] > 0) {
$serverLogin = $this->maniaControl->server->getLogin();
$this->maniaControl->statisticManager->insertStat(self::STAT_ON_SHOOT, $player, $serverLogin, $this->onShootArray[$player->login]);
$serverId = $this->maniaControl->server->getServerId();
$this->maniaControl->statisticManager->insertStat(self::STAT_ON_SHOOT, $player, $serverId, $this->onShootArray[$player->login]);
}
unset($this->onShootArray[$player->login]);
}