-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
157 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...c/main/kotlin/world/gregs/voidps/engine/client/instruction/handle/WorldMapClickHandler.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package world.gregs.voidps.engine.client.instruction.handle | ||
|
||
import world.gregs.voidps.engine.client.instruction.InstructionHandler | ||
import world.gregs.voidps.engine.client.variable.hasClock | ||
import world.gregs.voidps.engine.client.variable.start | ||
import world.gregs.voidps.engine.entity.character.player.Player | ||
import world.gregs.voidps.network.client.instruction.WorldMapClick | ||
|
||
class WorldMapClickHandler : InstructionHandler<WorldMapClick>() { | ||
|
||
override fun validate(player: Player, instruction: WorldMapClick) { | ||
if (player.hasClock("world_map_double_click") && player["previous_world_map_click", 0] == instruction.tile) { | ||
player["world_map_marker_custom"] = instruction.tile | ||
} | ||
player["previous_world_map_click"] = instruction.tile | ||
player.start("world_map_double_click", 1) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
network/src/main/kotlin/world/gregs/voidps/network/client/instruction/WorldMapClick.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package world.gregs.voidps.network.client.instruction | ||
|
||
import world.gregs.voidps.network.client.Instruction | ||
|
||
data class WorldMapClick(val tile: Int) : Instruction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
.../src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WorldMapClickDecoder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package world.gregs.voidps.network.login.protocol.decode | ||
|
||
import io.ktor.utils.io.core.* | ||
import world.gregs.voidps.network.client.instruction.WorldMapClick | ||
import world.gregs.voidps.network.login.protocol.Decoder | ||
|
||
class WorldMapClickDecoder : Decoder(4) { | ||
|
||
override suspend fun decode(packet: ByteReadPacket) = WorldMapClick(packet.readInt()) | ||
|
||
} |
14 changes: 0 additions & 14 deletions
14
.../src/main/kotlin/world/gregs/voidps/network/login/protocol/decode/WorldMapCloseDecoder.kt
This file was deleted.
Oops, something went wrong.