OpCode Changes
This commit is contained in:
+10
-10
@@ -137,11 +137,11 @@
|
||||
|
||||
### Runtime opcodes
|
||||
|
||||
- `WORLD_SPAWN_REQUEST` (`300`)
|
||||
- `WORLD_SPAWN` (`301`)
|
||||
- `WORLD_DESPAWN` (`302`)
|
||||
- `WORLD_INPUT` (`310`)
|
||||
- `WORLD_STATE` (`311`)
|
||||
- `WORLD_SPAWN_REQUEST` (`700`)
|
||||
- `WORLD_SPAWN` (`701`)
|
||||
- `WORLD_DESPAWN` (`702`)
|
||||
- `WORLD_INPUT` (`710`)
|
||||
- `WORLD_STATE` (`711`)
|
||||
|
||||
### Client world navigation requirements
|
||||
|
||||
@@ -159,12 +159,12 @@
|
||||
|
||||
### Implemented runtime packet contract
|
||||
|
||||
- `WORLD_SPAWN_REQUEST` (`300`) request:
|
||||
- `WORLD_SPAWN_REQUEST` (`700`) request:
|
||||
- `{ regionId?, zoneX?, zoneY?, chunkX?, chunkY? }`
|
||||
- all fields optional.
|
||||
- if not provided, server prefers persisted character world location.
|
||||
- if character has no saved world location, server defaults to first enabled region at `zone/chunk = 0,0`.
|
||||
- `WORLD_SPAWN` (`301`) response:
|
||||
- `WORLD_SPAWN` (`701`) response:
|
||||
- `success`
|
||||
- `player`: `{ id, name, x, y, regionId, zoneX, zoneY, chunkX, chunkY, isVip }`
|
||||
- `region`: `{ id, name, zonesX, zonesY, chunksPerZoneX, chunksPerZoneY, chunkWidthTiles, chunkHeightTiles }`
|
||||
@@ -172,9 +172,9 @@
|
||||
- `initialChunks[]`: subset of `chunkUpdates` entries where `type = "chunk_full"`:
|
||||
- `{ type: "chunk_full", chunk, tiles[], objects[], npcs[], mobs[] }`
|
||||
- `nearbyPlayers[]`: `{ id, name, x, y, facing, speed, isMoving }`
|
||||
- `WORLD_INPUT` (`310`) request (20hz max):
|
||||
- `WORLD_INPUT` (`710`) request (20hz max):
|
||||
- `{ seq, moveX, moveY, isRunning, facing }`
|
||||
- `WORLD_STATE` (`311`) response (10-20hz):
|
||||
- `WORLD_STATE` (`711`) response (10-20hz):
|
||||
- `tick`
|
||||
- `ackSeq`
|
||||
- `self`: `{ x, y, velocityX, velocityY }`
|
||||
@@ -187,7 +187,7 @@
|
||||
- world teleport: `{ type: "world_teleport", sourceObjectId, regionId, zoneX, zoneY, chunkX, chunkY, x, y }`
|
||||
- dungeon transfer request: `{ type: "dungeon_request", sourceObjectId, portalType, dungeonTemplateId?, randomTier?, levelBracketMin?, levelBracketMax? }`
|
||||
- `errors[]` optional: e.g. `["blocked_non_walkable"]`, `["blocked_paywall"]`.
|
||||
- `WORLD_DESPAWN` (`302`) response:
|
||||
- `WORLD_DESPAWN` (`702`) response:
|
||||
- `{ playerId, reason }`.
|
||||
|
||||
### Chunk update handling rules in client
|
||||
|
||||
Reference in New Issue
Block a user