private void HandleUserOffline(Msg_BL_UserOffline msg_, PBChannel channel, int src, uint session) { UserProcessScheduler dataProcess = UserServer.Instance.UserProcessScheduler; UserInfo user = dataProcess.GetUserInfo(msg_.Guid); if (user != null && user.CurrentState == UserState.Room) { user.CurrentState = UserState.Online; user.LeftLife = 0; } }
internal void UserOffline(ulong guid, int srcHandle) { UserInfo user = LobbyServer.Instance.UserProcessScheduler.GetUserInfo(guid); if (user != null) { if (null != user.Room) { Msg_LR_UserQuit msg = new Msg_LR_UserQuit(); msg.UserGuid = guid; msg.RoomId = user.Room.RoomId; LobbyServer.Instance.RoomSvrChannel.Send(user.Room.RoomServerName, msg); Msg_BL_UserOffline builder = new Msg_BL_UserOffline(); builder.Guid = guid; LobbyServer.Instance.UserChannel.Send(srcHandle, builder); LogSys.Log(LOG_TYPE.INFO, "UserOffline, guid:{0}", guid); } } }