renamed server id to index

This commit is contained in:
Steffen Schröder
2014-01-05 14:41:19 +01:00
parent eb37af0579
commit 7eb1091511
8 changed files with 236 additions and 248 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)) {
$serverId = $this->maniaControl->server->getServerId();
$serverIndex = $this->maniaControl->server->getIndex();
$player = $this->maniaControl->playerManager->getPlayer($login);
$this->maniaControl->statisticManager->insertStat(self::STAT_ON_SHOOT, $player, $serverId, $this->onShootArray[$login]);
$this->maniaControl->statisticManager->insertStat(self::STAT_ON_SHOOT, $player, $serverIndex, $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) {
$serverId = $this->maniaControl->server->getServerId();
$this->maniaControl->statisticManager->insertStat(self::STAT_ON_SHOOT, $player, $serverId, $this->onShootArray[$player->login]);
$serverIndex = $this->maniaControl->server->getIndex();
$this->maniaControl->statisticManager->insertStat(self::STAT_ON_SHOOT, $player, $serverIndex, $this->onShootArray[$player->login]);
}
unset($this->onShootArray[$player->login]);
}