Inheritance: global::ProtoBuf.IExtensible
示例#1
0
 internal void EnterScene(int sceneId, int roomId)
 {
     try {
         NodeMessage msg = new NodeMessage(LobbyMessageDefine.EnterScene);
         msg.SetHeaderWithGuid(m_Guid);
         GameFrameworkMessage.EnterScene protoData = new GameFrameworkMessage.EnterScene();
         protoData.m_SceneId = sceneId;
         protoData.m_RoomId  = roomId;
         msg.m_ProtoData     = protoData;
         SendMessage(msg);
     } catch (Exception ex) {
         LogSystem.Error("Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
 internal void EnterScene(int sceneId, int roomId)
 {
     try {
         NodeMessage msg = new NodeMessage(LobbyMessageDefine.EnterScene);
         msg.SetHeaderWithGuid(m_Guid);
         GameFrameworkMessage.EnterScene protoData = new GameFrameworkMessage.EnterScene();
         protoData.m_SceneId = sceneId;
         protoData.m_RoomId = roomId;
         msg.m_ProtoData = protoData;
         SendMessage(msg);
     } catch (Exception ex) {
         LogSystem.Error("Exception:{0}\n{1}", ex.Message, ex.StackTrace);
     }
 }
示例#3
0
        private void HandleEnterScene(NodeMessage msg, int handle, uint seq)
        {
            GameFrameworkMessage.NodeMessageWithGuid headerMsg = msg.m_NodeHeader as GameFrameworkMessage.NodeMessageWithGuid;
            if (null != headerMsg)
            {
                GameFrameworkMessage.EnterScene protoMsg = msg.m_ProtoData as GameFrameworkMessage.EnterScene;
                if (null != protoMsg)
                {
                    ulong guid       = headerMsg.m_Guid;
                    int   sceneId    = protoMsg.m_SceneId;
                    int   wantRoomId = protoMsg.m_RoomId;

                    UserProcessScheduler dataProcess = UserServer.Instance.UserProcessScheduler;
                    UserInfo             user        = dataProcess.GetUserInfo(guid);
                    if (user != null)
                    {
                        Msg_LB_RequestEnterScene    builder         = new Msg_LB_RequestEnterScene();
                        Msg_LB_BigworldUserBaseInfo baseInfoBuilder = new Msg_LB_BigworldUserBaseInfo();

                        baseInfoBuilder.AccountId       = user.AccountId;
                        baseInfoBuilder.NodeName        = user.NodeName;
                        baseInfoBuilder.WorldId         = UserServerConfig.WorldId;
                        baseInfoBuilder.ClientInfo      = user.ClientInfo;
                        baseInfoBuilder.StartServerTime = UserServerConfig.StartServerTime;
                        baseInfoBuilder.SceneId         = user.SceneId;

                        builder.BaseInfo    = baseInfoBuilder;
                        builder.User        = UserThread.BuildRoomUserInfo(user, 0, 0);
                        builder.SceneId     = sceneId;
                        builder.WantRoomId  = wantRoomId;
                        builder.FromSceneId = user.SceneId;
                        UserServer.Instance.BigworldChannel.Send(builder);
                    }
                }
            }
        }