Ejemplo n.º 1
0
 private void Create(IUserToken token, _DTO_string dto)
 {
     ExecutorPool.instance.Execute(
         () =>
     {
         PResult result = this._userBiz.Create(token, dto.value, out _);
         this.Reply(token, Module.USER, Command.QCMD_CREATE_USER, result);
     });
 }
Ejemplo n.º 2
0
        private void ChangeHero(IUserToken token, _DTO_string dto)
        {
            PResult result = this._roomBiz.GetUserRoom(token, out Room room);

            if (result != PResult.SUCCESS)
            {
                this.Reply(token, Module.ROOM, Command.QCMD_CHANGE_HERO, result);
                return;
            }
            User user = this._userBiz.GetUser(token);

            result = this._roomBiz.ChangeHero(room, user.id, dto.value);
            this.Reply(token, Module.ROOM, Command.QCMD_CHANGE_HERO, result);
        }
Ejemplo n.º 3
0
        public void ProcessMessage(IUserToken token, Packet packet)
        {
            if (!this.CheckAndReplyAccountOnline(token, packet))                 //账号还没有登录,忽略所有数据
            {
                return;
            }

            if (!this.CheckAndReplyUserOnline(token, packet))                 //账号还没有登录,忽略所有数据
            {
                return;
            }

            switch (packet.command)
            {
            case Command.QCMD_ROOM_LIST:
            {
                _DTO_request_room_list sdto  = (( _PACKET_HALL_QCMD_ROOM_LIST )packet).dto;
                _DTO_room_info[]       rooms = this.GetRoomDTOList(sdto.from, sdto.count);
                token.CALL_HALL_ACMD_ROOM_LIST(rooms);
            }
            break;

            case Command.QCMD_CREATE_ROOM:
            {
                _DTO_string sdto = (( _PACKET_HALL_QCMD_CREATE_ROOM )packet).dto;
                this.CreateRoom(token, sdto.value);
            }
            break;

            case Command.QCMD_JOIN_ROOM:
            {
                _DTO_int sdto = (( _PACKET_HALL_QCMD_JOIN_ROOM )packet).dto;
                this.JoinRoom(token, sdto.value);
            }
            break;
            }
        }
Ejemplo n.º 4
0
 protected override void InternalDeserialize(StreamBuffer buffer)
 {
     base.InternalDeserialize(buffer);
     this.dto = new _DTO_string();
     this.dto.Deserialize(buffer);
 }
Ejemplo n.º 5
0
 public _PACKET_TEST_CG_RPC(string value) : base(255, 0, true)
 {
     this.dto = new _DTO_string(value);
 }
Ejemplo n.º 6
0
 public _PACKET_TEST_CG_RPC(_DTO_string dto) : base(255, 0, true)
 {
     this.dto = dto;
 }
Ejemplo n.º 7
0
 public static _PACKET_TEST_GC_RPC _PACKET_TEST_GC_RPC(_DTO_string dto)
 {
     return(new _PACKET_TEST_GC_RPC(dto));
 }
Ejemplo n.º 8
0
		public _PACKET_TEST_GC_RPC( string value ) : base( 255, 1000, false )
		{
			this.dto = new _DTO_string( value );
		}
Ejemplo n.º 9
0
		public _PACKET_TEST_GC_RPC( _DTO_string dto ) : base( 255, 1000, false )
		{
			this.dto = dto;
		}