private void HandleActiveScene(Msg_LR_ActiveScene msg, PBChannel channel, int handle, uint seq) { int roomid = msg.RoomID; int sceneId = msg.SceneID; List <ulong> users = msg.UserGuids; int thread_id = GetIdleThread(); if (thread_id < 0) { LogSys.Log(LOG_TYPE.ERROR, "all room are using, active room failed!"); Msg_RL_ActiveSceneResult retMsg = new Msg_RL_ActiveSceneResult(); retMsg.UserGuids.AddRange(users); retMsg.RoomID = roomid; retMsg.Result = (int)SceneOperationResultEnum.Cant_Find_Room; return; } RoomThread roomThread = roomthread_list_[thread_id]; AddActiveRoom(roomid, thread_id, false); roomThread.PreActiveRoom(); LogSys.Log(LOG_TYPE.INFO, "queue active room {0} scene {1} thread {2}", roomid, sceneId, thread_id); roomThread.QueueAction(roomThread.ActiveRoom, roomid, sceneId, (MyAction <bool>)((bool val) => { Msg_RL_ActiveSceneResult retMsg = new Msg_RL_ActiveSceneResult(); retMsg.UserGuids.AddRange(users); retMsg.RoomID = roomid; retMsg.Result = val ? (int)SceneOperationResultEnum.Success : (int)SceneOperationResultEnum.Cant_Find_Room; })); }
private void HandleActiveSceneResult(Msg_RL_ActiveSceneResult msg, PBChannel channel, int src, uint session) { //响应RoomServer消息,激活副本结果消息 m_RoomProcessThread.OnActiveSceneResult(msg.UserGuids, msg.RoomId, msg.Result); }