using System; using System.Reflection; using System.Collections.Generic; using FilterAPI.Handlers; using FilterAPI.Networking; namespace FilterLogin.LocalHandlers { internal class LocalHandlerLoader : HandlerLoaderLocal { public LocalHandlerLoader() { foreach (var MsgHandler in FilterAssembly.FindHandlers()) { LocalPacketHandler PacketAttribute = MsgHandler.PacketAttribute; MethodInfo PacketMethod = MsgHandler.MethodInfo; if (!Handlers.ContainsKey((LocalNETCMD)PacketAttribute.OPCode)) { Handlers.Add((LocalNETCMD)PacketAttribute.OPCode, PacketMethod); } } } } }