customvotesplugin update dedicated api

This commit is contained in:
kremsy 2014-05-08 19:34:19 +02:00
parent 554abe77da
commit 90d401bbc3

View File

@ -173,24 +173,13 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
} }
/* Disable Standard Votes */ /* Disable Standard Votes */
$array["Command"] = VoteRatio::COMMAND_BAN; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_BAN, -1.);
$array["Param"] = ""; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_KICK, -1.);
$array["Ratio"] = (float)-1; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_RESTART_MAP, -1.);
$ratioArray[] = $array; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_TEAM_BALANCE, -1.);
$ratioArray[] = new VoteRatio(VoteRatio::COMMAND_NEXT_MAP, -1.);
$array["Command"] = VoteRatio::COMMAND_KICK; $this->maniaControl->client->setCallVoteRatios($ratioArray, false);
$ratioArray[] = $array;
$array["Command"] = VoteRatio::COMMAND_RESTART_MAP;
$ratioArray[] = $array;
$array["Command"] = VoteRatio::COMMAND_TEAM_BALANCE;
$ratioArray[] = $array;
$array["Command"] = VoteRatio::COMMAND_NEXT_MAP;
$ratioArray[] = $array;
$this->maniaControl->client->setCallVoteRatiosEx(false, $ratioArray);
$this->constructMenu(); $this->constructMenu();
return true; return true;
@ -386,20 +375,13 @@ class CustomVotesPlugin implements CommandListener, CallbackListener, ManialinkP
//Enable Standard Votes //Enable Standard Votes
$defaultRatio = $this->maniaControl->client->getCallVoteRatio(); $defaultRatio = $this->maniaControl->client->getCallVoteRatio();
$array["Command"] = VoteRatio::COMMAND_BAN; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_BAN, $defaultRatio);
$array["Param"] = ""; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_KICK, $defaultRatio);
$array["Ratio"] = (float)$defaultRatio; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_RESTART_MAP, $defaultRatio);
$ratioArray[] = $array; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_TEAM_BALANCE, $defaultRatio);
$array["Command"] = VoteRatio::COMMAND_KICK; $ratioArray[] = new VoteRatio(VoteRatio::COMMAND_NEXT_MAP, $defaultRatio);
$ratioArray[] = $array;
$array["Command"] = VoteRatio::COMMAND_RESTART_MAP;
$ratioArray[] = $array;
$array["Command"] = VoteRatio::COMMAND_TEAM_BALANCE;
$ratioArray[] = $array;
$array["Command"] = VoteRatio::COMMAND_NEXT_MAP;
$ratioArray[] = $array;
$this->maniaControl->client->setCallVoteRatiosEx(false, $ratioArray); $this->maniaControl->client->setCallVoteRatios($ratioArray, false);
$this->destroyVote(); $this->destroyVote();
$this->maniaControl->manialinkManager->hideManialink(self::MLID_ICON); $this->maniaControl->manialinkManager->hideManialink(self::MLID_ICON);