NetworkClient.UnregisterHandler made static

This commit is contained in:
vis2k 2019-03-24 20:26:23 +01:00
parent 9eac983872
commit bc6c2542f6

View File

@ -298,18 +298,18 @@ public static void RegisterHandler(MsgType msgType, NetworkMessageDelegate handl
}
[Obsolete("Use UnregisterHandler<T> instead")]
public void UnregisterHandler(int msgType)
public static void UnregisterHandler(int msgType)
{
handlers.Remove(msgType);
}
[Obsolete("Use UnregisterHandler<T> instead")]
public void UnregisterHandler(MsgType msgType)
public static void UnregisterHandler(MsgType msgType)
{
UnregisterHandler((int)msgType);
}
public void UnregisterHandler<T>() where T : IMessageBase
public static void UnregisterHandler<T>() where T : IMessageBase
{
// use int to minimize collisions
int msgType = MessagePacker.GetId<T>();