@ -49,11 +49,12 @@ public class WorldListResponseCodec : VariableShortPacketCodec<WorldListResponse
val quickChat = ( flags and FLAG _QUICK _CHAT ) != 0
val quickChat = ( flags and FLAG _QUICK _CHAT ) != 0
val pvp = ( flags and FLAG _PVP ) != 0
val pvp = ( flags and FLAG _PVP ) != 0
val lootShare = ( flags and FLAG _LOOT _SHARE ) != 0
val lootShare = ( flags and FLAG _LOOT _SHARE ) != 0
val dedicatedActivity = ( flags and FLAG _DEDICATED _ACTIVITY ) != 0
val activity = input . readVersionedString ( )
val activity = input . readVersionedString ( )
val hostname = input . readVersionedString ( )
val hostname = input . readVersionedString ( )
worlds [ id ] = WorldListResponse . World ( country , members , quickChat , pvp , lootShare , activity , hostname )
worlds [ id ] = WorldListResponse . World ( country , members , quickChat , pvp , lootShare , dedicatedActivity , activity , hostname )
}
}
val checksum = input . readInt ( )
val checksum = input . readInt ( )
@ -111,6 +112,9 @@ public class WorldListResponseCodec : VariableShortPacketCodec<WorldListResponse
if ( world . lootShare ) {
if ( world . lootShare ) {
flags = flags or FLAG _LOOT _SHARE
flags = flags or FLAG _LOOT _SHARE
}
}
if ( world . dedicatedActivity ) {
flags = flags or FLAG _DEDICATED _ACTIVITY
}
output . writeInt ( flags )
output . writeInt ( flags )
output . writeVersionedString ( world . activity )
output . writeVersionedString ( world . activity )
@ -135,5 +139,6 @@ public class WorldListResponseCodec : VariableShortPacketCodec<WorldListResponse
private const val FLAG _QUICK _CHAT = 0x2
private const val FLAG _QUICK _CHAT = 0x2
private const val FLAG _PVP = 0x4
private const val FLAG _PVP = 0x4
private const val FLAG _LOOT _SHARE = 0x8
private const val FLAG _LOOT _SHARE = 0x8
private const val FLAG _DEDICATED _ACTIVITY = 0x10
}
}
}
}