private static bool GetInvokerForHash(int cmdHash, NetworkBehaviour.UNetInvokeType invokeType, out Type invokeClass, out NetworkBehaviour.CmdDelegate invokeFunction) { NetworkBehaviour.Invoker invoker = null; bool result; if (!NetworkBehaviour.s_CmdHandlerDelegates.TryGetValue(cmdHash, out invoker)) { if (LogFilter.logDev) { Debug.Log("GetInvokerForHash hash:" + cmdHash + " not found"); } invokeClass = null; invokeFunction = null; result = false; } else if (invoker == null) { if (LogFilter.logDev) { Debug.Log("GetInvokerForHash hash:" + cmdHash + " invoker null"); } invokeClass = null; invokeFunction = null; result = false; } else if (invoker.invokeType != invokeType) { if (LogFilter.logError) { Debug.LogError("GetInvokerForHash hash:" + cmdHash + " mismatched invokeType"); } invokeClass = null; invokeFunction = null; result = false; } else { invokeClass = invoker.invokeClass; invokeFunction = invoker.invokeFunction; result = true; } return(result); }
private static bool GetInvokerForHash(int cmdHash, NetworkBehaviour.UNetInvokeType invokeType, out System.Type invokeClass, out NetworkBehaviour.CmdDelegate invokeFunction) { NetworkBehaviour.Invoker invoker = (NetworkBehaviour.Invoker)null; if (!NetworkBehaviour.s_CmdHandlerDelegates.TryGetValue(cmdHash, out invoker)) { if (LogFilter.logDev) { Debug.Log((object)("GetInvokerForHash hash:" + (object)cmdHash + " not found")); } invokeClass = (System.Type)null; invokeFunction = (NetworkBehaviour.CmdDelegate)null; return(false); } if (invoker == null) { if (LogFilter.logDev) { Debug.Log((object)("GetInvokerForHash hash:" + (object)cmdHash + " invoker null")); } invokeClass = (System.Type)null; invokeFunction = (NetworkBehaviour.CmdDelegate)null; return(false); } if (invoker.invokeType != invokeType) { if (LogFilter.logError) { Debug.LogError((object)("GetInvokerForHash hash:" + (object)cmdHash + " mismatched invokeType")); } invokeClass = (System.Type)null; invokeFunction = (NetworkBehaviour.CmdDelegate)null; return(false); } invokeClass = invoker.invokeClass; invokeFunction = invoker.invokeFunction; return(true); }