fix onarmorempty
This commit is contained in:
parent
ed2a5321c8
commit
9011e6807b
@ -44,6 +44,19 @@ class ManiaExchangeInfoSearcher {
|
|||||||
$this->maniaControl = $maniaControl;
|
$this->maniaControl = $maniaControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public function updateMapObjectWithManiaExchangeIds(){
|
||||||
|
$maps = $this->maniaControl->mapManager->getMaps();
|
||||||
|
|
||||||
|
foreach($maps as $map){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets a Maplist from Mania Exchange
|
* Gets a Maplist from Mania Exchange
|
||||||
*
|
*
|
||||||
|
@ -79,6 +79,7 @@ class MapManager implements CallbackListener {
|
|||||||
$mysqli = $this->maniaControl->database->mysqli;
|
$mysqli = $this->maniaControl->database->mysqli;
|
||||||
$query = "CREATE TABLE IF NOT EXISTS `" . self::TABLE_MAPS . "` (
|
$query = "CREATE TABLE IF NOT EXISTS `" . self::TABLE_MAPS . "` (
|
||||||
`index` int(11) NOT NULL AUTO_INCREMENT,
|
`index` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
|
`mxid` int(11),
|
||||||
`uid` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
`uid` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
|
`name` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
`authorLogin` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
`authorLogin` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
@ -351,7 +352,6 @@ class MapManager implements CallbackListener {
|
|||||||
}
|
}
|
||||||
// Add map to map list
|
// Add map to map list
|
||||||
if(!$this->maniaControl->client->query('InsertMap', $mapFileName)) {
|
if(!$this->maniaControl->client->query('InsertMap', $mapFileName)) {
|
||||||
// TODO irgendein bug?
|
|
||||||
$this->maniaControl->chat->sendError("Couldn't add map to match settings!", $login);
|
$this->maniaControl->chat->sendError("Couldn't add map to match settings!", $login);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,8 @@ class StatisticCollector implements CallbackListener {
|
|||||||
case 'LibXmlRpc_OnArmorEmpty':
|
case 'LibXmlRpc_OnArmorEmpty':
|
||||||
$shooter = $this->maniaControl->playerManager->getPlayer($callback[1][1][0]);
|
$shooter = $this->maniaControl->playerManager->getPlayer($callback[1][1][0]);
|
||||||
$victim = $this->maniaControl->playerManager->getPlayer($callback[1][1][1]);
|
$victim = $this->maniaControl->playerManager->getPlayer($callback[1][1][1]);
|
||||||
$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);
|
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim);
|
||||||
break;
|
break;
|
||||||
case 'LibXmlRpc_OnPlayerRequestRespawn':
|
case 'LibXmlRpc_OnPlayerRequestRespawn':
|
||||||
@ -197,7 +198,8 @@ class StatisticCollector implements CallbackListener {
|
|||||||
$victim = $this->maniaControl->playerManager->getPlayer($paramsObject->Event->Victim->Login);
|
$victim = $this->maniaControl->playerManager->getPlayer($paramsObject->Event->Victim->Login);
|
||||||
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim);
|
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_DEATH, $victim);
|
||||||
$shooter = $this->maniaControl->playerManager->getPlayer($paramsObject->Event->Shooter->Login);
|
$shooter = $this->maniaControl->playerManager->getPlayer($paramsObject->Event->Shooter->Login);
|
||||||
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter);
|
if($shooter != null)
|
||||||
|
$this->maniaControl->statisticManager->incrementStat(self::STAT_ON_KILL, $shooter);
|
||||||
break;
|
break;
|
||||||
case 'OnRequestRespawn':
|
case 'OnRequestRespawn':
|
||||||
$paramsObject = json_decode($callback[1][1]);
|
$paramsObject = json_decode($callback[1][1]);
|
||||||
|
Loading…
Reference in New Issue
Block a user