Updated chat handler to use the MessageType enum values instead of numbers
Added local_id tracking for the packet service Added mob spawning packet in response to game logic events (only for a NearbyUpdate event right now)
This commit is contained in:
@@ -13,8 +13,9 @@ pub struct ConnectionState {
|
||||
pub character_id: Option<i8>,
|
||||
pub character_name: Option<String>,
|
||||
pub character_list: Option<Vec<u32>>,
|
||||
pub additional_data: HashMap<String, String>, // Flexible data storage
|
||||
pub additional_data: HashMap<String, String>,
|
||||
pub client_id: u16,
|
||||
pub local_id: u16, // Local connection ID for packet routing
|
||||
pub chat_handler: Option<Arc<ChatClientHandler>>,
|
||||
pub writer: Option<Arc<tokio::sync::Mutex<WriteHalf<TcpStream>>>>,
|
||||
}
|
||||
@@ -29,6 +30,7 @@ impl ConnectionState {
|
||||
character_list: None,
|
||||
additional_data: HashMap::new(),
|
||||
client_id: 0,
|
||||
local_id: 0,
|
||||
chat_handler: None,
|
||||
writer: None,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user