mirror of
https://github.com/Wesley-DeMontigny/WLUS.git
synced 2026-02-09 03:28:37 -06:00
I didn't like what I was working with in the Old WLUS, so I'm working on a rewrite. This is the initial upload of the rewrite.
97 lines
3.0 KiB
Python
97 lines
3.0 KiB
Python
"""
|
|
Contains all enums related to packets.
|
|
"""
|
|
from enum import Enum, IntEnum
|
|
|
|
|
|
class PacketHeader(Enum):
|
|
"""
|
|
Contains the headers for packets.
|
|
"""
|
|
HANDSHAKE = b'S\x00\x00\x00\x00\x00\x00\x00'
|
|
DISCONNECT_NOTIFY = b"S\x00\x00\x01\x00\x00\x00\x00"
|
|
CLIENT_LOGIN_INFO = b'S\x01\x00\x00\x00\x00\x00\x00'
|
|
LOGIN_RESPONSE = b'S\x05\x00\x00\x00\x00\x00\x00'
|
|
CLIENT_USER_SESSION_INFO = b"S\x04\x00\x01\x00\x00\x00\x00"
|
|
CLIENT_MINIFIGURE_LIST_REQUEST = b"S\x04\x00\x02\x00\x00\x00\x00"
|
|
MINIFIGURE_LIST = b"S\x05\x00\x06\x00\x00\x00\x00"
|
|
CLIENT_MINIFIGURE_CREATE_REQUEST = b"S\x04\x00\x03\x00\x00\x00\x00"
|
|
MINIFIGURE_CREATION_RESPONSE = b"S\x05\x00\x08\x00\x00\x00\x00"
|
|
CLIENT_DELETE_MINIFIGURE_REQUEST = b'S\x04\x00\x06\x00\x00\x00\x00'
|
|
WORLD_INFO = b'S\x05\x00\x02\x00\x00\x00\x00'
|
|
CLINET_ENTER_WORLD = b'S\x04\x00\x04\x00\x00\x00\x00'
|
|
CLIENT_LOAD_COMPLETE = b'S\x04\x00\x13\x00\x00\x00\x00'
|
|
DETAILED_USER_INFO = b'S\x05\x00\x04\x00\x00\x00\x00'
|
|
ROUTED_PACKET = b'S\x04\x00\x15\x00\x00\x00\x00'
|
|
CLIENT_GAME_MESSAGE = b'S\x04\x00\x05\x00\x00\x00\x00'
|
|
SERVER_GAME_MESSAGE = b'S\x05\x00\x0c\x00\x00\x00\x00'
|
|
CLIENT_POSITION_UPDATES = b'S\x04\x00\x16\x00\x00\x00\x00'
|
|
CLIENT_CHAT_MESSAGE = b'S\x04\x00\x0e\x00\x00\x00\x00'
|
|
CLIENT_WHITELIST_REQUEST = b'S\x04\x00\x19\x00\x00\x00\x00'
|
|
CHAT_MODERATION_RESPONSE = b'S\x05\x00\x3b\x00\x00\x00\x00'
|
|
|
|
|
|
class DisconnectionNotify(IntEnum):
|
|
"""
|
|
Contains various reasons for disconnect notify.
|
|
"""
|
|
UNKNOWN_ERROR = 0x00
|
|
DUPLICATE_LOGIN = 0x04
|
|
SERVER_SHUTDOWN = 0x05
|
|
SERVER_CANNOT_LOAD_MAP = 0x06
|
|
INVALID_SESSION_KEY = 0x07
|
|
CHARACTER_NOT_FOUND = 0x09
|
|
CHARACTER_CORRUPTION = 0x0a
|
|
KICKED = 0x0b
|
|
|
|
|
|
class LoginReturnCode(IntEnum):
|
|
SUCCESS = 0x01
|
|
BANNED = 0x02
|
|
INVALID_PERM = 0x03
|
|
INVALID_LOGIN_INFO = 0x06
|
|
ACCOUNT_LOCKED = 0x07
|
|
|
|
|
|
class ObjectFlag(IntEnum):
|
|
OBJECT_BIT_PERSISTENT = 32
|
|
OBJECT_BIT_CLIENT = 46
|
|
OBJECT_BIT_SPAWNED = 58
|
|
OBJECT_BIT_CHARACTER = 60
|
|
|
|
|
|
class CreationLOT(IntEnum):
|
|
SHIRT_BRIGHT_RED = 4049
|
|
SHIRT_BRIGHT_BLUE = 4083
|
|
SHIRT_BRIGHT_YELLOW = 4117
|
|
SHIRT_DARK_GREEN = 4151
|
|
SHIRT_BRIGHT_ORANGE = 4185
|
|
SHIRT_BLACK = 4219
|
|
SHIRT_DARK_STONE_GRAY = 4253
|
|
SHIRT_MEDIUM_STONE_GRAY = 4287
|
|
SHIRT_REDDISH_BROWN = 4321
|
|
SHIRT_WHITE = 4355
|
|
SHIRT_MEDIUM_BLUE = 4389
|
|
SHIRT_DARK_RED = 4423
|
|
SHIRT_EARTH_BLUE = 4457
|
|
SHIRT_EARTH_GREEN = 4491
|
|
SHIRT_BRICK_YELLOW = 4525
|
|
SHIRT_SAND_BLUE = 4559
|
|
SHIRT_SAND_GREEN = 4593
|
|
|
|
PANTS_BRIGHT_RED = 2508
|
|
PANTS_BRIGHT_ORANGE = 2509
|
|
PANTS_BRICK_YELLOW = 2511
|
|
PANTS_MEDIUM_BLUE = 2513
|
|
PANTS_SAND_GREEN = 2514
|
|
PANTS_DARK_GREEN = 2515
|
|
PANTS_EARTH_GREEN = 2516
|
|
PANTS_EARTH_BLUE = 2517
|
|
PANTS_BRIGHT_BLUE = 2519
|
|
PANTS_SAND_BLUE = 2520
|
|
PANTS_DARK_STONE_GRAY = 2521
|
|
PANTS_MEDIUM_STONE_GRAY = 2522
|
|
PANTS_WHITE = 2523
|
|
PANTS_BLACK = 2524
|
|
PANTS_REDDISH_BROWN = 2526
|
|
PANTS_DARK_RED = 2527 |