add char level table structs to ships

This commit is contained in:
jake 2019-12-03 21:45:16 -08:00
parent 7c62ce7600
commit 4b2c7d299e
2 changed files with 8 additions and 1 deletions

View File

@ -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(),
}
}

View File

@ -12,6 +12,7 @@ use libpso::utf8_to_utf16_array;
use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY};
use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId};
use crate::common::leveltable::CharacterLevelTable;
use crate::entity::gateway::EntityGateway;
use crate::entity::account::{UserAccount, UserSettings, USERFLAG_NEWCHAR, USERFLAG_DRESSINGROOM};
@ -99,6 +100,7 @@ pub struct ShipServerState<EG: EntityGateway> {
entity_gateway: EG,
clients: HashMap<ClientId, ClientState>,
client_location: ClientLocation,
level_table: CharacterLevelTable,
}
impl<EG: EntityGateway> ShipServerState<EG> {
@ -107,6 +109,7 @@ impl<EG: EntityGateway> ShipServerState<EG> {
entity_gateway: entity_gateway,
clients: HashMap::new(),
client_location: ClientLocation::new(),
level_table: CharacterLevelTable::new(),
}
}