From b63ee14fa8369f85ad9c1fd50f06c832af0cef5f Mon Sep 17 00:00:00 2001 From: xeon Date: Thu, 9 May 2024 19:02:17 +0300 Subject: [PATCH] Adjust player spawn pos, fix some proto names --- gameserver/src/net/handlers/scene.rs | 78 +++++++++++++++++----------- proto/out/_.rs | 8 +-- 2 files changed, 53 insertions(+), 33 deletions(-) diff --git a/gameserver/src/net/handlers/scene.rs b/gameserver/src/net/handlers/scene.rs index eda7242..c594f54 100644 --- a/gameserver/src/net/handlers/scene.rs +++ b/gameserver/src/net/handlers/scene.rs @@ -22,10 +22,6 @@ pub async fn on_enter_scene_cs_req(session: &PlayerSession, body: &EnterSceneCsR floor_id: entrance_config.floor_id, entry_id: entrance_config.id, game_mode_type: 1, // TODO: EntranceType -> enum repr(u32) - // TODO: thing above is probably not gm type - nnfgkelcban: 1, - lgflfajffjl: 1, - pjbjelcgkof: 1, ..Default::default() }), }; @@ -49,32 +45,56 @@ pub async fn on_get_cur_scene_info_cs_req( floor_id: 20101001, entry_id: 2010101, game_mode_type: 1, - nnfgkelcban: 1, - lgflfajffjl: 1, - pjbjelcgkof: 1, - scene_group_list: vec![SceneGroupInfo { - state: 1, - group_id: 19, - entity_list: vec![SceneEntityInfo { - group_id: 19, - inst_id: 300001, - entity_id: 228, - prop: Some(ScenePropInfo { - prop_id: 808, - prop_state: 1, - ..Default::default() - }), - motion: Some(MotionInfo { - pos: Some(Vector { - z: 4480, - y: 19364, - x: -570, + leader_entity_id: 1, + scene_group_list: vec![ + SceneGroupInfo { + state: 1, + group_id: 0, + entity_list: vec![SceneEntityInfo { + group_id: 0, + inst_id: 0, + entity_id: 1, + actor: Some(SceneActorInfo { + avatar_type: 3, + base_avatar_id: 1314, + map_layer: 2, + uid: session.player_uid(), }), - rot: Some(Vector::default()), - }), - ..Default::default() - }], - }], + motion: Some(MotionInfo { + pos: Some(Vector { + x: -550, + y: 19364, + z: 4480, + }), + rot: Some(Vector::default()), + }), + ..Default::default() + }], + }, + SceneGroupInfo { + state: 1, + group_id: 19, + entity_list: vec![SceneEntityInfo { + group_id: 19, + inst_id: 300001, + entity_id: 228, + prop: Some(ScenePropInfo { + prop_id: 808, + prop_state: 1, + ..Default::default() + }), + motion: Some(MotionInfo { + pos: Some(Vector { + x: -570, + y: 19364, + z: 4480, + }), + rot: Some(Vector::default()), + }), + ..Default::default() + }], + }, + ], ..Default::default() }), }, diff --git a/proto/out/_.rs b/proto/out/_.rs index c65b582..88e93fe 100644 --- a/proto/out/_.rs +++ b/proto/out/_.rs @@ -15996,7 +15996,7 @@ pub struct Mbdeomilmed { #[prost(uint32, repeated, tag = "12")] pub pgcmnafcahe: ::prost::alloc::vec::Vec, #[prost(uint32, tag = "11")] - pub pjbjelcgkof: u32, + pub game_mode_type: u32, #[prost(uint32, tag = "1")] pub ojljokcgaad: u32, } @@ -20097,11 +20097,11 @@ pub struct Icjemgcigbp { #[derive(Clone, PartialEq, ::prost::Message)] pub struct SceneInfo { #[prost(uint32, tag = "5")] - pub nnfgkelcban: u32, + pub leader_entity_id: u32, #[prost(uint32, tag = "15")] pub lgflfajffjl: u32, #[prost(uint32, tag = "13")] - pub pjbjelcgkof: u32, + pub game_mode_type: u32, #[prost(message, repeated, tag = "3")] pub ijmddokpdff: ::prost::alloc::vec::Vec, #[prost(message, optional, tag = "1472")] @@ -20111,7 +20111,7 @@ pub struct SceneInfo { #[prost(map = "string, int32", tag = "211")] pub dynamic_values: ::std::collections::HashMap<::prost::alloc::string::String, i32>, #[prost(uint32, tag = "1")] - pub game_mode_type: u32, + pub ipigefggbok: u32, #[prost(message, repeated, tag = "9")] pub padggdamiam: ::prost::alloc::vec::Vec, #[prost(message, repeated, tag = "11")]