From 574aaa5469be475aa91800331938b7ab7f775054 Mon Sep 17 00:00:00 2001 From: xeon Date: Sun, 1 Sep 2024 21:34:51 +0300 Subject: [PATCH] Implement movement handling and last player position saving --- gameserver/src/entity/entity.rs | 51 +- gameserver/src/entity/mod.rs | 2 +- gameserver/src/handler/fight_handler.rs | 61 ++ gameserver/src/handler/mod.rs | 3 + gameserver/src/handler/player_handler.rs | 35 +- gameserver/src/handler/scene_handler.rs | 61 +- gameserver/src/player/avatar/avatar.rs | 29 +- gameserver/src/player/player.rs | 4 +- gameserver/src/scene/grid.rs | 8 +- gameserver/src/scene/grid_mgr.rs | 115 +++- gameserver/src/scene/mod.rs | 1 + gameserver/src/scene/scene.rs | 53 ++ gameserver/src/scene/scene_sight_comp.rs | 83 ++- gameserver/src/scene/visitor.rs | 62 ++ hk4e_data/src/math_def.rs | 8 + hk4e_proto/out/cmd.rs | 792 ++++++++++++----------- 16 files changed, 979 insertions(+), 389 deletions(-) create mode 100644 gameserver/src/handler/fight_handler.rs create mode 100644 gameserver/src/scene/visitor.rs diff --git a/gameserver/src/entity/entity.rs b/gameserver/src/entity/entity.rs index 03c43e6..1909531 100644 --- a/gameserver/src/entity/entity.rs +++ b/gameserver/src/entity/entity.rs @@ -1,10 +1,22 @@ use std::{fmt::Display, rc::Rc}; -use data::math_def::Vector3; -use proto::{ProtEntityType, SceneEntityInfo}; +use data::math_def::{Coordinate, Vector3}; +use proto::{MotionState, ProtEntityType, Retcode, SceneEntityInfo}; use crate::player::Player; +#[allow(dead_code)] +pub struct MotionContext { + pub scene_time_ms: u64, + pub reliable_seq: u32, + pub is_reliable: bool, + pub exclude_uid: u32, + pub is_notify: bool, + pub interval_velocity: u32, + pub sync_uid_vec: Vec, + pub is_do_move: bool, +} + pub trait Entity { fn get_entity_type(&self) -> ProtEntityType; fn get_group_id(&self) -> u32; @@ -14,6 +26,10 @@ pub trait Entity { fn rotation(&self) -> &Vector3; fn set_position(&mut self, pos: Vector3); fn set_rotation(&mut self, rot: Vector3); + fn set_coordinate(&mut self, _coordinate: Coordinate) {} + fn get_coordinate(&self) -> Coordinate { + Coordinate::default() + } fn get_owner_player(&self) -> Option>; fn is_on_scene(&self) -> bool { @@ -43,6 +59,37 @@ pub trait Entity { } } + fn set_motion_info( + &mut self, + motion_info: &proto::MotionInfo, + motion_context: &MotionContext, + ) -> Result<(), Retcode> { + self.set_motion_info_base(motion_info, motion_context) + } + + fn set_motion_info_base( + &mut self, + motion_info: &proto::MotionInfo, + _motion_context: &MotionContext, + ) -> Result<(), Retcode> { + match motion_info.state() { + MotionState::MotionNone => (), + _ => { + let _speed = motion_info.speed.clone().unwrap_or_default(); + let rot = motion_info.rot.as_ref().unwrap(); + let pos = motion_info.pos.as_ref().unwrap(); + + self.set_rotation(Vector3::from_client(rot)); + self.set_position(Vector3::from_client(pos)); + // TODO: Entity::checkMoveSpeed + } + } + + // TODO: broadcast + + Ok(()) + } + fn to_client(&self, _scene_entity_info: &mut SceneEntityInfo) {} } diff --git a/gameserver/src/entity/mod.rs b/gameserver/src/entity/mod.rs index a1952fe..1bfb078 100644 --- a/gameserver/src/entity/mod.rs +++ b/gameserver/src/entity/mod.rs @@ -1,6 +1,6 @@ mod entity; -pub use entity::Entity; +pub use entity::{Entity, MotionContext}; pub mod entity_mgr; pub mod entity_utils; mod vision_context; diff --git a/gameserver/src/handler/fight_handler.rs b/gameserver/src/handler/fight_handler.rs new file mode 100644 index 0000000..e1dca7c --- /dev/null +++ b/gameserver/src/handler/fight_handler.rs @@ -0,0 +1,61 @@ +use std::{error::Error, rc::Rc}; + +use common::net::tools::Packet; +use prost::Message; +use proto::{CombatTypeArgument, EntityMoveInfo}; + +use crate::player::Player; + +use super::{get_proto, scene_handler}; + +pub fn on_combat_invocations_notify( + player: &Rc, + packet: Packet, +) -> Result<(), Box> { + let notify = get_proto!(packet, CombatInvocationsNotify); + + for entry in notify.invoke_list { + match entry.argument_type() { + CombatTypeArgument::EntityMove => { + let Ok(entity_move_info) = EntityMoveInfo::decode(&*entry.combat_data) else { + tracing::warn!("combat invoke type: proto::EntityMoveInfo fail to parse, len:{}, base64:{}, player:{}", entry.combat_data.len(), rbase64::encode(&*entry.combat_data), player.uid); + return Ok(()); + }; + + let (cur_scene, cur_avatar) = { + ( + player + .player_scene_comp + .borrow() + .get_cur_scene() + .unwrap() + .clone(), + player + .player_avatar_comp + .borrow() + .get_cur_avatar() + .unwrap() + .clone(), + ) + }; + + let mut sync_uid_vec = Vec::new(); + if let Err(ret) = scene_handler::process_entity_move_info( + cur_scene, + player, + cur_avatar, + &entity_move_info, + &mut sync_uid_vec, + ) { + tracing::warn!("process_entity_move_info fails, ret:{ret:?}"); + } + } + unhandled => tracing::warn!( + "wrong combat type, player:{}, type:{unhandled:?}", + player.uid, + ), + } + } + + Ok(()) +} diff --git a/gameserver/src/handler/mod.rs b/gameserver/src/handler/mod.rs index 68d4fa8..e37587a 100644 --- a/gameserver/src/handler/mod.rs +++ b/gameserver/src/handler/mod.rs @@ -1,4 +1,5 @@ pub mod avatar_handler; +pub mod fight_handler; pub mod login_handler; pub mod player_handler; pub mod player_misc_handler; @@ -44,10 +45,12 @@ game_packet_handlers! { PlayerMiscHandler::PingReq; PlayerHandler::SetPlayerBornDataReq; PlayerHandler::PlayerLogoutReq; + PlayerHandler::UnionCmdNotify; SceneHandler::EnterSceneReadyReq; SceneHandler::SceneInitFinishReq; SceneHandler::EnterSceneDoneReq; SceneHandler::PostEnterSceneReq; AvatarHandler::SetUpAvatarTeamReq; AvatarHandler::ChangeAvatarReq; + FightHandler::CombatInvocationsNotify; } diff --git a/gameserver/src/handler/player_handler.rs b/gameserver/src/handler/player_handler.rs index a52ecc8..716a93d 100644 --- a/gameserver/src/handler/player_handler.rs +++ b/gameserver/src/handler/player_handler.rs @@ -1,6 +1,6 @@ use std::{error::Error, rc::Rc}; -use common::net::tools::Packet; +use common::{net::tools::Packet, tools::time_utils}; use proto::{PlayerLogoutReason, ServerDisconnectClientNotify, SetPlayerBornDataRsp}; use crate::player::Player; @@ -38,3 +38,36 @@ pub fn on_player_logout_req(player: &Rc, packet: Packet) -> Result<(), B Ok(()) } + +pub fn on_union_cmd_notify(player: &Rc, packet: Packet) -> Result<(), Box> { + // TODO: PlayerHandler::checkUnionFrequent + + let notify = get_proto!(packet, UnionCmdNotify); + for cmd in notify.cmd_list { + let last_time = time_utils::get_now_ms(); + + let err = super::process_packet( + player, + Packet { + cmd_id: cmd.message_id as u16, + recv_vec: cmd.body, + head: proto::PacketHead::default(), + }, + ) + .err(); + + let time = time_utils::get_now_ms(); + tracing::info!( + "|UnionSubCmd|{}|{}|{}|", + player.uid, + cmd.message_id, + time - last_time + ); + + if let Some(err) = err { + tracing::warn!("UnionSubCmd process failed: {err:?}"); + } + } + + Ok(()) +} diff --git a/gameserver/src/handler/scene_handler.rs b/gameserver/src/handler/scene_handler.rs index 0b27d7e..ecefcd2 100644 --- a/gameserver/src/handler/scene_handler.rs +++ b/gameserver/src/handler/scene_handler.rs @@ -1,11 +1,18 @@ -use std::{error::Error, rc::Rc}; +use std::{cell::RefCell, error::Error, rc::Rc}; use common::net::tools::Packet; +use data::math_def::Vector3; use proto::{ - EnterSceneDoneRsp, EnterSceneReadyRsp, PostEnterSceneRsp, Retcode, SceneInitFinishRsp, + EnterSceneDoneRsp, EnterSceneReadyRsp, EntityMoveInfo, PostEnterSceneRsp, Retcode, + SceneInitFinishRsp, }; -use crate::player::Player; +use crate::{ + creature::{Creature, LifeState}, + entity::{Entity, MotionContext}, + player::{avatar::Avatar, Player}, + scene::Scene, +}; use super::get_proto; @@ -68,3 +75,51 @@ pub fn on_post_enter_scene_req(player: &Rc, packet: Packet) -> Result<() Ok(()) } + +pub fn process_entity_move_info( + scene: Rc>, + player: &Rc, + cur_avatar: Rc>, + move_info: &EntityMoveInfo, + _sync_uid_vec: &mut Vec, +) -> Result<(), Retcode> { + if move_info.entity_id == cur_avatar.borrow().entity_id() { + if cur_avatar.borrow().get_life_state() != LifeState::LifeAlive { + tracing::info!( + "avatar is not alive:{}", + cur_avatar.borrow() as std::cell::Ref + ); + return Err(Retcode::RetFail); + } + } else { + return Err(Retcode::RetFail); // TODO: non cur avatar also has some handling + } + + let motion_info = move_info.motion_info.as_ref().unwrap(); + let (Some(pos), Some(rot)) = (motion_info.pos.as_ref(), motion_info.rot.as_ref()) else { + return Ok(()); + }; + + let context = MotionContext { + scene_time_ms: move_info.scene_time as u64, + reliable_seq: move_info.reliable_seq, + is_reliable: move_info.is_reliable, + exclude_uid: player.uid, + is_notify: false, + is_do_move: true, + interval_velocity: 0, + sync_uid_vec: Vec::new(), + }; + + scene.borrow_mut().entity_move_to( + cur_avatar.clone() as Rc>, + Vector3::from_client(pos), + Vector3::from_client(rot), + ); + + let _ = cur_avatar + .borrow_mut() + .set_motion_info(motion_info, &context); + + Ok(()) +} diff --git a/gameserver/src/player/avatar/avatar.rs b/gameserver/src/player/avatar/avatar.rs index 79ef483..fce9f2b 100644 --- a/gameserver/src/player/avatar/avatar.rs +++ b/gameserver/src/player/avatar/avatar.rs @@ -3,7 +3,11 @@ use std::{ rc::{Rc, Weak}, }; -use data::{math_def::Vector3, prop_type::PROP_LEVEL, ElementType, FightPropType}; +use data::{ + math_def::{Coordinate, Vector3}, + prop_type::PROP_LEVEL, + ElementType, FightPropType, +}; use proto::{ avatar_bin::{self, Detail}, AbilitySyncStateInfo, AnimatorParameterValueInfoPair, AvatarBin, AvatarExcelInfo, Cjnoehnhdgl, @@ -14,7 +18,7 @@ use proto::{ use crate::{ ability::AbilityComp, creature::{property::PropValueMap, Creature, FightPropComp, LifeState}, - entity::Entity, + entity::{Entity, MotionContext}, item::EquipComp, player::{item::Item, Player}, skill::SkillComp, @@ -243,6 +247,7 @@ pub struct BaseAvatar { pub rot: Vector3, pub last_valid_pos: Vector3, pub last_valid_rot: Vector3, + pub coordinate: Coordinate, } impl BaseAvatar { @@ -426,6 +431,26 @@ impl Entity for Avatar { self.base_avatar_mut().rot = rot; } + fn set_coordinate(&mut self, coordinate: Coordinate) { + self.base_avatar_mut().coordinate = coordinate; + } + + fn get_coordinate(&self) -> Coordinate { + self.base_avatar().coordinate.clone() + } + + fn set_motion_info( + &mut self, + motion_info: &proto::MotionInfo, + motion_context: &MotionContext, + ) -> Result<(), proto::Retcode> { + self.set_motion_info_base(motion_info, motion_context)?; + self.set_last_valid_position(Vector3::from_client(motion_info.pos.as_ref().unwrap())); + self.set_last_valid_rotation(Vector3::from_client(motion_info.rot.as_ref().unwrap())); + + Ok(()) + } + fn to_client(&self, scene_entity_info: &mut SceneEntityInfo) { scene_entity_info.entity_id = self.entity_id(); scene_entity_info.entity_type = self.get_entity_type().into(); diff --git a/gameserver/src/player/player.rs b/gameserver/src/player/player.rs index 9320f97..a3318ad 100644 --- a/gameserver/src/player/player.rs +++ b/gameserver/src/player/player.rs @@ -23,8 +23,8 @@ use proto::{ EnterSceneDoneReq, EnterSceneDoneRsp, EnterScenePeerNotify, EnterSceneReadyReq, EnterType, MpLevelEntityInfo, PacketHead, PingReq, PingRsp, PlayerData, PlayerDataBin, PlayerDataNotify, PlayerEnterSceneInfoNotify, PlayerEnterSceneNotify, PlayerLoginRsp, PostEnterSceneReq, - PostEnterSceneRsp, ResVersionConfig, Retcode, SavePlayerDataReq, SceneInitFinishReq, - SetPlayerBornDataReq, TeamEnterSceneInfo, VisionType, YSMessage, + PostEnterSceneRsp, Retcode, SavePlayerDataReq, SceneInitFinishReq, SetPlayerBornDataReq, + TeamEnterSceneInfo, VisionType, YSMessage, }; use rand::RngCore; diff --git a/gameserver/src/scene/grid.rs b/gameserver/src/scene/grid.rs index 23d7771..a475295 100644 --- a/gameserver/src/scene/grid.rs +++ b/gameserver/src/scene/grid.rs @@ -2,7 +2,7 @@ use std::{cell::RefCell, collections::BTreeMap, rc::Rc}; use crate::entity::Entity; -use super::region::Region; +use super::{region::Region, visitor::Visitor}; #[derive(Default)] pub struct Grid { @@ -30,6 +30,12 @@ impl Grid { self.region_vec.push(region); } + pub fn accept(&self, visitor: &mut Visitor) { + self.entity_map + .values() + .for_each(|e| visitor.visit_entity(&e)); + } + pub fn get_all_entity(&self) -> Vec>> { self.entity_map.values().map(|a| a.clone()).collect() } diff --git a/gameserver/src/scene/grid_mgr.rs b/gameserver/src/scene/grid_mgr.rs index fe2faeb..d867bd1 100644 --- a/gameserver/src/scene/grid_mgr.rs +++ b/gameserver/src/scene/grid_mgr.rs @@ -5,7 +5,7 @@ use proto::ProtEntityType; use crate::entity::Entity; -use super::{grid::Grid, region::Region, VisionLevelType}; +use super::{grid::Grid, region::Region, visitor::Visitor, VisionLevelType}; #[allow(unused)] pub struct GridMgr { @@ -21,6 +21,10 @@ impl GridMgr { self.grid_map.entry((x, y)).or_insert_with(Grid::default) } + pub fn find_grid(&self, x: i32, y: i32) -> Option<&Grid> { + self.grid_map.get(&(x, y)) + } + pub fn place_entity( &mut self, entity: Rc>, @@ -47,6 +51,115 @@ impl GridMgr { grid.del_entity(entity); } + pub fn entity_move_to(&mut self, entity: &Rc>, coordinate: &Coordinate) { + let prev_coordinate = entity.borrow().get_coordinate(); + if *coordinate == prev_coordinate { + return; + } + + let prev_grid = self.get_grid(prev_coordinate.x, prev_coordinate.y); + prev_grid.del_entity(entity); + + let grid = self.get_grid(coordinate.x, coordinate.y); + grid.add_entity(entity.clone()); + + entity.borrow_mut().set_coordinate(coordinate.clone()); + } + + pub fn visit_diff_grids( + &self, + center1: &Coordinate, + center2: &Coordinate, + t1: &mut Visitor, + t2: &mut Visitor, + ) { + let sight_radius = self.sight_radius as i32; + + let left_x1 = center1.x - sight_radius; + let right_x1 = center1.x + sight_radius; + let low_y1 = center1.y - sight_radius; + let up_y1 = center1.y + sight_radius; + + let left_x2 = center2.x - sight_radius; + let right_x2 = center2.x + sight_radius; + let low_y2 = center2.y - sight_radius; + let up_y2 = center2.y + sight_radius; + + if right_x1 >= left_x2 && right_x2 >= left_x1 && up_y1 >= low_y2 && up_y2 >= low_y1 { + let mut low_y = low_y1; + let mut up_y = up_y1; + + if center1.y >= center2.y { + if center1.y > center2.y { + for j in up_y1..up_y2 { + for i in left_x1..=right_x1 { + self.visit_grid(i, j, t1); + } + } + for j in low_y2..low_y1 { + for i in left_x2..=right_x2 { + self.visit_grid(i, j, t2); + } + } + + low_y = low_y1; + up_y = up_y2; + } + } else { + for j in low_y1..low_y2 { + for i in left_x1..=right_x1 { + self.visit_grid(i, j, t1); + } + } + for j in up_y2..up_y1 { + for i in left_x2..=right_x2 { + self.visit_grid(i, j, t2); + } + } + + low_y = low_y2; + up_y = up_y1; + } + + for j in low_y..=up_y { + if center1.x >= center2.x { + if center1.x > center2.x { + for i in left_x2..left_x1 { + self.visit_grid(i, j, t2); + } + for i in right_x1..right_x2 { + self.visit_grid(i, j, t1); + } + } + } else { + for i in left_x1..left_x2 { + self.visit_grid(i, j, t1); + } + for i in right_x2..right_x1 { + self.visit_grid(i, j, t2); + } + } + } + } else { + for i in left_x1..=right_x1 { + for j in low_y1..=up_y1 { + self.visit_grid(i, j, t1); + } + } + for i in left_x2..=right_x2 { + for j in low_y2..=up_y2 { + self.visit_grid(i, j, t2); + } + } + } + } + + pub fn visit_grid(&self, x: i32, y: i32, visitor: &mut Visitor) { + if let Some(grid) = self.find_grid(x, y) { + grid.accept(visitor); + } + } + #[allow(dead_code)] pub fn place_region(&mut self, region: Region, coordinate: Coordinate) -> Result<(), ()> { let grid = self.get_grid(coordinate.x, coordinate.y); diff --git a/gameserver/src/scene/mod.rs b/gameserver/src/scene/mod.rs index 5fd7303..5f1fc62 100644 --- a/gameserver/src/scene/mod.rs +++ b/gameserver/src/scene/mod.rs @@ -10,6 +10,7 @@ mod scene; pub mod scene_mgr; mod scene_sight_comp; mod scene_team; +mod visitor; pub use mp_level_entity::MPLevelEntity; pub use player_scene_comp::{EnterSceneState, PlayerSceneComp}; diff --git a/gameserver/src/scene/scene.rs b/gameserver/src/scene/scene.rs index 4a0d898..4896f4d 100644 --- a/gameserver/src/scene/scene.rs +++ b/gameserver/src/scene/scene.rs @@ -268,6 +268,59 @@ impl Scene { .insert(uid, player_location); } + pub fn entity_move_to(&mut self, entity: Rc>, pos: Vector3, rot: Vector3) { + if !entity.borrow().is_on_scene() { + tracing::info!("entity is not on scene {}", entity.borrow()); + return; + } + + let sight_comp = self.base_mut().sight_comp.as_mut().unwrap(); + + let mut meet_entity_vec = Vec::new(); + let mut miss_entity_vec = Vec::new(); + + sight_comp.entity_move_to( + entity.clone(), + pos.clone(), + &mut miss_entity_vec, + &mut meet_entity_vec, + ); + + if let Some(player) = entity.borrow().get_owner_player() { + player.send_proto(SceneEntityDisappearNotify { + param: 0, + disappear_type: VisionType::VisionMiss.into(), + entity_list: miss_entity_vec + .into_iter() + .map(|e| e.borrow().entity_id()) + .collect(), + }); + + player.send_proto(SceneEntityAppearNotify { + param: 0, + appear_type: VisionType::VisionMeet.into(), + entity_list: meet_entity_vec + .into_iter() + .map(|e| { + let mut appear_entity_info = SceneEntityInfo::default(); + e.borrow().to_client(&mut appear_entity_info); + appear_entity_info + }) + .collect(), + }); + + if player.uid == self.base().owner_uid() { + let base_mut = self.base_mut(); + let owner_location = &mut base_mut.owner_player_location; + + owner_location.cur_pos = pos.clone(); + owner_location.cur_rot = rot.clone(); + owner_location.last_valid_pos = pos.clone(); + owner_location.last_valid_rot = rot.clone(); + } + } + } + fn notify_scene_and_host_data(&self, uid: u32) { let Some(player) = self.base().find_player(uid) else { tracing::warn!("find_player failed, uid:{uid}"); diff --git a/gameserver/src/scene/scene_sight_comp.rs b/gameserver/src/scene/scene_sight_comp.rs index d729e59..6f6cdea 100644 --- a/gameserver/src/scene/scene_sight_comp.rs +++ b/gameserver/src/scene/scene_sight_comp.rs @@ -1,12 +1,15 @@ use std::{cell::RefCell, collections::HashMap, rc::Rc}; -use data::math_def::{Coordinate, Vector2}; +use data::math_def::{Coordinate, Vector2, Vector3}; use num_enum::FromPrimitive; -use proto::Retcode; +use proto::{ProtEntityType, Retcode}; use crate::entity::Entity; -use super::grid_mgr::GridMgr; +use super::{ + grid_mgr::GridMgr, + visitor::{Visitor, VisitorType}, +}; #[derive(Debug, Default, Clone, Copy, FromPrimitive)] #[repr(u32)] @@ -52,6 +55,20 @@ impl SceneSightComp { } } + pub fn entity_move_to( + &mut self, + entity: Rc>, + dest_pos: Vector3, + miss_entity_vec: &mut Vec>>, + meet_entity_vec: &mut Vec>>, + ) { + match self { + Self::Grid(grid_comp) => { + grid_comp.entity_move_to(entity, dest_pos, miss_entity_vec, meet_entity_vec) + } + } + } + pub fn pos_to_coordinate(&self, range_type: VisionLevelType, pos: &Vector2) -> Coordinate { match self { Self::Grid(grid_comp) => grid_comp.pos_to_coordinate(range_type, pos), @@ -177,6 +194,66 @@ impl SceneGridComp { grid_mgr.remove_entity(entity, coordinate); } + pub fn entity_move_to( + &mut self, + entity: Rc>, + dest_pos: Vector3, + miss_entity_vec: &mut Vec>>, + meet_entity_vec: &mut Vec>>, + ) { + let range_type = self.get_vision_level_type(&entity); + let pos = Vector2 { + x: dest_pos.x, + y: dest_pos.z, + }; + let coordinate = self.pos_to_coordinate(range_type, &pos); + + let grid_mgr = &mut self.grid_mgr_arr[range_type as usize]; + grid_mgr.entity_move_to(&entity, &coordinate); + + let mut miss_visitor = Visitor::new(VisitorType::Entity, entity.clone()); + let mut meet_visitor = Visitor::new(VisitorType::Entity, entity.clone()); + + if entity.borrow().get_entity_type() == ProtEntityType::ProtEntityAvatar { + let prev_pos = entity.borrow().position().clone(); + + self.visit_diff_grids(&prev_pos, &dest_pos, &mut miss_visitor, &mut meet_visitor); + } + + miss_entity_vec.extend(miss_visitor.get_entity_vec().iter().cloned()); + meet_entity_vec.extend(meet_visitor.get_entity_vec().iter().cloned()); + } + + pub fn visit_diff_grids( + &self, + from_pos: &Vector3, + to_pos: &Vector3, + miss_visitor: &mut Visitor, + meet_visitor: &mut Visitor, + ) { + for (i, grid_mgr) in self.grid_mgr_arr.iter().enumerate() { + let c1 = self.pos_to_coordinate( + VisionLevelType::from_primitive(i as u32), + &Vector2 { + x: from_pos.x, + y: from_pos.z, + }, + ); + + let c2 = self.pos_to_coordinate( + VisionLevelType::from_primitive(i as u32), + &Vector2 { + x: to_pos.x, + y: to_pos.z, + }, + ); + + if c1 != c2 { + grid_mgr.visit_diff_grids(&c1, &c2, miss_visitor, meet_visitor); + } + } + } + pub fn pos_to_coordinate(&self, range_type: VisionLevelType, pos: &Vector2) -> Coordinate { let grid_width = Self::get_grid_width(range_type); Coordinate { diff --git a/gameserver/src/scene/visitor.rs b/gameserver/src/scene/visitor.rs new file mode 100644 index 0000000..0013321 --- /dev/null +++ b/gameserver/src/scene/visitor.rs @@ -0,0 +1,62 @@ +use std::{cell::RefCell, rc::Rc}; + +use proto::ProtEntityType; + +use crate::entity::Entity; + +pub struct Visitor { + visitor_type: VisitorType, + visitor_entity: Rc>, + entity_vec: Vec>>, +} + +pub enum VisitorType { + Entity, + // Gather, + // Authority, +} + +impl Visitor { + pub fn new(visitor_type: VisitorType, entity: Rc>) -> Self { + Self { + visitor_type, + visitor_entity: entity, + entity_vec: Vec::new(), + } + } + + pub fn visit_entity(&mut self, entity: &Rc>) { + if self.can_add_entity(entity) { + self.entity_vec.push(entity.clone()); + } + } + + pub fn get_entity_vec(&self) -> &Vec>> { + &self.entity_vec + } + + fn can_add_entity(&self, entity: &Rc>) -> bool { + match self.visitor_type { + VisitorType::Entity => { + let visitor_entity_type = self.visitor_entity.borrow().get_entity_type(); + let entity_type = entity.borrow().get_entity_type(); + + if entity_type == ProtEntityType::ProtEntityEyePoint { + if visitor_entity_type != ProtEntityType::ProtEntityAvatar + && visitor_entity_type != ProtEntityType::ProtEntityEyePoint + { + return true; + } + } + + if entity_type > ProtEntityType::ProtEntityEyePoint + || entity_type == ProtEntityType::ProtEntityWeather + { + return false; + } + } + } + + entity.borrow().entity_id() != self.visitor_entity.borrow().entity_id() + } +} diff --git a/hk4e_data/src/math_def.rs b/hk4e_data/src/math_def.rs index 7d9dfc0..53a3e41 100644 --- a/hk4e_data/src/math_def.rs +++ b/hk4e_data/src/math_def.rs @@ -34,6 +34,14 @@ impl Vector3 { } } + pub fn from_client(client: &Vector) -> Self { + Self { + x: client.x, + y: client.y, + z: client.z, + } + } + pub fn to_bin(&self) -> VectorBin { VectorBin { x: self.x, diff --git a/hk4e_proto/out/cmd.rs b/hk4e_proto/out/cmd.rs index 54d72af..3f0f719 100644 --- a/hk4e_proto/out/cmd.rs +++ b/hk4e_proto/out/cmd.rs @@ -969,7 +969,7 @@ pub struct Dnfmenbebko { #[prost(message, optional, tag = "5")] pub motion_info: ::core::option::Option, #[prost(uint32, tag = "10")] - pub lmbahdbogkp: u32, + pub reliable_seq: u32, #[prost(uint32, tag = "13")] pub scene_time: u32, } @@ -2634,7 +2634,7 @@ pub struct Cdjjeiejeic { #[prost(uint32, tag = "8")] pub entity_id: u32, #[prost(uint32, tag = "10")] - pub lmbahdbogkp: u32, + pub reliable_seq: u32, #[prost(uint32, tag = "12")] pub scene_time: u32, } @@ -3712,7 +3712,7 @@ pub struct Hcknomgfabi { #[prost(uint32, tag = "5")] pub entity_id: u32, #[prost(uint32, tag = "2")] - pub lmbahdbogkp: u32, + pub reliable_seq: u32, } #[derive(proto_gen::CmdID)] #[cmdid(28228)] @@ -4659,9 +4659,9 @@ pub struct Ablpfglccga { #[cmdid(23842)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Hfommjempig { +pub struct UnionCmdNotify { #[prost(message, repeated, tag = "7")] - pub inmbbdndhnb: ::prost::alloc::vec::Vec, + pub cmd_list: ::prost::alloc::vec::Vec, } #[derive(proto_gen::CmdID)] #[cmdid(4946)] @@ -5300,8 +5300,8 @@ pub struct Bididocndnh { pub struct Emdebjdpihg { #[prost(message, optional, tag = "9")] pub fbiamhkmhdp: ::core::option::Option, - #[prost(enumeration = "Oficgkjhdjo", tag = "14")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "14")] + pub forward_type: i32, #[prost(uint32, tag = "6")] pub skill_id: u32, #[prost(uint32, tag = "12")] @@ -6400,9 +6400,9 @@ pub struct Nmpglecpcne { #[cmdid(21288)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Jmhheglbibi { +pub struct CombatInvocationsNotify { #[prost(message, repeated, tag = "1")] - pub jmpgkphoecj: ::prost::alloc::vec::Vec, + pub invoke_list: ::prost::alloc::vec::Vec, } #[derive(proto_gen::CmdID)] #[allow(clippy::derive_partial_eq_without_eq)] @@ -6837,8 +6837,8 @@ pub struct Dhfbcfpdnih { pub struct Nlaceblgobf { #[prost(message, optional, tag = "10")] pub enfmpjddppd: ::core::option::Option, - #[prost(enumeration = "Oficgkjhdjo", tag = "11")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "11")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(4251)] @@ -8685,8 +8685,8 @@ pub struct Ihedmdhgoeh { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Fbafidldgbh { - #[prost(enumeration = "Oficgkjhdjo", tag = "4")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "4")] + pub forward_type: i32, #[prost(uint32, tag = "6")] pub iapldldlhjf: u32, #[prost(uint32, tag = "13")] @@ -8846,7 +8846,7 @@ pub struct Bphakjpmfnj { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Bdadmhnhjmd { #[prost(message, repeated, tag = "12")] - pub djkinimjaic: ::prost::alloc::vec::Vec, + pub djkinimjaic: ::prost::alloc::vec::Vec, } #[derive(proto_gen::CmdID)] #[cmdid(28012)] @@ -12210,13 +12210,13 @@ pub struct Djhlmcmlakc { #[prost(uint32, tag = "9")] pub bbbdajafcio: u32, #[prost(enumeration = "Igkelpgcpnb", tag = "10")] - pub algpchiakho: i32, + pub argument_type: i32, #[prost(double, tag = "11")] pub total_tick_time: f64, #[prost(bool, tag = "12")] pub knljlfailkc: bool, - #[prost(enumeration = "Oficgkjhdjo", tag = "14")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "14")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(3629)] @@ -14343,8 +14343,8 @@ pub struct Pmmoihjimhp { pub gngdpnhgelb: u32, #[prost(int32, tag = "1121")] pub abhkfghphak: i32, - #[prost(enumeration = "Oficgkjhdjo", tag = "11")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "11")] + pub forward_type: i32, #[prost(uint64, tag = "5")] pub guid: u64, } @@ -15113,8 +15113,8 @@ pub struct Oojmgckdido { pub inaajognkif: bool, #[prost(uint32, tag = "14")] pub entity_id: u32, - #[prost(enumeration = "Oficgkjhdjo", tag = "2")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "2")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(740)] @@ -15497,7 +15497,7 @@ pub struct Lihgjipipbm { #[prost(uint32, tag = "1")] pub scene_time: u32, #[prost(uint32, tag = "8")] - pub lmbahdbogkp: u32, + pub reliable_seq: u32, #[prost(uint32, tag = "11")] pub entity_id: u32, #[prost(message, optional, tag = "12")] @@ -16852,7 +16852,7 @@ pub struct Kddpedgljdo { #[derive(proto_gen::CmdID)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Kkgaggcdbga { +pub struct EntityMoveInfo { #[prost(uint32, tag = "1")] pub entity_id: u32, #[prost(message, optional, tag = "2")] @@ -16860,9 +16860,9 @@ pub struct Kkgaggcdbga { #[prost(uint32, tag = "3")] pub scene_time: u32, #[prost(uint32, tag = "4")] - pub lmbahdbogkp: u32, + pub reliable_seq: u32, #[prost(bool, tag = "5")] - pub piccjfdaaab: bool, + pub is_reliable: bool, } #[derive(proto_gen::CmdID)] #[cmdid(7223)] @@ -18952,13 +18952,13 @@ pub struct Hhgkmdaobmm { #[derive(proto_gen::CmdID)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Gahcfhapbnd { +pub struct CombatInvokeEntry { #[prost(bytes = "vec", tag = "2")] - pub fminimehonh: ::prost::alloc::vec::Vec, - #[prost(enumeration = "Oljmpobigni", tag = "4")] - pub algpchiakho: i32, - #[prost(enumeration = "Oficgkjhdjo", tag = "7")] - pub lljfddgjdoo: i32, + pub combat_data: ::prost::alloc::vec::Vec, + #[prost(enumeration = "CombatTypeArgument", tag = "4")] + pub argument_type: i32, + #[prost(enumeration = "ForwardType", tag = "7")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(28908)] @@ -20031,8 +20031,8 @@ pub mod scene_entity_info { pub struct Pecbpomflbc { #[prost(uint32, tag = "4")] pub entity_id: u32, - #[prost(enumeration = "Oficgkjhdjo", tag = "11")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "11")] + pub forward_type: i32, #[prost(message, optional, tag = "12")] pub dnjmibedpbn: ::core::option::Option, } @@ -20442,8 +20442,8 @@ pub struct Gdejpbgomah { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Odefencdaoc { - #[prost(enumeration = "Oficgkjhdjo", tag = "1")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "1")] + pub forward_type: i32, #[prost(bool, tag = "6")] pub femhhbngbkf: bool, #[prost(uint32, tag = "8")] @@ -21200,8 +21200,8 @@ pub struct Ahnofecefnd { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pdjecojmkog { - #[prost(enumeration = "Oficgkjhdjo", tag = "5")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "5")] + pub forward_type: i32, #[prost(message, optional, tag = "13")] pub phgjaojchag: ::core::option::Option, } @@ -26398,8 +26398,8 @@ pub struct Hdhfokldgle { pub mafegljmpjl: u32, #[prost(enumeration = "Ojhhihkhbka", tag = "13")] pub ebleapfpnkl: i32, - #[prost(enumeration = "Oficgkjhdjo", tag = "15")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "15")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(25406)] @@ -26602,8 +26602,8 @@ pub struct Fpnmcjlobja { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Kjcmdcgmael { - #[prost(enumeration = "Oficgkjhdjo", tag = "1")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "1")] + pub forward_type: i32, #[prost(message, optional, tag = "11")] pub oponacblgnc: ::core::option::Option, #[prost(uint32, tag = "12")] @@ -34242,8 +34242,8 @@ pub struct Ofccimdloik { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Cbeamgaiafa { - #[prost(enumeration = "Oficgkjhdjo", tag = "2")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "2")] + pub forward_type: i32, #[prost(bool, tag = "4")] pub nakjemnnlcj: bool, #[prost(message, optional, tag = "8")] @@ -36291,8 +36291,8 @@ pub struct Lfphibemcgi { pub struct Lfpapabgdca { #[prost(message, repeated, tag = "5")] pub dkefhjdjnno: ::prost::alloc::vec::Vec, - #[prost(enumeration = "Oficgkjhdjo", tag = "8")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "8")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(8133)] @@ -38211,8 +38211,8 @@ pub struct Hfppiaaojpo { pub struct Hndhiekiemi { #[prost(message, optional, tag = "2")] pub fnhjelcddim: ::core::option::Option, - #[prost(enumeration = "Oficgkjhdjo", tag = "12")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "12")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(9303)] @@ -39929,11 +39929,11 @@ pub struct Amighbjogdd { #[derive(proto_gen::CmdID)] #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] -pub struct Gadhalknnfd { +pub struct UnionCmd { #[prost(bytes = "vec", tag = "6")] - pub nonmeigfkhg: ::prost::alloc::vec::Vec, + pub body: ::prost::alloc::vec::Vec, #[prost(uint32, tag = "14")] - pub dggokncpggf: u32, + pub message_id: u32, } #[derive(proto_gen::CmdID)] #[cmdid(6517)] @@ -40786,8 +40786,8 @@ pub struct Aoppgcomlpm { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Ncfnclnokgi { - #[prost(enumeration = "Oficgkjhdjo", tag = "3")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "3")] + pub forward_type: i32, #[prost(bool, tag = "10")] pub ddpifelgohl: bool, #[prost(uint32, tag = "12")] @@ -40833,8 +40833,8 @@ pub struct Lgibcbdddfk { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Jmbnpcgmgib { - #[prost(enumeration = "Oficgkjhdjo", tag = "6")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "6")] + pub forward_type: i32, #[prost(message, optional, tag = "11")] pub iohnkmnaegf: ::core::option::Option, } @@ -43268,8 +43268,8 @@ pub struct Nfdpejegbmh { pub struct Jbfbefdddpd { #[prost(message, optional, tag = "7")] pub gmijpeanill: ::core::option::Option, - #[prost(enumeration = "Oficgkjhdjo", tag = "14")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "14")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(23855)] @@ -43638,8 +43638,8 @@ pub struct Dkjbpjgknno { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Oggkefojaij { - #[prost(enumeration = "Oficgkjhdjo", tag = "1")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "1")] + pub forward_type: i32, #[prost(bool, tag = "2")] pub cnfjmcihgel: bool, #[prost(bool, tag = "3")] @@ -43985,8 +43985,8 @@ pub struct Nmgijpebbef { pub struct Kahllhcbojj { #[prost(uint32, tag = "5")] pub entity_id: u32, - #[prost(enumeration = "Oficgkjhdjo", tag = "8")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "8")] + pub forward_type: i32, } #[derive(proto_gen::CmdID)] #[cmdid(4202)] @@ -44641,8 +44641,8 @@ pub struct Cfddebkopha { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Hnglhghijhp { - #[prost(enumeration = "Oficgkjhdjo", tag = "8")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "8")] + pub forward_type: i32, #[prost(message, optional, tag = "10")] pub paggghjhmoa: ::core::option::Option, #[prost(uint32, tag = "15")] @@ -45492,7 +45492,7 @@ pub struct MotionInfo { pub rot: ::core::option::Option, #[prost(message, optional, tag = "3")] pub speed: ::core::option::Option, - #[prost(enumeration = "Jknoodfaioh", tag = "4")] + #[prost(enumeration = "MotionState", tag = "4")] pub state: i32, #[prost(message, repeated, tag = "5")] pub params: ::prost::alloc::vec::Vec, @@ -46159,8 +46159,8 @@ pub struct Plhnkaojilk { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Pfpjphpiphf { - #[prost(enumeration = "Oficgkjhdjo", tag = "11")] - pub lljfddgjdoo: i32, + #[prost(enumeration = "ForwardType", tag = "11")] + pub forward_type: i32, #[prost(message, optional, tag = "13")] pub ndpajkffoen: ::core::option::Option, } @@ -53500,7 +53500,7 @@ pub struct Mjjhejigncf { #[derive(Clone, PartialEq, ::prost::Message)] pub struct Acfbjdcahoj { #[prost(message, repeated, tag = "5")] - pub djkinimjaic: ::prost::alloc::vec::Vec, + pub djkinimjaic: ::prost::alloc::vec::Vec, } #[derive(proto_gen::CmdID)] #[cmdid(28820)] @@ -54722,7 +54722,7 @@ impl Bhpaejoelmd { #[derive(proto_gen::CmdID)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] -pub enum Jknoodfaioh { +pub enum MotionState { MotionNone = 0, MotionReset = 1, MotionStandby = 2, @@ -54833,292 +54833,292 @@ pub enum Jknoodfaioh { MotionNatsaurusEntering = 107, MotionNum = 108, } -impl Jknoodfaioh { +impl MotionState { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Jknoodfaioh::MotionNone => "JKNOODFAIOH_MotionNone", - Jknoodfaioh::MotionReset => "JKNOODFAIOH_MotionReset", - Jknoodfaioh::MotionStandby => "JKNOODFAIOH_MotionStandby", - Jknoodfaioh::MotionStandbyMove => "JKNOODFAIOH_MotionStandbyMove", - Jknoodfaioh::MotionWalk => "JKNOODFAIOH_MotionWalk", - Jknoodfaioh::MotionRun => "JKNOODFAIOH_MotionRun", - Jknoodfaioh::MotionDash => "JKNOODFAIOH_MotionDash", - Jknoodfaioh::MotionClimb => "JKNOODFAIOH_MotionClimb", - Jknoodfaioh::MotionClimbJump => "JKNOODFAIOH_MotionClimbJump", - Jknoodfaioh::MotionStandbyToClimb => "JKNOODFAIOH_MotionStandbyToClimb", - Jknoodfaioh::MotionFight => "JKNOODFAIOH_MotionFight", - Jknoodfaioh::MotionJump => "JKNOODFAIOH_MotionJump", - Jknoodfaioh::MotionDrop => "JKNOODFAIOH_MotionDrop", - Jknoodfaioh::MotionFly => "JKNOODFAIOH_MotionFly", - Jknoodfaioh::MotionSwimMove => "JKNOODFAIOH_MotionSwimMove", - Jknoodfaioh::MotionSwimIdle => "JKNOODFAIOH_MotionSwimIdle", - Jknoodfaioh::MotionSwimDash => "JKNOODFAIOH_MotionSwimDash", - Jknoodfaioh::MotionSwimJump => "JKNOODFAIOH_MotionSwimJump", - Jknoodfaioh::MotionSlip => "JKNOODFAIOH_MotionSlip", - Jknoodfaioh::MotionGoUpstairs => "JKNOODFAIOH_MotionGoUpstairs", - Jknoodfaioh::MotionFallOnGround => "JKNOODFAIOH_MotionFallOnGround", - Jknoodfaioh::MotionJumpUpWallForStandby => { - "JKNOODFAIOH_MotionJumpUpWallForStandby" + MotionState::MotionNone => "MotionState_MotionNone", + MotionState::MotionReset => "MotionState_MotionReset", + MotionState::MotionStandby => "MotionState_MotionStandby", + MotionState::MotionStandbyMove => "MotionState_MotionStandbyMove", + MotionState::MotionWalk => "MotionState_MotionWalk", + MotionState::MotionRun => "MotionState_MotionRun", + MotionState::MotionDash => "MotionState_MotionDash", + MotionState::MotionClimb => "MotionState_MotionClimb", + MotionState::MotionClimbJump => "MotionState_MotionClimbJump", + MotionState::MotionStandbyToClimb => "MotionState_MotionStandbyToClimb", + MotionState::MotionFight => "MotionState_MotionFight", + MotionState::MotionJump => "MotionState_MotionJump", + MotionState::MotionDrop => "MotionState_MotionDrop", + MotionState::MotionFly => "MotionState_MotionFly", + MotionState::MotionSwimMove => "MotionState_MotionSwimMove", + MotionState::MotionSwimIdle => "MotionState_MotionSwimIdle", + MotionState::MotionSwimDash => "MotionState_MotionSwimDash", + MotionState::MotionSwimJump => "MotionState_MotionSwimJump", + MotionState::MotionSlip => "MotionState_MotionSlip", + MotionState::MotionGoUpstairs => "MotionState_MotionGoUpstairs", + MotionState::MotionFallOnGround => "MotionState_MotionFallOnGround", + MotionState::MotionJumpUpWallForStandby => { + "MotionState_MotionJumpUpWallForStandby" } - Jknoodfaioh::MotionJumpOffWall => "JKNOODFAIOH_MotionJumpOffWall", - Jknoodfaioh::MotionPoweredFly => "JKNOODFAIOH_MotionPoweredFly", - Jknoodfaioh::MotionLadderIdle => "JKNOODFAIOH_MotionLadderIdle", - Jknoodfaioh::MotionLadderMove => "JKNOODFAIOH_MotionLadderMove", - Jknoodfaioh::MotionLadderSlip => "JKNOODFAIOH_MotionLadderSlip", - Jknoodfaioh::MotionStandbyToLadder => "JKNOODFAIOH_MotionStandbyToLadder", - Jknoodfaioh::MotionLadderToStandby => "JKNOODFAIOH_MotionLadderToStandby", - Jknoodfaioh::MotionDangerStandby => "JKNOODFAIOH_MotionDangerStandby", - Jknoodfaioh::MotionDangerStandbyMove => "JKNOODFAIOH_MotionDangerStandbyMove", - Jknoodfaioh::MotionDangerWalk => "JKNOODFAIOH_MotionDangerWalk", - Jknoodfaioh::MotionDangerRun => "JKNOODFAIOH_MotionDangerRun", - Jknoodfaioh::MotionDangerDash => "JKNOODFAIOH_MotionDangerDash", - Jknoodfaioh::MotionCrouchIdle => "JKNOODFAIOH_MotionCrouchIdle", - Jknoodfaioh::MotionCrouchMove => "JKNOODFAIOH_MotionCrouchMove", - Jknoodfaioh::MotionCrouchRoll => "JKNOODFAIOH_MotionCrouchRoll", - Jknoodfaioh::MotionNotify => "JKNOODFAIOH_MotionNotify", - Jknoodfaioh::MotionLandSpeed => "JKNOODFAIOH_MotionLandSpeed", - Jknoodfaioh::MotionMoveFailAck => "JKNOODFAIOH_MotionMoveFailAck", - Jknoodfaioh::MotionWaterfall => "JKNOODFAIOH_MotionWaterfall", - Jknoodfaioh::MotionDashBeforeShake => "JKNOODFAIOH_MotionDashBeforeShake", - Jknoodfaioh::MotionSitIdle => "JKNOODFAIOH_MotionSitIdle", - Jknoodfaioh::MotionForceSetPos => "JKNOODFAIOH_MotionForceSetPos", - Jknoodfaioh::MotionQuestForceDrag => "JKNOODFAIOH_MotionQuestForceDrag", - Jknoodfaioh::MotionFollowRoute => "JKNOODFAIOH_MotionFollowRoute", - Jknoodfaioh::MotionSkiffBoarding => "JKNOODFAIOH_MotionSkiffBoarding", - Jknoodfaioh::MotionSkiffNormal => "JKNOODFAIOH_MotionSkiffNormal", - Jknoodfaioh::MotionSkiffDash => "JKNOODFAIOH_MotionSkiffDash", - Jknoodfaioh::MotionSkiffPoweredDash => "JKNOODFAIOH_MotionSkiffPoweredDash", - Jknoodfaioh::MotionDestroyVehicle => "JKNOODFAIOH_MotionDestroyVehicle", - Jknoodfaioh::MotionFlyIdle => "JKNOODFAIOH_MotionFlyIdle", - Jknoodfaioh::MotionFlySlow => "JKNOODFAIOH_MotionFlySlow", - Jknoodfaioh::MotionFlyFast => "JKNOODFAIOH_MotionFlyFast", - Jknoodfaioh::MotionAimMove => "JKNOODFAIOH_MotionAimMove", - Jknoodfaioh::MotionAirCompensation => "JKNOODFAIOH_MotionAirCompensation", - Jknoodfaioh::MotionSorushNormal => "JKNOODFAIOH_MotionSorushNormal", - Jknoodfaioh::MotionRollerCoaster => "JKNOODFAIOH_MotionRollerCoaster", - Jknoodfaioh::MotionDiveIdle => "JKNOODFAIOH_MotionDiveIdle", - Jknoodfaioh::MotionDiveMove => "JKNOODFAIOH_MotionDiveMove", - Jknoodfaioh::MotionDiveDash => "JKNOODFAIOH_MotionDiveDash", - Jknoodfaioh::MotionDiveDolphine => "JKNOODFAIOH_MotionDiveDolphine", - Jknoodfaioh::MotionDebug => "JKNOODFAIOH_MotionDebug", - Jknoodfaioh::MotionOceanCurrent => "JKNOODFAIOH_MotionOceanCurrent", - Jknoodfaioh::MotionDiveSwimMove => "JKNOODFAIOH_MotionDiveSwimMove", - Jknoodfaioh::MotionDiveSwimIdle => "JKNOODFAIOH_MotionDiveSwimIdle", - Jknoodfaioh::MotionDiveSwimDash => "JKNOODFAIOH_MotionDiveSwimDash", - Jknoodfaioh::MotionArcLight => "JKNOODFAIOH_MotionArcLight", - Jknoodfaioh::MotionArcLightSafe => "JKNOODFAIOH_MotionArcLightSafe", - Jknoodfaioh::MotionVehicleStandby => "JKNOODFAIOH_MotionVehicleStandby", - Jknoodfaioh::MotionVehicleRun => "JKNOODFAIOH_MotionVehicleRun", - Jknoodfaioh::MotionVehicleDash => "JKNOODFAIOH_MotionVehicleDash", - Jknoodfaioh::MotionVehicleClimb => "JKNOODFAIOH_MotionVehicleClimb", - Jknoodfaioh::MotionVehicleClimbJump => "JKNOODFAIOH_MotionVehicleClimbJump", - Jknoodfaioh::MotionVehicleStandbyToClimb => { - "JKNOODFAIOH_MotionVehicleStandbyToClimb" + MotionState::MotionJumpOffWall => "MotionState_MotionJumpOffWall", + MotionState::MotionPoweredFly => "MotionState_MotionPoweredFly", + MotionState::MotionLadderIdle => "MotionState_MotionLadderIdle", + MotionState::MotionLadderMove => "MotionState_MotionLadderMove", + MotionState::MotionLadderSlip => "MotionState_MotionLadderSlip", + MotionState::MotionStandbyToLadder => "MotionState_MotionStandbyToLadder", + MotionState::MotionLadderToStandby => "MotionState_MotionLadderToStandby", + MotionState::MotionDangerStandby => "MotionState_MotionDangerStandby", + MotionState::MotionDangerStandbyMove => "MotionState_MotionDangerStandbyMove", + MotionState::MotionDangerWalk => "MotionState_MotionDangerWalk", + MotionState::MotionDangerRun => "MotionState_MotionDangerRun", + MotionState::MotionDangerDash => "MotionState_MotionDangerDash", + MotionState::MotionCrouchIdle => "MotionState_MotionCrouchIdle", + MotionState::MotionCrouchMove => "MotionState_MotionCrouchMove", + MotionState::MotionCrouchRoll => "MotionState_MotionCrouchRoll", + MotionState::MotionNotify => "MotionState_MotionNotify", + MotionState::MotionLandSpeed => "MotionState_MotionLandSpeed", + MotionState::MotionMoveFailAck => "MotionState_MotionMoveFailAck", + MotionState::MotionWaterfall => "MotionState_MotionWaterfall", + MotionState::MotionDashBeforeShake => "MotionState_MotionDashBeforeShake", + MotionState::MotionSitIdle => "MotionState_MotionSitIdle", + MotionState::MotionForceSetPos => "MotionState_MotionForceSetPos", + MotionState::MotionQuestForceDrag => "MotionState_MotionQuestForceDrag", + MotionState::MotionFollowRoute => "MotionState_MotionFollowRoute", + MotionState::MotionSkiffBoarding => "MotionState_MotionSkiffBoarding", + MotionState::MotionSkiffNormal => "MotionState_MotionSkiffNormal", + MotionState::MotionSkiffDash => "MotionState_MotionSkiffDash", + MotionState::MotionSkiffPoweredDash => "MotionState_MotionSkiffPoweredDash", + MotionState::MotionDestroyVehicle => "MotionState_MotionDestroyVehicle", + MotionState::MotionFlyIdle => "MotionState_MotionFlyIdle", + MotionState::MotionFlySlow => "MotionState_MotionFlySlow", + MotionState::MotionFlyFast => "MotionState_MotionFlyFast", + MotionState::MotionAimMove => "MotionState_MotionAimMove", + MotionState::MotionAirCompensation => "MotionState_MotionAirCompensation", + MotionState::MotionSorushNormal => "MotionState_MotionSorushNormal", + MotionState::MotionRollerCoaster => "MotionState_MotionRollerCoaster", + MotionState::MotionDiveIdle => "MotionState_MotionDiveIdle", + MotionState::MotionDiveMove => "MotionState_MotionDiveMove", + MotionState::MotionDiveDash => "MotionState_MotionDiveDash", + MotionState::MotionDiveDolphine => "MotionState_MotionDiveDolphine", + MotionState::MotionDebug => "MotionState_MotionDebug", + MotionState::MotionOceanCurrent => "MotionState_MotionOceanCurrent", + MotionState::MotionDiveSwimMove => "MotionState_MotionDiveSwimMove", + MotionState::MotionDiveSwimIdle => "MotionState_MotionDiveSwimIdle", + MotionState::MotionDiveSwimDash => "MotionState_MotionDiveSwimDash", + MotionState::MotionArcLight => "MotionState_MotionArcLight", + MotionState::MotionArcLightSafe => "MotionState_MotionArcLightSafe", + MotionState::MotionVehicleStandby => "MotionState_MotionVehicleStandby", + MotionState::MotionVehicleRun => "MotionState_MotionVehicleRun", + MotionState::MotionVehicleDash => "MotionState_MotionVehicleDash", + MotionState::MotionVehicleClimb => "MotionState_MotionVehicleClimb", + MotionState::MotionVehicleClimbJump => "MotionState_MotionVehicleClimbJump", + MotionState::MotionVehicleStandbyToClimb => { + "MotionState_MotionVehicleStandbyToClimb" } - Jknoodfaioh::MotionVehicleFight => "JKNOODFAIOH_MotionVehicleFight", - Jknoodfaioh::MotionVehicleJump => "JKNOODFAIOH_MotionVehicleJump", - Jknoodfaioh::MotionVehicleDrop => "JKNOODFAIOH_MotionVehicleDrop", - Jknoodfaioh::MotionVehicleFly => "JKNOODFAIOH_MotionVehicleFly", - Jknoodfaioh::MotionVehicleSwimMove => "JKNOODFAIOH_MotionVehicleSwimMove", - Jknoodfaioh::MotionVehicleSwimIdle => "JKNOODFAIOH_MotionVehicleSwimIdle", - Jknoodfaioh::MotionVehicleSwimDash => "JKNOODFAIOH_MotionVehicleSwimDash", - Jknoodfaioh::MotionVehicleSlip => "JKNOODFAIOH_MotionVehicleSlip", - Jknoodfaioh::MotionVehicleGoUpstairs => "JKNOODFAIOH_MotionVehicleGoUpstairs", - Jknoodfaioh::MotionVehicleFallOnGround => { - "JKNOODFAIOH_MotionVehicleFallOnGround" + MotionState::MotionVehicleFight => "MotionState_MotionVehicleFight", + MotionState::MotionVehicleJump => "MotionState_MotionVehicleJump", + MotionState::MotionVehicleDrop => "MotionState_MotionVehicleDrop", + MotionState::MotionVehicleFly => "MotionState_MotionVehicleFly", + MotionState::MotionVehicleSwimMove => "MotionState_MotionVehicleSwimMove", + MotionState::MotionVehicleSwimIdle => "MotionState_MotionVehicleSwimIdle", + MotionState::MotionVehicleSwimDash => "MotionState_MotionVehicleSwimDash", + MotionState::MotionVehicleSlip => "MotionState_MotionVehicleSlip", + MotionState::MotionVehicleGoUpstairs => "MotionState_MotionVehicleGoUpstairs", + MotionState::MotionVehicleFallOnGround => { + "MotionState_MotionVehicleFallOnGround" } - Jknoodfaioh::MotionVehicleJumpOffWall => { - "JKNOODFAIOH_MotionVehicleJumpOffWall" + MotionState::MotionVehicleJumpOffWall => { + "MotionState_MotionVehicleJumpOffWall" } - Jknoodfaioh::MotionVehiclePoweredFly => "JKNOODFAIOH_MotionVehiclePoweredFly", - Jknoodfaioh::MotionVehicleDangerStandby => { - "JKNOODFAIOH_MotionVehicleDangerStandby" + MotionState::MotionVehiclePoweredFly => "MotionState_MotionVehiclePoweredFly", + MotionState::MotionVehicleDangerStandby => { + "MotionState_MotionVehicleDangerStandby" } - Jknoodfaioh::MotionVehicleDangerRun => "JKNOODFAIOH_MotionVehicleDangerRun", - Jknoodfaioh::MotionVehicleDangerDash => "JKNOODFAIOH_MotionVehicleDangerDash", - Jknoodfaioh::MotionVehicleNotify => "JKNOODFAIOH_MotionVehicleNotify", - Jknoodfaioh::MotionVehicleLandSpeed => "JKNOODFAIOH_MotionVehicleLandSpeed", - Jknoodfaioh::MotionVehicleDashBeforeShake => { - "JKNOODFAIOH_MotionVehicleDashBeforeShake" + MotionState::MotionVehicleDangerRun => "MotionState_MotionVehicleDangerRun", + MotionState::MotionVehicleDangerDash => "MotionState_MotionVehicleDangerDash", + MotionState::MotionVehicleNotify => "MotionState_MotionVehicleNotify", + MotionState::MotionVehicleLandSpeed => "MotionState_MotionVehicleLandSpeed", + MotionState::MotionVehicleDashBeforeShake => { + "MotionState_MotionVehicleDashBeforeShake" } - Jknoodfaioh::MotionVehicleQuestForceDrag => { - "JKNOODFAIOH_MotionVehicleQuestForceDrag" + MotionState::MotionVehicleQuestForceDrag => { + "MotionState_MotionVehicleQuestForceDrag" } - Jknoodfaioh::MotionVehicleFollowRoute => { - "JKNOODFAIOH_MotionVehicleFollowRoute" + MotionState::MotionVehicleFollowRoute => { + "MotionState_MotionVehicleFollowRoute" } - Jknoodfaioh::MotionVehicleFlyIdle => "JKNOODFAIOH_MotionVehicleFlyIdle", - Jknoodfaioh::MotionVehicleFlySlow => "JKNOODFAIOH_MotionVehicleFlySlow", - Jknoodfaioh::MotionVehicleFlyFast => "JKNOODFAIOH_MotionVehicleFlyFast", - Jknoodfaioh::MotionVehicleAirCompensation => { - "JKNOODFAIOH_MotionVehicleAirCompensation" + MotionState::MotionVehicleFlyIdle => "MotionState_MotionVehicleFlyIdle", + MotionState::MotionVehicleFlySlow => "MotionState_MotionVehicleFlySlow", + MotionState::MotionVehicleFlyFast => "MotionState_MotionVehicleFlyFast", + MotionState::MotionVehicleAirCompensation => { + "MotionState_MotionVehicleAirCompensation" } - Jknoodfaioh::MotionVehicleArcLight => "JKNOODFAIOH_MotionVehicleArcLight", - Jknoodfaioh::MotionVehicleArcLightSafe => { - "JKNOODFAIOH_MotionVehicleArcLightSafe" + MotionState::MotionVehicleArcLight => "MotionState_MotionVehicleArcLight", + MotionState::MotionVehicleArcLightSafe => { + "MotionState_MotionVehicleArcLightSafe" } - Jknoodfaioh::MotionVehicleDangerSwimMove => { - "JKNOODFAIOH_MotionVehicleDangerSwimMove" + MotionState::MotionVehicleDangerSwimMove => { + "MotionState_MotionVehicleDangerSwimMove" } - Jknoodfaioh::MotionVehicleDangerSwimIdle => { - "JKNOODFAIOH_MotionVehicleDangerSwimIdle" + MotionState::MotionVehicleDangerSwimIdle => { + "MotionState_MotionVehicleDangerSwimIdle" } - Jknoodfaioh::MotionVehicleDangerSwimDash => { - "JKNOODFAIOH_MotionVehicleDangerSwimDash" + MotionState::MotionVehicleDangerSwimDash => { + "MotionState_MotionVehicleDangerSwimDash" } - Jknoodfaioh::MotionFollowCurveRoute => "JKNOODFAIOH_MotionFollowCurveRoute", - Jknoodfaioh::MotionVehicleFollowCurveRoute => { - "JKNOODFAIOH_MotionVehicleFollowCurveRoute" + MotionState::MotionFollowCurveRoute => "MotionState_MotionFollowCurveRoute", + MotionState::MotionVehicleFollowCurveRoute => { + "MotionState_MotionVehicleFollowCurveRoute" } - Jknoodfaioh::MotionNatsaurusNormal => "JKNOODFAIOH_MotionNatsaurusNormal", - Jknoodfaioh::MotionNatsaurusEntering => "JKNOODFAIOH_MotionNatsaurusEntering", - Jknoodfaioh::MotionNum => "JKNOODFAIOH_MotionNum", + MotionState::MotionNatsaurusNormal => "MotionState_MotionNatsaurusNormal", + MotionState::MotionNatsaurusEntering => "MotionState_MotionNatsaurusEntering", + MotionState::MotionNum => "MotionState_MotionNum", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { - "JKNOODFAIOH_MotionNone" => Some(Self::MotionNone), - "JKNOODFAIOH_MotionReset" => Some(Self::MotionReset), - "JKNOODFAIOH_MotionStandby" => Some(Self::MotionStandby), - "JKNOODFAIOH_MotionStandbyMove" => Some(Self::MotionStandbyMove), - "JKNOODFAIOH_MotionWalk" => Some(Self::MotionWalk), - "JKNOODFAIOH_MotionRun" => Some(Self::MotionRun), - "JKNOODFAIOH_MotionDash" => Some(Self::MotionDash), - "JKNOODFAIOH_MotionClimb" => Some(Self::MotionClimb), - "JKNOODFAIOH_MotionClimbJump" => Some(Self::MotionClimbJump), - "JKNOODFAIOH_MotionStandbyToClimb" => Some(Self::MotionStandbyToClimb), - "JKNOODFAIOH_MotionFight" => Some(Self::MotionFight), - "JKNOODFAIOH_MotionJump" => Some(Self::MotionJump), - "JKNOODFAIOH_MotionDrop" => Some(Self::MotionDrop), - "JKNOODFAIOH_MotionFly" => Some(Self::MotionFly), - "JKNOODFAIOH_MotionSwimMove" => Some(Self::MotionSwimMove), - "JKNOODFAIOH_MotionSwimIdle" => Some(Self::MotionSwimIdle), - "JKNOODFAIOH_MotionSwimDash" => Some(Self::MotionSwimDash), - "JKNOODFAIOH_MotionSwimJump" => Some(Self::MotionSwimJump), - "JKNOODFAIOH_MotionSlip" => Some(Self::MotionSlip), - "JKNOODFAIOH_MotionGoUpstairs" => Some(Self::MotionGoUpstairs), - "JKNOODFAIOH_MotionFallOnGround" => Some(Self::MotionFallOnGround), - "JKNOODFAIOH_MotionJumpUpWallForStandby" => { + "MotionState_MotionNone" => Some(Self::MotionNone), + "MotionState_MotionReset" => Some(Self::MotionReset), + "MotionState_MotionStandby" => Some(Self::MotionStandby), + "MotionState_MotionStandbyMove" => Some(Self::MotionStandbyMove), + "MotionState_MotionWalk" => Some(Self::MotionWalk), + "MotionState_MotionRun" => Some(Self::MotionRun), + "MotionState_MotionDash" => Some(Self::MotionDash), + "MotionState_MotionClimb" => Some(Self::MotionClimb), + "MotionState_MotionClimbJump" => Some(Self::MotionClimbJump), + "MotionState_MotionStandbyToClimb" => Some(Self::MotionStandbyToClimb), + "MotionState_MotionFight" => Some(Self::MotionFight), + "MotionState_MotionJump" => Some(Self::MotionJump), + "MotionState_MotionDrop" => Some(Self::MotionDrop), + "MotionState_MotionFly" => Some(Self::MotionFly), + "MotionState_MotionSwimMove" => Some(Self::MotionSwimMove), + "MotionState_MotionSwimIdle" => Some(Self::MotionSwimIdle), + "MotionState_MotionSwimDash" => Some(Self::MotionSwimDash), + "MotionState_MotionSwimJump" => Some(Self::MotionSwimJump), + "MotionState_MotionSlip" => Some(Self::MotionSlip), + "MotionState_MotionGoUpstairs" => Some(Self::MotionGoUpstairs), + "MotionState_MotionFallOnGround" => Some(Self::MotionFallOnGround), + "MotionState_MotionJumpUpWallForStandby" => { Some(Self::MotionJumpUpWallForStandby) } - "JKNOODFAIOH_MotionJumpOffWall" => Some(Self::MotionJumpOffWall), - "JKNOODFAIOH_MotionPoweredFly" => Some(Self::MotionPoweredFly), - "JKNOODFAIOH_MotionLadderIdle" => Some(Self::MotionLadderIdle), - "JKNOODFAIOH_MotionLadderMove" => Some(Self::MotionLadderMove), - "JKNOODFAIOH_MotionLadderSlip" => Some(Self::MotionLadderSlip), - "JKNOODFAIOH_MotionStandbyToLadder" => Some(Self::MotionStandbyToLadder), - "JKNOODFAIOH_MotionLadderToStandby" => Some(Self::MotionLadderToStandby), - "JKNOODFAIOH_MotionDangerStandby" => Some(Self::MotionDangerStandby), - "JKNOODFAIOH_MotionDangerStandbyMove" => Some(Self::MotionDangerStandbyMove), - "JKNOODFAIOH_MotionDangerWalk" => Some(Self::MotionDangerWalk), - "JKNOODFAIOH_MotionDangerRun" => Some(Self::MotionDangerRun), - "JKNOODFAIOH_MotionDangerDash" => Some(Self::MotionDangerDash), - "JKNOODFAIOH_MotionCrouchIdle" => Some(Self::MotionCrouchIdle), - "JKNOODFAIOH_MotionCrouchMove" => Some(Self::MotionCrouchMove), - "JKNOODFAIOH_MotionCrouchRoll" => Some(Self::MotionCrouchRoll), - "JKNOODFAIOH_MotionNotify" => Some(Self::MotionNotify), - "JKNOODFAIOH_MotionLandSpeed" => Some(Self::MotionLandSpeed), - "JKNOODFAIOH_MotionMoveFailAck" => Some(Self::MotionMoveFailAck), - "JKNOODFAIOH_MotionWaterfall" => Some(Self::MotionWaterfall), - "JKNOODFAIOH_MotionDashBeforeShake" => Some(Self::MotionDashBeforeShake), - "JKNOODFAIOH_MotionSitIdle" => Some(Self::MotionSitIdle), - "JKNOODFAIOH_MotionForceSetPos" => Some(Self::MotionForceSetPos), - "JKNOODFAIOH_MotionQuestForceDrag" => Some(Self::MotionQuestForceDrag), - "JKNOODFAIOH_MotionFollowRoute" => Some(Self::MotionFollowRoute), - "JKNOODFAIOH_MotionSkiffBoarding" => Some(Self::MotionSkiffBoarding), - "JKNOODFAIOH_MotionSkiffNormal" => Some(Self::MotionSkiffNormal), - "JKNOODFAIOH_MotionSkiffDash" => Some(Self::MotionSkiffDash), - "JKNOODFAIOH_MotionSkiffPoweredDash" => Some(Self::MotionSkiffPoweredDash), - "JKNOODFAIOH_MotionDestroyVehicle" => Some(Self::MotionDestroyVehicle), - "JKNOODFAIOH_MotionFlyIdle" => Some(Self::MotionFlyIdle), - "JKNOODFAIOH_MotionFlySlow" => Some(Self::MotionFlySlow), - "JKNOODFAIOH_MotionFlyFast" => Some(Self::MotionFlyFast), - "JKNOODFAIOH_MotionAimMove" => Some(Self::MotionAimMove), - "JKNOODFAIOH_MotionAirCompensation" => Some(Self::MotionAirCompensation), - "JKNOODFAIOH_MotionSorushNormal" => Some(Self::MotionSorushNormal), - "JKNOODFAIOH_MotionRollerCoaster" => Some(Self::MotionRollerCoaster), - "JKNOODFAIOH_MotionDiveIdle" => Some(Self::MotionDiveIdle), - "JKNOODFAIOH_MotionDiveMove" => Some(Self::MotionDiveMove), - "JKNOODFAIOH_MotionDiveDash" => Some(Self::MotionDiveDash), - "JKNOODFAIOH_MotionDiveDolphine" => Some(Self::MotionDiveDolphine), - "JKNOODFAIOH_MotionDebug" => Some(Self::MotionDebug), - "JKNOODFAIOH_MotionOceanCurrent" => Some(Self::MotionOceanCurrent), - "JKNOODFAIOH_MotionDiveSwimMove" => Some(Self::MotionDiveSwimMove), - "JKNOODFAIOH_MotionDiveSwimIdle" => Some(Self::MotionDiveSwimIdle), - "JKNOODFAIOH_MotionDiveSwimDash" => Some(Self::MotionDiveSwimDash), - "JKNOODFAIOH_MotionArcLight" => Some(Self::MotionArcLight), - "JKNOODFAIOH_MotionArcLightSafe" => Some(Self::MotionArcLightSafe), - "JKNOODFAIOH_MotionVehicleStandby" => Some(Self::MotionVehicleStandby), - "JKNOODFAIOH_MotionVehicleRun" => Some(Self::MotionVehicleRun), - "JKNOODFAIOH_MotionVehicleDash" => Some(Self::MotionVehicleDash), - "JKNOODFAIOH_MotionVehicleClimb" => Some(Self::MotionVehicleClimb), - "JKNOODFAIOH_MotionVehicleClimbJump" => Some(Self::MotionVehicleClimbJump), - "JKNOODFAIOH_MotionVehicleStandbyToClimb" => { + "MotionState_MotionJumpOffWall" => Some(Self::MotionJumpOffWall), + "MotionState_MotionPoweredFly" => Some(Self::MotionPoweredFly), + "MotionState_MotionLadderIdle" => Some(Self::MotionLadderIdle), + "MotionState_MotionLadderMove" => Some(Self::MotionLadderMove), + "MotionState_MotionLadderSlip" => Some(Self::MotionLadderSlip), + "MotionState_MotionStandbyToLadder" => Some(Self::MotionStandbyToLadder), + "MotionState_MotionLadderToStandby" => Some(Self::MotionLadderToStandby), + "MotionState_MotionDangerStandby" => Some(Self::MotionDangerStandby), + "MotionState_MotionDangerStandbyMove" => Some(Self::MotionDangerStandbyMove), + "MotionState_MotionDangerWalk" => Some(Self::MotionDangerWalk), + "MotionState_MotionDangerRun" => Some(Self::MotionDangerRun), + "MotionState_MotionDangerDash" => Some(Self::MotionDangerDash), + "MotionState_MotionCrouchIdle" => Some(Self::MotionCrouchIdle), + "MotionState_MotionCrouchMove" => Some(Self::MotionCrouchMove), + "MotionState_MotionCrouchRoll" => Some(Self::MotionCrouchRoll), + "MotionState_MotionNotify" => Some(Self::MotionNotify), + "MotionState_MotionLandSpeed" => Some(Self::MotionLandSpeed), + "MotionState_MotionMoveFailAck" => Some(Self::MotionMoveFailAck), + "MotionState_MotionWaterfall" => Some(Self::MotionWaterfall), + "MotionState_MotionDashBeforeShake" => Some(Self::MotionDashBeforeShake), + "MotionState_MotionSitIdle" => Some(Self::MotionSitIdle), + "MotionState_MotionForceSetPos" => Some(Self::MotionForceSetPos), + "MotionState_MotionQuestForceDrag" => Some(Self::MotionQuestForceDrag), + "MotionState_MotionFollowRoute" => Some(Self::MotionFollowRoute), + "MotionState_MotionSkiffBoarding" => Some(Self::MotionSkiffBoarding), + "MotionState_MotionSkiffNormal" => Some(Self::MotionSkiffNormal), + "MotionState_MotionSkiffDash" => Some(Self::MotionSkiffDash), + "MotionState_MotionSkiffPoweredDash" => Some(Self::MotionSkiffPoweredDash), + "MotionState_MotionDestroyVehicle" => Some(Self::MotionDestroyVehicle), + "MotionState_MotionFlyIdle" => Some(Self::MotionFlyIdle), + "MotionState_MotionFlySlow" => Some(Self::MotionFlySlow), + "MotionState_MotionFlyFast" => Some(Self::MotionFlyFast), + "MotionState_MotionAimMove" => Some(Self::MotionAimMove), + "MotionState_MotionAirCompensation" => Some(Self::MotionAirCompensation), + "MotionState_MotionSorushNormal" => Some(Self::MotionSorushNormal), + "MotionState_MotionRollerCoaster" => Some(Self::MotionRollerCoaster), + "MotionState_MotionDiveIdle" => Some(Self::MotionDiveIdle), + "MotionState_MotionDiveMove" => Some(Self::MotionDiveMove), + "MotionState_MotionDiveDash" => Some(Self::MotionDiveDash), + "MotionState_MotionDiveDolphine" => Some(Self::MotionDiveDolphine), + "MotionState_MotionDebug" => Some(Self::MotionDebug), + "MotionState_MotionOceanCurrent" => Some(Self::MotionOceanCurrent), + "MotionState_MotionDiveSwimMove" => Some(Self::MotionDiveSwimMove), + "MotionState_MotionDiveSwimIdle" => Some(Self::MotionDiveSwimIdle), + "MotionState_MotionDiveSwimDash" => Some(Self::MotionDiveSwimDash), + "MotionState_MotionArcLight" => Some(Self::MotionArcLight), + "MotionState_MotionArcLightSafe" => Some(Self::MotionArcLightSafe), + "MotionState_MotionVehicleStandby" => Some(Self::MotionVehicleStandby), + "MotionState_MotionVehicleRun" => Some(Self::MotionVehicleRun), + "MotionState_MotionVehicleDash" => Some(Self::MotionVehicleDash), + "MotionState_MotionVehicleClimb" => Some(Self::MotionVehicleClimb), + "MotionState_MotionVehicleClimbJump" => Some(Self::MotionVehicleClimbJump), + "MotionState_MotionVehicleStandbyToClimb" => { Some(Self::MotionVehicleStandbyToClimb) } - "JKNOODFAIOH_MotionVehicleFight" => Some(Self::MotionVehicleFight), - "JKNOODFAIOH_MotionVehicleJump" => Some(Self::MotionVehicleJump), - "JKNOODFAIOH_MotionVehicleDrop" => Some(Self::MotionVehicleDrop), - "JKNOODFAIOH_MotionVehicleFly" => Some(Self::MotionVehicleFly), - "JKNOODFAIOH_MotionVehicleSwimMove" => Some(Self::MotionVehicleSwimMove), - "JKNOODFAIOH_MotionVehicleSwimIdle" => Some(Self::MotionVehicleSwimIdle), - "JKNOODFAIOH_MotionVehicleSwimDash" => Some(Self::MotionVehicleSwimDash), - "JKNOODFAIOH_MotionVehicleSlip" => Some(Self::MotionVehicleSlip), - "JKNOODFAIOH_MotionVehicleGoUpstairs" => Some(Self::MotionVehicleGoUpstairs), - "JKNOODFAIOH_MotionVehicleFallOnGround" => { + "MotionState_MotionVehicleFight" => Some(Self::MotionVehicleFight), + "MotionState_MotionVehicleJump" => Some(Self::MotionVehicleJump), + "MotionState_MotionVehicleDrop" => Some(Self::MotionVehicleDrop), + "MotionState_MotionVehicleFly" => Some(Self::MotionVehicleFly), + "MotionState_MotionVehicleSwimMove" => Some(Self::MotionVehicleSwimMove), + "MotionState_MotionVehicleSwimIdle" => Some(Self::MotionVehicleSwimIdle), + "MotionState_MotionVehicleSwimDash" => Some(Self::MotionVehicleSwimDash), + "MotionState_MotionVehicleSlip" => Some(Self::MotionVehicleSlip), + "MotionState_MotionVehicleGoUpstairs" => Some(Self::MotionVehicleGoUpstairs), + "MotionState_MotionVehicleFallOnGround" => { Some(Self::MotionVehicleFallOnGround) } - "JKNOODFAIOH_MotionVehicleJumpOffWall" => { + "MotionState_MotionVehicleJumpOffWall" => { Some(Self::MotionVehicleJumpOffWall) } - "JKNOODFAIOH_MotionVehiclePoweredFly" => Some(Self::MotionVehiclePoweredFly), - "JKNOODFAIOH_MotionVehicleDangerStandby" => { + "MotionState_MotionVehiclePoweredFly" => Some(Self::MotionVehiclePoweredFly), + "MotionState_MotionVehicleDangerStandby" => { Some(Self::MotionVehicleDangerStandby) } - "JKNOODFAIOH_MotionVehicleDangerRun" => Some(Self::MotionVehicleDangerRun), - "JKNOODFAIOH_MotionVehicleDangerDash" => Some(Self::MotionVehicleDangerDash), - "JKNOODFAIOH_MotionVehicleNotify" => Some(Self::MotionVehicleNotify), - "JKNOODFAIOH_MotionVehicleLandSpeed" => Some(Self::MotionVehicleLandSpeed), - "JKNOODFAIOH_MotionVehicleDashBeforeShake" => { + "MotionState_MotionVehicleDangerRun" => Some(Self::MotionVehicleDangerRun), + "MotionState_MotionVehicleDangerDash" => Some(Self::MotionVehicleDangerDash), + "MotionState_MotionVehicleNotify" => Some(Self::MotionVehicleNotify), + "MotionState_MotionVehicleLandSpeed" => Some(Self::MotionVehicleLandSpeed), + "MotionState_MotionVehicleDashBeforeShake" => { Some(Self::MotionVehicleDashBeforeShake) } - "JKNOODFAIOH_MotionVehicleQuestForceDrag" => { + "MotionState_MotionVehicleQuestForceDrag" => { Some(Self::MotionVehicleQuestForceDrag) } - "JKNOODFAIOH_MotionVehicleFollowRoute" => { + "MotionState_MotionVehicleFollowRoute" => { Some(Self::MotionVehicleFollowRoute) } - "JKNOODFAIOH_MotionVehicleFlyIdle" => Some(Self::MotionVehicleFlyIdle), - "JKNOODFAIOH_MotionVehicleFlySlow" => Some(Self::MotionVehicleFlySlow), - "JKNOODFAIOH_MotionVehicleFlyFast" => Some(Self::MotionVehicleFlyFast), - "JKNOODFAIOH_MotionVehicleAirCompensation" => { + "MotionState_MotionVehicleFlyIdle" => Some(Self::MotionVehicleFlyIdle), + "MotionState_MotionVehicleFlySlow" => Some(Self::MotionVehicleFlySlow), + "MotionState_MotionVehicleFlyFast" => Some(Self::MotionVehicleFlyFast), + "MotionState_MotionVehicleAirCompensation" => { Some(Self::MotionVehicleAirCompensation) } - "JKNOODFAIOH_MotionVehicleArcLight" => Some(Self::MotionVehicleArcLight), - "JKNOODFAIOH_MotionVehicleArcLightSafe" => { + "MotionState_MotionVehicleArcLight" => Some(Self::MotionVehicleArcLight), + "MotionState_MotionVehicleArcLightSafe" => { Some(Self::MotionVehicleArcLightSafe) } - "JKNOODFAIOH_MotionVehicleDangerSwimMove" => { + "MotionState_MotionVehicleDangerSwimMove" => { Some(Self::MotionVehicleDangerSwimMove) } - "JKNOODFAIOH_MotionVehicleDangerSwimIdle" => { + "MotionState_MotionVehicleDangerSwimIdle" => { Some(Self::MotionVehicleDangerSwimIdle) } - "JKNOODFAIOH_MotionVehicleDangerSwimDash" => { + "MotionState_MotionVehicleDangerSwimDash" => { Some(Self::MotionVehicleDangerSwimDash) } - "JKNOODFAIOH_MotionFollowCurveRoute" => Some(Self::MotionFollowCurveRoute), - "JKNOODFAIOH_MotionVehicleFollowCurveRoute" => { + "MotionState_MotionFollowCurveRoute" => Some(Self::MotionFollowCurveRoute), + "MotionState_MotionVehicleFollowCurveRoute" => { Some(Self::MotionVehicleFollowCurveRoute) } - "JKNOODFAIOH_MotionNatsaurusNormal" => Some(Self::MotionNatsaurusNormal), - "JKNOODFAIOH_MotionNatsaurusEntering" => Some(Self::MotionNatsaurusEntering), - "JKNOODFAIOH_MotionNum" => Some(Self::MotionNum), + "MotionState_MotionNatsaurusNormal" => Some(Self::MotionNatsaurusNormal), + "MotionState_MotionNatsaurusEntering" => Some(Self::MotionNatsaurusEntering), + "MotionState_MotionNum" => Some(Self::MotionNum), _ => None, } } @@ -56661,7 +56661,7 @@ impl Gnancgmaina { #[derive(proto_gen::CmdID)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] -pub enum Oljmpobigni { +pub enum CombatTypeArgument { CombatNone = 0, CombatEvtBeingHit = 1, CombatAnimatorStateChanged = 2, @@ -56686,80 +56686,126 @@ pub enum Oljmpobigni { CombatMultiOverrideAnim = 21, CombatDebugSyncMotion = 22, } -impl Oljmpobigni { +impl CombatTypeArgument { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Oljmpobigni::CombatNone => "OLJMPOBIGNI_CombatNone", - Oljmpobigni::CombatEvtBeingHit => "OLJMPOBIGNI_CombatEvtBeingHit", - Oljmpobigni::CombatAnimatorStateChanged => { - "OLJMPOBIGNI_CombatAnimatorStateChanged" + CombatTypeArgument::CombatNone => "CombatTypeArgument_CombatNone", + CombatTypeArgument::CombatEvtBeingHit => { + "CombatTypeArgument_CombatEvtBeingHit" } - Oljmpobigni::CombatFaceToDir => "OLJMPOBIGNI_CombatFaceToDir", - Oljmpobigni::CombatSetAttackTarget => "OLJMPOBIGNI_CombatSetAttackTarget", - Oljmpobigni::CombatRushMove => "OLJMPOBIGNI_CombatRushMove", - Oljmpobigni::CombatAnimatorParameterChanged => { - "OLJMPOBIGNI_CombatAnimatorParameterChanged" + CombatTypeArgument::CombatAnimatorStateChanged => { + "CombatTypeArgument_CombatAnimatorStateChanged" } - Oljmpobigni::EntityMove => "OLJMPOBIGNI_EntityMove", - Oljmpobigni::SyncEntityPosition => "OLJMPOBIGNI_SyncEntityPosition", - Oljmpobigni::CombatSteerMotionInfo => "OLJMPOBIGNI_CombatSteerMotionInfo", - Oljmpobigni::CombatForceSetPosInfo => "OLJMPOBIGNI_CombatForceSetPosInfo", - Oljmpobigni::CombatCompensatePosDiff => "OLJMPOBIGNI_CombatCompensatePosDiff", - Oljmpobigni::CombatMonsterDoBlink => "OLJMPOBIGNI_CombatMonsterDoBlink", - Oljmpobigni::CombatFixedRushMove => "OLJMPOBIGNI_CombatFixedRushMove", - Oljmpobigni::CombatSyncTransform => "OLJMPOBIGNI_CombatSyncTransform", - Oljmpobigni::CombatLightCoreMove => "OLJMPOBIGNI_CombatLightCoreMove", - Oljmpobigni::CombatBeingHealedNtf => "OLJMPOBIGNI_CombatBeingHealedNtf", - Oljmpobigni::CombatSkillAnchorPositionNtf => { - "OLJMPOBIGNI_CombatSkillAnchorPositionNtf" + CombatTypeArgument::CombatFaceToDir => "CombatTypeArgument_CombatFaceToDir", + CombatTypeArgument::CombatSetAttackTarget => { + "CombatTypeArgument_CombatSetAttackTarget" } - Oljmpobigni::CombatGrapplingHookMove => "OLJMPOBIGNI_CombatGrapplingHookMove", - Oljmpobigni::CombatSpecialMotionInfo => "OLJMPOBIGNI_CombatSpecialMotionInfo", - Oljmpobigni::CombatFixedAvatarFlashMove => { - "OLJMPOBIGNI_CombatFixedAvatarFlashMove" + CombatTypeArgument::CombatRushMove => "CombatTypeArgument_CombatRushMove", + CombatTypeArgument::CombatAnimatorParameterChanged => { + "CombatTypeArgument_CombatAnimatorParameterChanged" + } + CombatTypeArgument::EntityMove => "CombatTypeArgument_EntityMove", + CombatTypeArgument::SyncEntityPosition => { + "CombatTypeArgument_SyncEntityPosition" + } + CombatTypeArgument::CombatSteerMotionInfo => { + "CombatTypeArgument_CombatSteerMotionInfo" + } + CombatTypeArgument::CombatForceSetPosInfo => { + "CombatTypeArgument_CombatForceSetPosInfo" + } + CombatTypeArgument::CombatCompensatePosDiff => { + "CombatTypeArgument_CombatCompensatePosDiff" + } + CombatTypeArgument::CombatMonsterDoBlink => { + "CombatTypeArgument_CombatMonsterDoBlink" + } + CombatTypeArgument::CombatFixedRushMove => { + "CombatTypeArgument_CombatFixedRushMove" + } + CombatTypeArgument::CombatSyncTransform => { + "CombatTypeArgument_CombatSyncTransform" + } + CombatTypeArgument::CombatLightCoreMove => { + "CombatTypeArgument_CombatLightCoreMove" + } + CombatTypeArgument::CombatBeingHealedNtf => { + "CombatTypeArgument_CombatBeingHealedNtf" + } + CombatTypeArgument::CombatSkillAnchorPositionNtf => { + "CombatTypeArgument_CombatSkillAnchorPositionNtf" + } + CombatTypeArgument::CombatGrapplingHookMove => { + "CombatTypeArgument_CombatGrapplingHookMove" + } + CombatTypeArgument::CombatSpecialMotionInfo => { + "CombatTypeArgument_CombatSpecialMotionInfo" + } + CombatTypeArgument::CombatFixedAvatarFlashMove => { + "CombatTypeArgument_CombatFixedAvatarFlashMove" + } + CombatTypeArgument::CombatMultiOverrideAnim => { + "CombatTypeArgument_CombatMultiOverrideAnim" + } + CombatTypeArgument::CombatDebugSyncMotion => { + "CombatTypeArgument_CombatDebugSyncMotion" } - Oljmpobigni::CombatMultiOverrideAnim => "OLJMPOBIGNI_CombatMultiOverrideAnim", - Oljmpobigni::CombatDebugSyncMotion => "OLJMPOBIGNI_CombatDebugSyncMotion", } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { - "OLJMPOBIGNI_CombatNone" => Some(Self::CombatNone), - "OLJMPOBIGNI_CombatEvtBeingHit" => Some(Self::CombatEvtBeingHit), - "OLJMPOBIGNI_CombatAnimatorStateChanged" => { + "CombatTypeArgument_CombatNone" => Some(Self::CombatNone), + "CombatTypeArgument_CombatEvtBeingHit" => Some(Self::CombatEvtBeingHit), + "CombatTypeArgument_CombatAnimatorStateChanged" => { Some(Self::CombatAnimatorStateChanged) } - "OLJMPOBIGNI_CombatFaceToDir" => Some(Self::CombatFaceToDir), - "OLJMPOBIGNI_CombatSetAttackTarget" => Some(Self::CombatSetAttackTarget), - "OLJMPOBIGNI_CombatRushMove" => Some(Self::CombatRushMove), - "OLJMPOBIGNI_CombatAnimatorParameterChanged" => { + "CombatTypeArgument_CombatFaceToDir" => Some(Self::CombatFaceToDir), + "CombatTypeArgument_CombatSetAttackTarget" => { + Some(Self::CombatSetAttackTarget) + } + "CombatTypeArgument_CombatRushMove" => Some(Self::CombatRushMove), + "CombatTypeArgument_CombatAnimatorParameterChanged" => { Some(Self::CombatAnimatorParameterChanged) } - "OLJMPOBIGNI_EntityMove" => Some(Self::EntityMove), - "OLJMPOBIGNI_SyncEntityPosition" => Some(Self::SyncEntityPosition), - "OLJMPOBIGNI_CombatSteerMotionInfo" => Some(Self::CombatSteerMotionInfo), - "OLJMPOBIGNI_CombatForceSetPosInfo" => Some(Self::CombatForceSetPosInfo), - "OLJMPOBIGNI_CombatCompensatePosDiff" => Some(Self::CombatCompensatePosDiff), - "OLJMPOBIGNI_CombatMonsterDoBlink" => Some(Self::CombatMonsterDoBlink), - "OLJMPOBIGNI_CombatFixedRushMove" => Some(Self::CombatFixedRushMove), - "OLJMPOBIGNI_CombatSyncTransform" => Some(Self::CombatSyncTransform), - "OLJMPOBIGNI_CombatLightCoreMove" => Some(Self::CombatLightCoreMove), - "OLJMPOBIGNI_CombatBeingHealedNtf" => Some(Self::CombatBeingHealedNtf), - "OLJMPOBIGNI_CombatSkillAnchorPositionNtf" => { + "CombatTypeArgument_EntityMove" => Some(Self::EntityMove), + "CombatTypeArgument_SyncEntityPosition" => Some(Self::SyncEntityPosition), + "CombatTypeArgument_CombatSteerMotionInfo" => { + Some(Self::CombatSteerMotionInfo) + } + "CombatTypeArgument_CombatForceSetPosInfo" => { + Some(Self::CombatForceSetPosInfo) + } + "CombatTypeArgument_CombatCompensatePosDiff" => { + Some(Self::CombatCompensatePosDiff) + } + "CombatTypeArgument_CombatMonsterDoBlink" => Some(Self::CombatMonsterDoBlink), + "CombatTypeArgument_CombatFixedRushMove" => Some(Self::CombatFixedRushMove), + "CombatTypeArgument_CombatSyncTransform" => Some(Self::CombatSyncTransform), + "CombatTypeArgument_CombatLightCoreMove" => Some(Self::CombatLightCoreMove), + "CombatTypeArgument_CombatBeingHealedNtf" => Some(Self::CombatBeingHealedNtf), + "CombatTypeArgument_CombatSkillAnchorPositionNtf" => { Some(Self::CombatSkillAnchorPositionNtf) } - "OLJMPOBIGNI_CombatGrapplingHookMove" => Some(Self::CombatGrapplingHookMove), - "OLJMPOBIGNI_CombatSpecialMotionInfo" => Some(Self::CombatSpecialMotionInfo), - "OLJMPOBIGNI_CombatFixedAvatarFlashMove" => { + "CombatTypeArgument_CombatGrapplingHookMove" => { + Some(Self::CombatGrapplingHookMove) + } + "CombatTypeArgument_CombatSpecialMotionInfo" => { + Some(Self::CombatSpecialMotionInfo) + } + "CombatTypeArgument_CombatFixedAvatarFlashMove" => { Some(Self::CombatFixedAvatarFlashMove) } - "OLJMPOBIGNI_CombatMultiOverrideAnim" => Some(Self::CombatMultiOverrideAnim), - "OLJMPOBIGNI_CombatDebugSyncMotion" => Some(Self::CombatDebugSyncMotion), + "CombatTypeArgument_CombatMultiOverrideAnim" => { + Some(Self::CombatMultiOverrideAnim) + } + "CombatTypeArgument_CombatDebugSyncMotion" => { + Some(Self::CombatDebugSyncMotion) + } _ => None, } } @@ -57035,7 +57081,7 @@ impl Mahoijmplad { #[derive(proto_gen::CmdID)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] -pub enum Oficgkjhdjo { +pub enum ForwardType { ForwardLocal = 0, ForwardToAll = 1, ForwardToAllExceptCur = 2, @@ -57046,38 +57092,38 @@ pub enum Oficgkjhdjo { ForwardOnlyServer = 7, ForwardToAllExistExceptCur = 8, } -impl Oficgkjhdjo { +impl ForwardType { /// String value of the enum field names used in the ProtoBuf definition. /// /// The values are not transformed in any way and thus are considered stable /// (if the ProtoBuf definition does not change) and safe for programmatic use. pub fn as_str_name(&self) -> &'static str { match self { - Oficgkjhdjo::ForwardLocal => "OFICGKJHDJO_ForwardLocal", - Oficgkjhdjo::ForwardToAll => "OFICGKJHDJO_ForwardToAll", - Oficgkjhdjo::ForwardToAllExceptCur => "OFICGKJHDJO_ForwardToAllExceptCur", - Oficgkjhdjo::ForwardToHost => "OFICGKJHDJO_ForwardToHost", - Oficgkjhdjo::ForwardToAllGuest => "OFICGKJHDJO_ForwardToAllGuest", - Oficgkjhdjo::ForwardToPeer => "OFICGKJHDJO_ForwardToPeer", - Oficgkjhdjo::ForwardToPeers => "OFICGKJHDJO_ForwardToPeers", - Oficgkjhdjo::ForwardOnlyServer => "OFICGKJHDJO_ForwardOnlyServer", - Oficgkjhdjo::ForwardToAllExistExceptCur => { - "OFICGKJHDJO_ForwardToAllExistExceptCur" + ForwardType::ForwardLocal => "ForwardType_ForwardLocal", + ForwardType::ForwardToAll => "ForwardType_ForwardToAll", + ForwardType::ForwardToAllExceptCur => "ForwardType_ForwardToAllExceptCur", + ForwardType::ForwardToHost => "ForwardType_ForwardToHost", + ForwardType::ForwardToAllGuest => "ForwardType_ForwardToAllGuest", + ForwardType::ForwardToPeer => "ForwardType_ForwardToPeer", + ForwardType::ForwardToPeers => "ForwardType_ForwardToPeers", + ForwardType::ForwardOnlyServer => "ForwardType_ForwardOnlyServer", + ForwardType::ForwardToAllExistExceptCur => { + "ForwardType_ForwardToAllExistExceptCur" } } } /// Creates an enum from field names used in the ProtoBuf definition. pub fn from_str_name(value: &str) -> ::core::option::Option { match value { - "OFICGKJHDJO_ForwardLocal" => Some(Self::ForwardLocal), - "OFICGKJHDJO_ForwardToAll" => Some(Self::ForwardToAll), - "OFICGKJHDJO_ForwardToAllExceptCur" => Some(Self::ForwardToAllExceptCur), - "OFICGKJHDJO_ForwardToHost" => Some(Self::ForwardToHost), - "OFICGKJHDJO_ForwardToAllGuest" => Some(Self::ForwardToAllGuest), - "OFICGKJHDJO_ForwardToPeer" => Some(Self::ForwardToPeer), - "OFICGKJHDJO_ForwardToPeers" => Some(Self::ForwardToPeers), - "OFICGKJHDJO_ForwardOnlyServer" => Some(Self::ForwardOnlyServer), - "OFICGKJHDJO_ForwardToAllExistExceptCur" => { + "ForwardType_ForwardLocal" => Some(Self::ForwardLocal), + "ForwardType_ForwardToAll" => Some(Self::ForwardToAll), + "ForwardType_ForwardToAllExceptCur" => Some(Self::ForwardToAllExceptCur), + "ForwardType_ForwardToHost" => Some(Self::ForwardToHost), + "ForwardType_ForwardToAllGuest" => Some(Self::ForwardToAllGuest), + "ForwardType_ForwardToPeer" => Some(Self::ForwardToPeer), + "ForwardType_ForwardToPeers" => Some(Self::ForwardToPeers), + "ForwardType_ForwardOnlyServer" => Some(Self::ForwardOnlyServer), + "ForwardType_ForwardToAllExistExceptCur" => { Some(Self::ForwardToAllExistExceptCur) } _ => None,