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 { interface Callbacks {
const ScriptCallback = 'Callbacks.ScriptCallback'; const ScriptCallback = 'Callbacks.ScriptCallback';
/** BeginMatch Callback, param1 MapNumber */ /** BeginMatch Callback, param1 MapNumber */
const LibXmlRpc_BeginMatch = "Callbacks.LibXmlRpc_BeginMatch"; const BeginMatch = "Callbacks.BeginMatch";
/** BeginMatch Callback, param1 MapNumber */ /** LoadingMap Callback, param1 MapNumber */
const LibXmlRpc_LoadingMap = "Callbacks.LibXmlRpc_LoadingMap"; const LoadingMap = "Callbacks.LoadingMap";
/** BeginMatch Callback, param1 MapNumber */ /** BeginMap Callback, param1 MapNumber */
const LibXmlRpc_BeginMap = "Callbacks.LibXmlRpc_BeginMap"; const BeginMap = "Callbacks.BeginMap";
} }

View File

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