I have case where user can be in more than one room at the same time,
so whenever USER_VARIABLES_UPDATE is fired in my listener I need to obtain the room that is relative to that event, problem is that if I use
Code: Select all
User player = (User) event.getParameter(SFSEventParam.USER);
curRoom = player.getLastJoinedRoom();
not gonna work because user can join room A and the join room B and fire event from room A,
so call to getLastJoinedRoom will return room B even though event was related to room A, so what would be the best approach to solve this ?
Kind Regards
Levan.