How spelunkern/shaiya-core works
Shaiya Core is a C++ patching framework for the Shaiya client and official game, database-agent, and login services. The principal workflow is a player using the patched Game.exe, with client hooks and UI features, while server hooks extend gameplay and exchange data with login/database services. Configuration controls runtime behavior; shared packet definitions describe cross-module data. The README documents the product boundaries and capabilities; sampled entry points show hook registration, but most feature implementations and inter-service routing were not inspected, so those links are omitted.
Main entry points: src/main.cpp Client hook entry · src/main.cpp Server hook entry · imgui_layer.cpp ImGui overlay · packet.cpp Client packets
Components 20
Client features
- Client hook entry
sdev-client/src/main.cpp - ImGui overlay
sdev-client/src/imgui_layer.cpp - Custom chat
sdev-client/src/custom_chat.cpp - Client packets
sdev-client/src/packet.cpp - Client QoL hooks
sdev-client/src/quick_slot.cpp - Discord RPC
external/discord-rpc/src/discord_rpc.cpp
Game service
- Server hook entry
sdev/src/main.cpp - Gameplay packets
sdev/src/packet_character.cpp - World processing
sdev/src/world_thread.cpp - User state
sdev/include/shaiya/CUser.h - Server configuration
sdev/include/shaiya/Configuration.cpp
Login and database
- Login hooks
sdev-login/src/main.cpp - GM login security
sdev-login/src/gm_security.cpp - Database hooks
sdev-db/src/main.cpp - Character persistence
sdev-db/src/character_list.cpp - Database pool
sdev-db/include/shaiya/SDatabasePool.h
Shared runtime
- Packet definitions
shaiya/include/network/game/incoming/0800.h - GMP arithmetic
mini-gmp/mini-gmp.c - ImGui runtime
external/imgui/imgui.cpp
Other components
- Player
Connections 15
- Player → Client hook entry: uses patched client
- Client hook entry → ImGui overlay: registers hooks
sdev-client/src/main.cpp - Client hook entry → Client packets: registers hooks
sdev-client/src/main.cpp - Client hook entry → Client QoL hooks: registers hooks
sdev-client/src/main.cpp - Client hook entry → Discord RPC: initializes RPC
sdev-client/src/main.cpp - ImGui overlay → ImGui runtime: renders with
- Server hook entry → Server configuration: loads settings
sdev/src/main.cpp - Server hook entry → User state: initializes state
sdev/src/main.cpp - Server hook entry → Gameplay packets: registers hooks
sdev/src/main.cpp - Server hook entry → World processing: registers hook
sdev/src/main.cpp - Login hooks → GM login security: checks login
sdev-login/src/main.cpp - Database hooks → Character persistence: registers hook
sdev-db/src/main.cpp - Database pool → Character persistence: provides connections
- Gameplay packets → Packet definitions: uses definitions
- Client packets → Packet definitions: uses definitions