2025-03-17 16:58:48 -04:00
|
|
|
//! A server replacement for a certain MMO.
|
|
|
|
|
2025-03-23 18:14:14 -04:00
|
|
|
#![allow(clippy::large_enum_variant)]
|
|
|
|
|
2025-03-23 08:21:43 -04:00
|
|
|
use std::collections::HashMap;
|
|
|
|
|
|
|
|
use patch::Version;
|
2024-05-11 13:50:05 -04:00
|
|
|
|
2025-03-16 15:42:46 -04:00
|
|
|
/// The blowfish implementation used for packet encryption.
|
2025-03-11 18:39:30 -04:00
|
|
|
pub mod blowfish;
|
2025-03-16 15:42:46 -04:00
|
|
|
|
|
|
|
/// Common functions, structures used between all servers.
|
2025-03-16 15:39:44 -04:00
|
|
|
pub mod common;
|
2025-03-16 15:42:46 -04:00
|
|
|
|
|
|
|
/// Config management.
|
2024-05-11 13:50:05 -04:00
|
|
|
pub mod config;
|
2025-03-17 16:44:17 -04:00
|
|
|
|
2025-03-16 15:42:46 -04:00
|
|
|
/// Lobby server-specific code.
|
|
|
|
pub mod lobby;
|
|
|
|
|
|
|
|
/// World server-specific code.
|
2025-03-12 17:47:58 -04:00
|
|
|
pub mod world;
|
2024-05-11 13:50:05 -04:00
|
|
|
|
2025-03-16 17:43:29 -04:00
|
|
|
/// Everything packet parsing related.
|
|
|
|
pub mod packet;
|
|
|
|
|
2025-03-22 16:15:29 -04:00
|
|
|
/// Logic server-specific code.
|
|
|
|
pub mod login;
|
|
|
|
|
2025-03-23 08:21:43 -04:00
|
|
|
/// Patch server-specific code.
|
|
|
|
pub mod patch;
|
|
|
|
|
2025-03-26 17:58:15 -04:00
|
|
|
/// Opcodes, see `resources/opcodes.json`
|
|
|
|
pub mod opcodes;
|
|
|
|
|
2025-05-02 00:47:11 -04:00
|
|
|
/// IPC
|
|
|
|
pub mod ipc;
|
|
|
|
|
2025-05-02 16:15:54 -04:00
|
|
|
/// Inventory and storage management.
|
|
|
|
pub mod inventory;
|
|
|
|
|
2025-03-23 08:33:07 -04:00
|
|
|
/// Used in the encryption key.
|
|
|
|
const GAME_VERSION: u16 = 7000;
|
|
|
|
|
2025-03-30 21:42:46 -04:00
|
|
|
pub const RECEIVE_BUFFER_SIZE: usize = 32000;
|
|
|
|
|
2025-03-23 08:21:43 -04:00
|
|
|
/// Supported boot version.
|
2025-06-07 10:37:10 -04:00
|
|
|
pub const SUPPORTED_BOOT_VERSION: Version = Version("2025.05.01.0000.0001");
|
2025-03-23 08:21:43 -04:00
|
|
|
|
|
|
|
/// Supported game version.
|
2025-06-17 16:24:19 -04:00
|
|
|
pub const SUPPORTED_GAME_VERSION: Version = Version("2025.06.10.0000.0000");
|
2025-03-23 08:21:43 -04:00
|
|
|
|
|
|
|
const SUPPORTED_EXPAC_VERSIONS: [(&str, Version); 5] = [
|
2025-06-07 10:37:10 -04:00
|
|
|
("ex1", Version("2025.05.01.0000.0000")),
|
|
|
|
("ex2", Version("2025.05.09.0000.0000")),
|
2025-06-17 16:24:19 -04:00
|
|
|
("ex3", Version("2025.06.10.0000.0000")),
|
|
|
|
("ex4", Version("2025.06.10.0000.0000")),
|
|
|
|
("ex5", Version("2025.06.10.0000.0000")),
|
2025-03-23 08:21:43 -04:00
|
|
|
];
|
|
|
|
|
|
|
|
/// Supported expansion versions.
|
|
|
|
pub fn get_supported_expac_versions() -> HashMap<&'static str, Version<'static>> {
|
|
|
|
HashMap::from(SUPPORTED_EXPAC_VERSIONS)
|
|
|
|
}
|
2025-04-30 22:37:57 -04:00
|
|
|
|
|
|
|
/// Constant to enable packet obsfucation. Changes every patch.
|
|
|
|
pub const OBFUSCATION_ENABLED_MODE: u8 = 41;
|