use OpenStateConfig excel
This commit is contained in:
parent
dba609d124
commit
b9631c1442
5 changed files with 2890 additions and 12 deletions
2871
gameserver/assets/ExcelBinOutput/OpenStateConfigData.json
Normal file
2871
gameserver/assets/ExcelBinOutput/OpenStateConfigData.json
Normal file
File diff suppressed because it is too large
Load diff
|
@ -37,6 +37,15 @@ pub struct AvatarExcelConfig {
|
|||
pub lodpattern_name: String,
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Default)]
|
||||
#[serde(default)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct OpenStateConfig {
|
||||
pub id: u32,
|
||||
pub default_state: bool,
|
||||
pub allow_client_open: bool,
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PropGrowCurve {
|
||||
|
|
|
@ -20,6 +20,7 @@ lazy_static! {
|
|||
|
||||
pub struct ExcelCollection {
|
||||
pub avatar_configs: Vec<AvatarExcelConfig>,
|
||||
pub open_state_configs: Vec<OpenStateConfig>,
|
||||
}
|
||||
|
||||
pub struct GameConfigCollection {
|
||||
|
@ -33,11 +34,15 @@ impl ExcelCollection {
|
|||
"assets/ExcelBinOutput/AvatarExcelConfigData.json",
|
||||
))
|
||||
.unwrap(),
|
||||
open_state_configs: from_str(&load_asset(
|
||||
"assets/ExcelBinOutput/OpenStateConfigData.json",
|
||||
))
|
||||
.unwrap(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn table_count(&self) -> usize {
|
||||
1
|
||||
2
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
use proto::Vector;
|
||||
|
||||
pub static OPEN_STATES: [u32; 58] = [
|
||||
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 27, 28, 29, 30, 31, 32, 33, 37, 38, 45, 47,
|
||||
53, 54, 55, 59, 62, 65, 900, 901, 902, 903, 1001, 1002, 1003, 1004, 1005, 1007, 1008, 1009,
|
||||
1010, 1100, 1103, 1300, 1401, 1403, 1700, 2100, 2101, 2103, 2400, 3701, 3702, 4100,
|
||||
];
|
||||
|
||||
pub static INITIAL_POS: Vector = Vector {
|
||||
x: 2336.789,
|
||||
y: 249.98996,
|
||||
|
|
|
@ -5,8 +5,7 @@ use rand::RngCore;
|
|||
|
||||
use super::*;
|
||||
use crate::{
|
||||
game::{constants, entity::Entity, prop_types::*},
|
||||
util,
|
||||
data::EXCEL_COLLECTION, game::{constants, entity::Entity, prop_types::*}, util
|
||||
};
|
||||
|
||||
pub async fn on_get_player_token_req(
|
||||
|
@ -75,9 +74,9 @@ pub async fn on_player_login_req(session: &PlayerSession, _body: &PlayerLoginReq
|
|||
.send(
|
||||
OPEN_STATE_UPDATE_NOTIFY,
|
||||
OpenStateUpdateNotify {
|
||||
open_state_map: constants::OPEN_STATES
|
||||
.into_iter()
|
||||
.map(|id| (id, 1))
|
||||
open_state_map: EXCEL_COLLECTION.open_state_configs
|
||||
.iter()
|
||||
.map(|op| (op.id, 1))
|
||||
.collect(),
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue