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

@ -424,8 +424,8 @@ class DonationPlugin implements CallbackListener, CommandListener, Plugin {
$message = 'Donation successful! Thanks.';
}
$this->maniaControl->chat->sendSuccess($message, $login);
$this->maniaControl->statisticManager->insertStat(self::STAT_PLAYER_DONATIONS, $player,
$this->maniaControl->server->getServerId(), $amount);
$serverIndex = $this->maniaControl->server->getIndex();
$this->maniaControl->statisticManager->insertStat(self::STAT_PLAYER_DONATIONS, $player, $serverIndex, $amount);
}
}
else {

View File

@ -272,7 +272,8 @@ class KarmaPlugin implements CallbackListener, Plugin {
$voted = $this->getPlayerVote($player, $map);
var_dump($voted);
if(!$voted){
$this->maniaControl->statisticManager->incrementStat(self::STAT_PLAYER_MAPVOTES, $player, $this->maniaControl->server->getServerId());
$serverIndex = $this->maniaControl->server->getIndex();
$this->maniaControl->statisticManager->incrementStat(self::STAT_PLAYER_MAPVOTES, $player, $serverIndex);
}
$success = $this->savePlayerVote($player, $map, $vote);