small fix

This commit is contained in:
kremsy 2014-02-15 16:42:18 +01:00 committed by Steffen Schröder
parent 3773882cee
commit 8bce1ea949

View File

@ -271,7 +271,9 @@ class StatisticCollector implements CallbackListener {
$victim = $this->maniaControl->playerManager->getPlayer($callback[1][1][1]);
if (isset($callback[1][1][0])) {
$shooter = $this->maniaControl->playerManager->getPlayer($callback[1][1][0]);
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter);
if ($shooter != null) {
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter);
}
}
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim);
break;
@ -308,6 +310,9 @@ class StatisticCollector implements CallbackListener {
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim);
if (isset($paramsObject->Event->Shooter->Login)) {
$shooter = $this->maniaControl->playerManager->getPlayer($paramsObject->Event->Shooter->Login);
if ($shooter != null) {
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter);
}
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter);
}
break;