|
|
@ -10,6 +10,7 @@ use libpso::crypto::bb::PSOBBCipher; |
|
|
|
|
|
|
|
use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY};
|
|
|
|
use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId};
|
|
|
|
use crate::common::leveltable::CharacterLevelTable;
|
|
|
|
use libpso::{utf8_to_array, utf8_to_utf16_array};
|
|
|
|
|
|
|
|
use crate::entity::gateway::EntityGateway;
|
|
|
@ -150,6 +151,7 @@ impl ClientState { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
struct Ship {
|
|
|
|
flags: u32,
|
|
|
|
name: String,
|
|
|
@ -174,6 +176,7 @@ pub struct CharacterServerState<EG: EntityGateway> { |
|
|
|
param_data: Vec<u8>,
|
|
|
|
clients: HashMap<ClientId, ClientState>,
|
|
|
|
ships: Vec<Ship>,
|
|
|
|
level_table: CharacterLevelTable,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl<EG: EntityGateway> CharacterServerState<EG> {
|
|
|
@ -190,6 +193,7 @@ impl<EG: EntityGateway> CharacterServerState<EG> { |
|
|
|
param_data: param_data,
|
|
|
|
clients: HashMap::new(),
|
|
|
|
ships: ships,
|
|
|
|
level_table: CharacterLevelTable::new(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
@ -218,7 +222,7 @@ impl<EG: EntityGateway> CharacterServerState<EG> { |
|
|
|
item: i as u32,
|
|
|
|
flags: 0,
|
|
|
|
name: utf8_to_utf16_array!(s.name, 0x11)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).collect()))
|
|
|
|
])
|
|
|
|
}
|
|
|
|