talán
This commit is contained in:
@@ -15,6 +15,14 @@ namespace KCM.Packets.Handlers
|
||||
{
|
||||
public class PacketHandler
|
||||
{
|
||||
[ThreadStatic]
|
||||
private static bool isHandlingPacket;
|
||||
|
||||
public static bool IsHandlingPacket
|
||||
{
|
||||
get { return isHandlingPacket; }
|
||||
}
|
||||
|
||||
public static Dictionary<ushort, PacketRef> Packets = new Dictionary<ushort, PacketRef>();
|
||||
public class PacketRef
|
||||
{
|
||||
@@ -183,6 +191,7 @@ namespace KCM.Packets.Handlers
|
||||
{
|
||||
try
|
||||
{
|
||||
isHandlingPacket = true;
|
||||
packet.HandlePacketClient();
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -205,6 +214,10 @@ namespace KCM.Packets.Handlers
|
||||
Main.helper.Log(ex.InnerException.StackTrace);
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
isHandlingPacket = false;
|
||||
}
|
||||
}
|
||||
|
||||
/* if (PacketHandlers.TryGetValue(id, out PacketHandlerDelegate handler))
|
||||
|
||||
Reference in New Issue
Block a user