I'm using AS3 client 1.6.1.
My lobby does some stuff with Room variables, so I've set the 'roomListVars' attribute to true on the zone config.
I noticed that the room vars weren't updating correctly when using getRoomList(), even though the debug XML looks fine. Looking through the code, it seems that if an old room exist, it overwrites the new one's variables:
SysHandler (v.1.3.0) line 176:
Code: Select all
// Handle Room Variables
if (roomXml.vars.toString().length > 0)
{
populateVariables(room.getVariables(), roomXml)
}
/*
* Merge with current room list data, to avoid destroying previous data
* @since 1.6.0
*/
var oldRoom:Room = roomList[roomId]
if (oldRoom != null)
{
room.setVariables( oldRoom.getVariables() )
room.setUserList( oldRoom.getUserList() )
}
roomList[roomId] = room
Code: Select all
room.setVariables( oldRoom.getVariables() )