diff --git a/game/src/main/kotlin/content/entity/Movement.kt b/game/src/main/kotlin/content/entity/Movement.kt index 47bf3ec429..de51cd158a 100644 --- a/game/src/main/kotlin/content/entity/Movement.kt +++ b/game/src/main/kotlin/content/entity/Movement.kt @@ -74,7 +74,7 @@ class Movement : Script { if (player.tile == target && player.mode != EmptyMode && player.mode != PauseMode) { player.mode = EmptyMode } - player.walkTo(target, forceWalk = player.equipped(EquipSlot.Weapon).id == "stone_bowl") + player.walkTo(target, forceWalk = walk || player.equipped(EquipSlot.Weapon).id == "stone_bowl") } } diff --git a/game/src/main/kotlin/content/quest/member/plague_city/PlagueCity.kt b/game/src/main/kotlin/content/quest/member/plague_city/PlagueCity.kt index c6aa7a6d51..766381e66f 100644 --- a/game/src/main/kotlin/content/quest/member/plague_city/PlagueCity.kt +++ b/game/src/main/kotlin/content/quest/member/plague_city/PlagueCity.kt @@ -26,18 +26,10 @@ class PlagueCity : Script { init { playerSpawn { - if (get("plaguecity_hide_edmond_up_top", false)) { - sendVariable("plaguecity_hide_edmond_up_top") - } - if (get("plaguecity_dug_mud_pile", false)) { - sendVariable("plaguecity_dug_mud_pile") - } - if (get("plaguecity_checked_grill", false)) { - sendVariable("plaguecity_checked_grill") - } - if (get("plaguecity_key_asked", false)) { - sendVariable("plaguecity_key_asked") - } + sendVariable("plaguecity_hide_edmond_up_top") + sendVariable("plaguecity_dug_mud_pile") + sendVariable("plaguecity_checked_grill") + sendVariable("plaguecity_key_asked") sendVariable("plaguecity_pipe") sendVariable("plaguecity_elena_at_home") sendVariable("plague_city") diff --git a/network/src/main/kotlin/world/gregs/voidps/network/client/instruction/Walk.kt b/network/src/main/kotlin/world/gregs/voidps/network/client/instruction/Walk.kt index 8554a74b05..633177a6c2 100644 --- a/network/src/main/kotlin/world/gregs/voidps/network/client/instruction/Walk.kt +++ b/network/src/main/kotlin/world/gregs/voidps/network/client/instruction/Walk.kt @@ -2,4 +2,4 @@ package world.gregs.voidps.network.client.instruction import world.gregs.voidps.network.client.Instruction -data class Walk(val x: Int, val y: Int, val minimap: Boolean = false) : Instruction +data class Walk(val x: Int, val y: Int, val walk: Boolean = false, val minimap: Boolean = false) : Instruction diff --git a/network/src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WalkMapDecoder.kt b/network/src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WalkMapDecoder.kt index 4e7f0f9649..73e8671fee 100644 --- a/network/src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WalkMapDecoder.kt +++ b/network/src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WalkMapDecoder.kt @@ -12,8 +12,8 @@ class WalkMapDecoder : Decoder(5) { override suspend fun decode(packet: Source): Instruction { val y = packet.readShortLittleEndian().toInt() - val running = packet.readBooleanAdd() + val forceWalk = packet.readBooleanAdd() val x = packet.readUnsignedShortAdd() - return Walk(x, y) + return Walk(x, y, forceWalk) } } diff --git a/network/src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WalkMiniMapDecoder.kt b/network/src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WalkMiniMapDecoder.kt index 61fbb9b084..b95c8f5915 100644 --- a/network/src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WalkMiniMapDecoder.kt +++ b/network/src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WalkMiniMapDecoder.kt @@ -12,7 +12,7 @@ class WalkMiniMapDecoder : Decoder(18) { override suspend fun decode(packet: Source): Instruction { val y = packet.readShortLittleEndian().toInt() - val running = packet.readBooleanAdd() + val forceWalk = packet.readBooleanAdd() val x = packet.readUnsignedShortAdd() packet.readByte() // -1 packet.readByte() // -1 @@ -24,6 +24,6 @@ class WalkMiniMapDecoder : Decoder(18) { packet.readShort() // X in region? packet.readShort() // Y in region? packet.readByte() // 63 - return Walk(x, y, minimap = true) + return Walk(x, y, forceWalk, minimap = true) } } diff --git a/network/src/test/kotlin/world/gregs/voidps/network/login/protocol/DecoderTest.kt b/network/src/test/kotlin/world/gregs/voidps/network/login/protocol/DecoderTest.kt index d04f9a37de..8886dd380e 100644 --- a/network/src/test/kotlin/world/gregs/voidps/network/login/protocol/DecoderTest.kt +++ b/network/src/test/kotlin/world/gregs/voidps/network/login/protocol/DecoderTest.kt @@ -106,8 +106,8 @@ class DecoderTest { EnterName("a string"), // 43 null, // 84 null, // 71 - Walk(1234, 4321), // 35 - Walk(1234, 4321, minimap = true), // 82 + Walk(1234, 4321, walk = true), // 35 + Walk(1234, 4321, walk = true, minimap = true), // 82 null, // 49 null, // 8 SongEnd(12345), // 52