/// <summary> /// 注册所有模块的网络消息到包管理器里 /// </summary> /// <param name="modules"></param> /// <param name="handlers"></param> public static void Register(ILogicModule[] modules, PacketHandlersBase handlers) { foreach (var m in modules) { if (m is TradeAge.Server.Interface.ServerLogic.ILogin) { IProtoclAutoCode pac = new ILoginAccess1(); list.Add(pac); pac.SetModule(m as TradeAge.Server.Interface.ServerLogic.ILogin); pac.PacketHandlerManager = handlers; pac.Init(); } } }
/// <summary> /// 注册所有模块的网络消息到包管理器里 /// </summary> /// <param name="modules"></param> /// <param name="handlers"></param> public static void Register(ILogicModule[] modules, PacketHandlersBase handlers) { foreach (var m in modules) { if (m is TradeAge.Server.Interface.ServerLogic.ILogin) { IProtoclAutoCode pac = new ILoginAccess1(); list.Add(pac); pac.SetModule(m as TradeAge.Server.Interface.ServerLogic.ILogin); pac.PacketHandlerManager = handlers; pac.Init(); } if (m is TradeAge.Server.Interface.ServerLogic.IScene) { IProtoclAutoCode pac = new ISceneAccess2(); list.Add(pac); pac.SetModule(m as TradeAge.Server.Interface.ServerLogic.IScene); pac.PacketHandlerManager = handlers; pac.Init(); } } }