add char level table structs to ships
This commit is contained in:
parent
7c62ce7600
commit
4b2c7d299e
@ -10,6 +10,7 @@ use libpso::crypto::bb::PSOBBCipher;
|
|||||||
|
|
||||||
use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY};
|
use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY};
|
||||||
use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId};
|
use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId};
|
||||||
|
use crate::common::leveltable::CharacterLevelTable;
|
||||||
use libpso::{utf8_to_array, utf8_to_utf16_array};
|
use libpso::{utf8_to_array, utf8_to_utf16_array};
|
||||||
|
|
||||||
use crate::entity::gateway::EntityGateway;
|
use crate::entity::gateway::EntityGateway;
|
||||||
@ -150,6 +151,7 @@ impl ClientState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Ship {
|
struct Ship {
|
||||||
flags: u32,
|
flags: u32,
|
||||||
name: String,
|
name: String,
|
||||||
@ -174,6 +176,7 @@ pub struct CharacterServerState<EG: EntityGateway> {
|
|||||||
param_data: Vec<u8>,
|
param_data: Vec<u8>,
|
||||||
clients: HashMap<ClientId, ClientState>,
|
clients: HashMap<ClientId, ClientState>,
|
||||||
ships: Vec<Ship>,
|
ships: Vec<Ship>,
|
||||||
|
level_table: CharacterLevelTable,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<EG: EntityGateway> CharacterServerState<EG> {
|
impl<EG: EntityGateway> CharacterServerState<EG> {
|
||||||
@ -190,6 +193,7 @@ impl<EG: EntityGateway> CharacterServerState<EG> {
|
|||||||
param_data: param_data,
|
param_data: param_data,
|
||||||
clients: HashMap::new(),
|
clients: HashMap::new(),
|
||||||
ships: ships,
|
ships: ships,
|
||||||
|
level_table: CharacterLevelTable::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,7 +222,7 @@ impl<EG: EntityGateway> CharacterServerState<EG> {
|
|||||||
item: i as u32,
|
item: i as u32,
|
||||||
flags: 0,
|
flags: 0,
|
||||||
name: utf8_to_utf16_array!(s.name, 0x11)
|
name: utf8_to_utf16_array!(s.name, 0x11)
|
||||||
}
|
}
|
||||||
}).collect()))
|
}).collect()))
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ use libpso::utf8_to_utf16_array;
|
|||||||
|
|
||||||
use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY};
|
use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY};
|
||||||
use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId};
|
use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId};
|
||||||
|
use crate::common::leveltable::CharacterLevelTable;
|
||||||
|
|
||||||
use crate::entity::gateway::EntityGateway;
|
use crate::entity::gateway::EntityGateway;
|
||||||
use crate::entity::account::{UserAccount, UserSettings, USERFLAG_NEWCHAR, USERFLAG_DRESSINGROOM};
|
use crate::entity::account::{UserAccount, UserSettings, USERFLAG_NEWCHAR, USERFLAG_DRESSINGROOM};
|
||||||
@ -99,6 +100,7 @@ pub struct ShipServerState<EG: EntityGateway> {
|
|||||||
entity_gateway: EG,
|
entity_gateway: EG,
|
||||||
clients: HashMap<ClientId, ClientState>,
|
clients: HashMap<ClientId, ClientState>,
|
||||||
client_location: ClientLocation,
|
client_location: ClientLocation,
|
||||||
|
level_table: CharacterLevelTable,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<EG: EntityGateway> ShipServerState<EG> {
|
impl<EG: EntityGateway> ShipServerState<EG> {
|
||||||
@ -107,6 +109,7 @@ impl<EG: EntityGateway> ShipServerState<EG> {
|
|||||||
entity_gateway: entity_gateway,
|
entity_gateway: entity_gateway,
|
||||||
clients: HashMap::new(),
|
clients: HashMap::new(),
|
||||||
client_location: ClientLocation::new(),
|
client_location: ClientLocation::new(),
|
||||||
|
level_table: CharacterLevelTable::new(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user