|
|
@ -51,6 +51,7 @@ pub enum SendCharacterPacket { |
|
|
|
LoginResponse(LoginResponse),
|
|
|
|
LoginWelcome(LoginWelcome),
|
|
|
|
SendKeyAndTeamSettings(SendKeyAndTeamSettings),
|
|
|
|
CharAck(CharAck),
|
|
|
|
}
|
|
|
|
|
|
|
|
impl SendServerPacket for SendCharacterPacket {
|
|
|
@ -59,6 +60,7 @@ impl SendServerPacket for SendCharacterPacket { |
|
|
|
SendCharacterPacket::LoginResponse(pkt) => pkt.as_bytes(),
|
|
|
|
SendCharacterPacket::LoginWelcome(pkt) => pkt.as_bytes(),
|
|
|
|
SendCharacterPacket::SendKeyAndTeamSettings(pkt) => pkt.as_bytes(),
|
|
|
|
SendCharacterPacket::CharAck(pkt) => pkt.as_bytes(),
|
|
|
|
//SendLoginPacket::RedirectClient(pkt) => pkt.as_bytes(),
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -106,8 +108,12 @@ impl<DA: DataAccess> CharacterServerState<DA> { |
|
|
|
vec![pkt]
|
|
|
|
}
|
|
|
|
|
|
|
|
fn char_select(&mut self) -> Vec<SendCharacterPacket> {
|
|
|
|
Vec::new()
|
|
|
|
fn char_select(&mut self, select: &CharSelect) -> Vec<SendCharacterPacket> {
|
|
|
|
vec![SendCharacterPacket::CharAck(CharAck {
|
|
|
|
flag: 0,
|
|
|
|
slot: select.slot,
|
|
|
|
code: 2,
|
|
|
|
})]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
@ -139,7 +145,7 @@ impl<DA: DataAccess> ServerState for CharacterServerState<DA> { |
|
|
|
Box::new(self.get_settings().into_iter())
|
|
|
|
},
|
|
|
|
RecvCharacterPacket::CharSelect(sel) => {
|
|
|
|
Box::new(self.char_select().into_iter())
|
|
|
|
Box::new(self.char_select(sel).into_iter())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|