NetworkBehaviour.GetCmdHashHandlerName simplified

This commit is contained in:
vis2k 2018-12-30 18:39:14 +01:00
parent ba6e34ab9b
commit c560cf4bf2

View File

@ -273,12 +273,12 @@ internal bool InvokeHandlerDelegate(int cmdHash, UNetInvokeType invokeType, Netw
internal static string GetCmdHashHandlerName(int cmdHash)
{
if (!s_CmdHandlerDelegates.ContainsKey(cmdHash))
Invoker invoker;
if (s_CmdHandlerDelegates.TryGetValue(cmdHash, out invoker))
{
return cmdHash.ToString();
return invoker.invokeType + ":" + invoker.invokeFunction.GetMethodName();
}
Invoker inv = s_CmdHandlerDelegates[cmdHash];
return inv.invokeType + ":" + inv.invokeFunction.GetMethodName();
return cmdHash.ToString();
}
// ----------------------------- Helpers --------------------------------