- add: handlers for character create/delete/select
This commit is contained in:
@@ -13,16 +13,20 @@ pub async fn route_packet(stream: &mut TcpStream, packet: Packet, auth_client: A
|
||||
debug!("Routing packet: {:?}", packet);
|
||||
match packet.packet_type {
|
||||
PacketType::PakcsAlive => Ok(()),
|
||||
// Generic Server Packets
|
||||
PacketType::PakcsAcceptReq => auth::handle_accept_req(stream, packet).await,
|
||||
PacketType::PakcsJoinServerTokenReq => auth::handle_join_server_req(stream, packet, auth_client, connection_service, connection_id).await,
|
||||
// Login Stuff
|
||||
// Login Packets
|
||||
PacketType::PakcsLoginTokenReq => auth::handle_login_req(stream, packet, auth_client, connection_service, connection_id, stream.peer_addr()?).await,
|
||||
PacketType::PakcsLogoutReq => auth::handle_logout_req(stream, packet, auth_client, connection_service, connection_id).await,
|
||||
PacketType::PakcsSrvSelectReq => auth::handle_server_select_req(stream, packet, connection_service, connection_id).await,
|
||||
PacketType::PakcsChannelListReq => auth::handle_channel_list_req(stream, packet).await,
|
||||
|
||||
// Character Stuff
|
||||
PacketType::PakcsCharListReq => character::handle_char_list_req(stream, packet).await,
|
||||
// Character Packets
|
||||
PacketType::PakcsCharListReq => character::handle_char_list_req(stream, packet, connection_service, connection_id).await,
|
||||
PacketType::PakcsCreateCharReq => character::handle_create_char_req(stream, packet, connection_service, connection_id).await,
|
||||
PacketType::PakcsDeleteCharReq => character::handle_delete_char_req(stream, packet, connection_service, connection_id).await,
|
||||
PacketType::PakcsSelectCharReq => character::handle_select_char_req(stream, packet, connection_service, connection_id).await,
|
||||
|
||||
// 1 => chat::handle_chat(packet).await?,
|
||||
// 2 => movement::handle_movement(packet).await?,
|
||||
|
||||
Reference in New Issue
Block a user