コード例 #1
0
        public override void OnGameData(HotSpringRoom room, GamePlayer player, GSPacketIn packet)
        {
            HotSpringCmdType type = (HotSpringCmdType)packet.ReadByte();

            try
            {
                IHotSpringCommandHandler handleCommand = _commandMgr.LoadCommandHandler((int)type);
                if (handleCommand != null)
                {
                    handleCommand.HandleCommand(this, player, packet);
                }
                else
                {
                    log.Error(string.Format("IP: {0}", player.Client.TcpEndpoint));
                }
            }
            catch (Exception e)
            {
                log.Error(string.Format("IP:{1}, OnGameData is Error: {0}", e.ToString(), player.Client.TcpEndpoint));
            }
        }
コード例 #2
0
 protected void RegisterCommandHandler(int code, IHotSpringCommandHandler handle)
 {
     handles.Add(code, handle);
 }
コード例 #3
0
 protected void RegisterCommandHandler(int code, IHotSpringCommandHandler handle)
 {
     handles.Add(code, handle);
 }