mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 16:49:11 +00:00
18 lines
552 B
Kotlin
18 lines
552 B
Kotlin
import org.apollo.game.message.impl.PlayerActionMessage
|
|
import org.apollo.game.model.event.impl.LoginEvent
|
|
|
|
on { PlayerActionMessage::class }
|
|
.then {
|
|
val action = it.actionAt(option)
|
|
if (action != null) {
|
|
it.world.submit(PlayerActionEvent(it, it.world.playerRepository[index], action))
|
|
}
|
|
|
|
terminate()
|
|
}
|
|
|
|
on_player_event { LoginEvent::class }
|
|
.then {
|
|
it.enableAction(PlayerActionType.FOLLOW)
|
|
it.enableAction(PlayerActionType.TRADE)
|
|
} |