statistic collector fix

This commit is contained in:
kremsy 2014-03-02 10:27:55 +01:00 committed by Steffen Schröder
parent 03da64decb
commit 65bd7679b1

View File

@ -10,8 +10,8 @@ namespace ManiaControl\Statistics;
use ManiaControl\Callbacks\CallbackListener;
use ManiaControl\Callbacks\CallbackManager;
use ManiaControl\ManiaControl;
use ManiaControl\Players\PlayerManager;
use ManiaControl\Players\Player;
use ManiaControl\Players\PlayerManager;
class StatisticCollector implements CallbackListener {
/**
@ -71,7 +71,7 @@ class StatisticCollector implements CallbackListener {
//Initialize Settings
$this->maniaControl->settingManager->initSetting($this, self::SETTING_COLLECT_STATS_ENABLED, true);
$this->maniaControl->settingManager->initSetting($this, self::SETTING_COLLECT_STATS_MINPLAYERS, 2); //TODO just temp on 2
$this->maniaControl->settingManager->initSetting($this, self::SETTING_COLLECT_STATS_MINPLAYERS, 4);
$this->maniaControl->settingManager->initSetting($this, self::SETTING_ON_SHOOT_PRESTORE, 10);
}
@ -271,7 +271,9 @@ class StatisticCollector implements CallbackListener {
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter);
}
}
if ($victim) {
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim);
}
break;
case 'LibXmlRpc_OnPlayerRequestRespawn':
$player = $this->maniaControl->playerManager->getPlayer($callback[1][1][0]);