Closed lkrle closed 1 year ago
The Exception also happens when a User disconnects.
I need to set back up a local dev environment so I can have a deeper look but looks like it is potentially an issue with this line.
dbClient.Execute("UPDATE user_roomvisits SET exit_timestamp = @exitTimestamp WHERE room_id = @roomId AND user_id = @userId ORDER BY exit_timestamp DESC LIMIT 1",
The whole Room session management workflow needs to be refactored. Currently there are too many places that handle the state of the player in the room. Also the player is not actively removed when switching to another room but rather just removed after a certain room cycle timeout.
Resolved for now.
When switching between rooms an Exception is raised at RoomUserManager.cs:line 282 When continuing you will enter the room without any problems.
Exception: System.NullReferenceException: Object reference not set to an instance of an object. at Plus.HabboHotel.Rooms.RoomUserManager.RemoveUserFromRoom(GameClient session, Boolean nofityUser, Boolean notifyKick)