better draft

This commit is contained in:
kremsy 2014-04-24 17:54:13 +02:00 committed by Steffen Schröder
parent ff054839ea
commit 8f1b5ae791
2 changed files with 9 additions and 8 deletions

View File

@ -11,9 +11,9 @@ namespace ManiaControl\Callbacks;
interface Callbacks {
const ScriptCallback = 'Callbacks.ScriptCallback';
/** BeginMatch Callback, param1 MapNumber */
const LibXmlRpc_BeginMatch = "Callbacks.LibXmlRpc_BeginMatch";
/** BeginMatch Callback, param1 MapNumber */
const LibXmlRpc_LoadingMap = "Callbacks.LibXmlRpc_LoadingMap";
/** BeginMatch Callback, param1 MapNumber */
const LibXmlRpc_BeginMap = "Callbacks.LibXmlRpc_BeginMap";
const BeginMatch = "Callbacks.BeginMatch";
/** LoadingMap Callback, param1 MapNumber */
const LoadingMap = "Callbacks.LoadingMap";
/** BeginMap Callback, param1 MapNumber */
const BeginMap = "Callbacks.BeginMap";
}

View File

@ -30,13 +30,14 @@ class LibXmlRpcCallbackManager implements CallbackListener{
public function handleScriptCallbacks($name, $data){
switch($name){
case 'LibXmlRpc_BeginMatch':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::LibXmlRpc_BeginMatch, $data[0]);
$this->maniaControl->callbackManager->triggerCallback(Callbacks::BeginMatch, $data[0]);
break;
case 'LibXmlRpc_LoadingMap':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::LibXmlRpc_LoadingMap, $data[0]);
$this->maniaControl->callbackManager->triggerCallback(Callbacks::LoadingMap, $data[0]);
break;
case 'LibXmlRpc_BeginMap':
$this->maniaControl->callbackManager->triggerCallback(Callbacks::LibXmlRpc_BeginMap, $data[0]);
//$this->maniaControl->callbackManager->triggerCallback(Callbacks::BeginMap, $data[0]);
$this->maniaControl->mapManager->handleScriptBeginMap($data[0]);
break;