public static void HandlePacket(WorldConnection connection, WORLDMSG msgID, BinReader data) { try { DebugLogger.Logger.Log("LoginClient handling packet " + msgID.ToString()); bool handled_packet = false; ILoginServerPacketHandler handler = (ILoginServerPacketHandler)loginServerHandlers[msgID]; if (handler != null) { handled_packet = true; handler.HandlePacket(connection, msgID, data); } LoginServerPacketDelegate wspd = (LoginServerPacketDelegate)loginServerDelegates[(int)msgID]; if (wspd != null) { handled_packet = true; wspd(connection, msgID, data); } if (handled_packet == false) { DebugLogger.Logger.Log("WARNING: No valid handler found for " + msgID.ToString()); } } catch (Exception exp) { DebugLogger.Logger.Log("", exp); } }
public override string ToString() { return(base.ToString() + " WORLDMSG = " + m_worldMsgId.ToString()); }