From 4f5709acfa3ec9579f380b2f0c132c1db8ac4300 Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 28 Sep 2023 08:18:49 +0100 Subject: [PATCH] Add support for dedicated activity flag Polar posting about these recently in Discord jogged my memory that I'd missed this flag off, previously I called this FLAG_HIGHLIGHT. I've also added the official Jagex names to the documentation, thanks to Polar. I don't think 550 supports any of the flags after DEDICATEDACTIVITY. Signed-off-by: Graham --- conf/src/main/kotlin/org/openrs2/conf/Config.kt | 3 ++- .../org/openrs2/game/cluster/SingleWorldCluster.kt | 1 + .../protocol/world/downstream/WorldListResponse.kt | 1 + .../world/downstream/WorldListResponseCodec.kt | 7 ++++++- share/doc/protocol/world-list.md | 13 +++++++------ 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/conf/src/main/kotlin/org/openrs2/conf/Config.kt b/conf/src/main/kotlin/org/openrs2/conf/Config.kt index 2fec3b639b..ea4f1c487f 100644 --- a/conf/src/main/kotlin/org/openrs2/conf/Config.kt +++ b/conf/src/main/kotlin/org/openrs2/conf/Config.kt @@ -11,7 +11,8 @@ public data class Config( val members: Boolean, val quickChat: Boolean, val pvp: Boolean, - val lootShare: Boolean + val lootShare: Boolean, + val dedicatedActivity: Boolean ) { val internalGame: String = game.toInternalName() val internalOperator: String = operator.toInternalName() diff --git a/game/src/main/kotlin/org/openrs2/game/cluster/SingleWorldCluster.kt b/game/src/main/kotlin/org/openrs2/game/cluster/SingleWorldCluster.kt index e08360a7ca..e091bb3120 100644 --- a/game/src/main/kotlin/org/openrs2/game/cluster/SingleWorldCluster.kt +++ b/game/src/main/kotlin/org/openrs2/game/cluster/SingleWorldCluster.kt @@ -18,6 +18,7 @@ public class SingleWorldCluster @Inject constructor( config.quickChat, config.pvp, config.lootShare, + config.dedicatedActivity, config.activity, config.hostname ) diff --git a/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponse.kt b/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponse.kt index abc9ceaf05..31db4f5ae1 100644 --- a/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponse.kt +++ b/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponse.kt @@ -22,6 +22,7 @@ public data class WorldListResponse( public val quickChat: Boolean, public val pvp: Boolean, public val lootShare: Boolean, + public val dedicatedActivity: Boolean, public val activity: String, public val hostname: String ) diff --git a/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponseCodec.kt b/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponseCodec.kt index c5ecc3a0cc..0907226007 100644 --- a/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponseCodec.kt +++ b/protocol/src/main/kotlin/org/openrs2/protocol/world/downstream/WorldListResponseCodec.kt @@ -49,11 +49,12 @@ public class WorldListResponseCodec : VariableShortPacketCodec