Teleport via map marks

This commit is contained in:
xeon 2024-04-11 19:57:50 +03:00
parent b9631c1442
commit 5ead0fb3be
11 changed files with 191 additions and 137 deletions

View file

@ -1,24 +1,22 @@
use proto::*; use proto::*;
use super::*; use super::*;
use crate::{ use crate::{data, game::AvatarData, util};
data,
game::{constants, AvatarData},
util,
};
pub struct SceneAvatar { pub struct SceneAvatar {
data: AvatarData, data: AvatarData,
weapon: SceneWeapon, weapon: SceneWeapon,
entity_id: u32, entity_id: u32,
pos: Vector,
} }
impl SceneAvatar { impl SceneAvatar {
pub fn new(id: u32, data: AvatarData, weapon: SceneWeapon) -> Self { pub fn new(id: u32, data: AvatarData, weapon: SceneWeapon, pos: Vector) -> Self {
Self { Self {
data, data,
weapon, weapon,
entity_id: calc_entity_id(id, ProtEntityType::ProtEntityAvatar), entity_id: calc_entity_id(id, ProtEntityType::ProtEntityAvatar),
pos,
} }
} }
@ -85,7 +83,11 @@ impl SceneAvatar {
impl Entity for SceneAvatar { impl Entity for SceneAvatar {
fn get_position(&self) -> Vector { fn get_position(&self) -> Vector {
constants::INITIAL_POS.clone() self.pos.clone()
}
fn set_position(&mut self, pos: Vector) {
self.pos = pos
} }
fn get_entity_id(&self) -> u32 { fn get_entity_id(&self) -> u32 {

View file

@ -8,6 +8,7 @@ pub use weapon::SceneWeapon;
pub trait Entity { pub trait Entity {
fn get_position(&self) -> Vector; fn get_position(&self) -> Vector;
fn set_position(&mut self, pos: Vector);
fn get_entity_id(&self) -> u32; fn get_entity_id(&self) -> u32;
fn get_entity_type(&self) -> ProtEntityType; fn get_entity_type(&self) -> ProtEntityType;
fn info(&self) -> SceneEntityInfo; fn info(&self) -> SceneEntityInfo;

View file

@ -44,6 +44,8 @@ impl Entity for SceneWeapon {
Vector::default() Vector::default()
} }
fn set_position(&mut self, _pos: Vector) {}
fn get_entity_id(&self) -> u32 { fn get_entity_id(&self) -> u32 {
self.entity_id self.entity_id
} }

View file

@ -2,16 +2,19 @@ use std::sync::atomic::{AtomicU32, Ordering};
use anyhow::Result; use anyhow::Result;
use proto::*; use proto::*;
use rand::RngCore;
use super::{ use super::{
constants,
entity::{Entity, SceneAvatar, SceneWeapon}, entity::{Entity, SceneAvatar, SceneWeapon},
AvatarData, AvatarData,
}; };
use crate::net::PlayerSession; use crate::{net::PlayerSession, util};
pub struct Scene { pub struct Scene {
id: u32, id: u32,
entity_id_counter: AtomicU32, entity_id_counter: AtomicU32,
last_player_pos: Vector,
pub avatars: Vec<SceneAvatar>, pub avatars: Vec<SceneAvatar>,
pub cur_entity_id: u32, pub cur_entity_id: u32,
} }
@ -20,6 +23,7 @@ impl Scene {
pub fn new(id: u32) -> Self { pub fn new(id: u32) -> Self {
Self { Self {
id, id,
last_player_pos: constants::INITIAL_POS.clone(),
entity_id_counter: AtomicU32::new(0), entity_id_counter: AtomicU32::new(0),
avatars: Vec::new(), avatars: Vec::new(),
cur_entity_id: 0, cur_entity_id: 0,
@ -37,8 +41,53 @@ impl Scene {
pub fn add_avatar(&mut self, data: AvatarData) { pub fn add_avatar(&mut self, data: AvatarData) {
let weapon = SceneWeapon::new(self.next_entity_id(), data.weapon.clone()); let weapon = SceneWeapon::new(self.next_entity_id(), data.weapon.clone());
self.avatars self.avatars.push(SceneAvatar::new(
.push(SceneAvatar::new(self.next_entity_id(), data, weapon)); self.next_entity_id(),
data,
weapon,
self.cur_player_pos(),
));
}
pub fn cur_player_pos(&self) -> Vector {
if let Some(avatar) = self
.avatars
.iter()
.find(|a| a.get_entity_id() == self.cur_entity_id)
{
avatar.get_position()
} else {
self.last_player_pos.clone()
}
}
pub fn teleport(&mut self, to_pos: &Vector) {
self.last_player_pos = to_pos.clone();
for avatar in self.avatars.iter_mut() {
avatar.set_position(self.last_player_pos.clone())
}
}
pub async fn enter(&mut self, session: &PlayerSession, enter_type: EnterType) -> Result<()> {
let begin_time_ms = util::cur_timestamp_ms();
let begin_time = begin_time_ms / 1000;
let scene_id = self.id;
let player_uid = session.player_uid();
let enter_scene = PlayerEnterSceneNotify {
scene_begin_time: begin_time_ms,
scene_id,
enter_scene_token: rand::thread_rng().next_u32() % 65535,
scene_transaction: format!("{scene_id}-{player_uid}-{begin_time}-179398"),
pos: Some(self.last_player_pos.clone()),
prev_pos: Some(Vector::default()),
target_uid: player_uid,
r#type: enter_type.into(),
..Default::default()
};
session.send(PLAYER_ENTER_SCENE_NOTIFY, enter_scene).await
} }
pub async fn sync_scene_team(&self, session: &PlayerSession) -> Result<()> { pub async fn sync_scene_team(&self, session: &PlayerSession) -> Result<()> {

View file

@ -5,7 +5,9 @@ use rand::RngCore;
use super::*; use super::*;
use crate::{ use crate::{
data::EXCEL_COLLECTION, game::{constants, entity::Entity, prop_types::*}, util data::EXCEL_COLLECTION,
game::{entity::Entity, prop_types::*},
util,
}; };
pub async fn on_get_player_token_req( pub async fn on_get_player_token_req(
@ -37,9 +39,6 @@ pub async fn on_get_player_token_req(
pub async fn on_player_login_req(session: &PlayerSession, _body: &PlayerLoginReq) -> Result<()> { pub async fn on_player_login_req(session: &PlayerSession, _body: &PlayerLoginReq) -> Result<()> {
session.player_info_mut().unlock_all_avatars(); session.player_info_mut().unlock_all_avatars();
let login_time_ms = util::cur_timestamp_ms();
let login_time = login_time_ms / 1000;
let props = [ let props = [
(PROP_PLAYER_LEVEL, 5), (PROP_PLAYER_LEVEL, 5),
(PROP_IS_FLYABLE, 1), (PROP_IS_FLYABLE, 1),
@ -74,7 +73,8 @@ pub async fn on_player_login_req(session: &PlayerSession, _body: &PlayerLoginReq
.send( .send(
OPEN_STATE_UPDATE_NOTIFY, OPEN_STATE_UPDATE_NOTIFY,
OpenStateUpdateNotify { OpenStateUpdateNotify {
open_state_map: EXCEL_COLLECTION.open_state_configs open_state_map: EXCEL_COLLECTION
.open_state_configs
.iter() .iter()
.map(|op| (op.id, 1)) .map(|op| (op.id, 1))
.collect(), .collect(),
@ -110,7 +110,6 @@ pub async fn on_player_login_req(session: &PlayerSession, _body: &PlayerLoginReq
session.send(AVATAR_DATA_NOTIFY, avatar_data_notify).await?; session.send(AVATAR_DATA_NOTIFY, avatar_data_notify).await?;
{
let mut scene = session.context.scene.borrow_mut(); let mut scene = session.context.scene.borrow_mut();
let player = session.player_info(); let player = session.player_info();
@ -123,26 +122,8 @@ pub async fn on_player_login_req(session: &PlayerSession, _body: &PlayerLoginReq
.clone(), .clone(),
); );
scene.cur_entity_id = scene.avatars.first().unwrap().get_entity_id() scene.cur_entity_id = scene.avatars.first().unwrap().get_entity_id();
} scene.enter(session, EnterType::EnterSelf).await?;
let scene = session.context.scene.borrow();
let scene_id = scene.id();
let player_uid = session.player_uid();
let enter_scene = PlayerEnterSceneNotify {
scene_begin_time: 7313,
scene_id,
enter_scene_token: 15771,
scene_transaction: format!("{scene_id}-{player_uid}-{login_time}-179398"),
scene_tag_id_list: Vec::new(),
pos: Some(constants::INITIAL_POS.clone()),
prev_pos: Some(Vector::default()),
target_uid: player_uid,
r#type: EnterType::EnterSelf.into(),
..Default::default()
};
session.send(PLAYER_ENTER_SCENE_NOTIFY, enter_scene).await?;
session session
.send( .send(

View file

@ -0,0 +1,14 @@
use super::*;
pub async fn on_mark_map_req(session: &PlayerSession, body: &MarkMapReq) -> Result<()> {
if let Some(mark) = body.mark.as_ref() {
let mut scene = session.context.scene.borrow_mut();
let mut pos = mark.pos.clone().unwrap();
pos.y = 500.0;
scene.teleport(&pos);
scene.enter(session, EnterType::EnterJump).await?;
}
session.send(MARK_MAP_RSP, MarkMapRsp::default()).await
}

View file

@ -1,11 +1,13 @@
mod authentication; mod authentication;
mod avatar; mod avatar;
mod map;
mod time; mod time;
mod world; mod world;
use anyhow::Result; use anyhow::Result;
pub use authentication::*; pub use authentication::*;
pub use avatar::*; pub use avatar::*;
pub use map::*;
use proto::*; use proto::*;
pub use time::*; pub use time::*;
pub use world::*; pub use world::*;

View file

@ -136,4 +136,5 @@ trait_handler! {
ChangeAvatarReq 3330; ChangeAvatarReq 3330;
EvtAvatarSitDownReq 764; EvtAvatarSitDownReq 764;
EvtAvatarStandUpNotify 8549; EvtAvatarStandUpNotify 8549;
MarkMapReq 7802;
} }

View file

@ -11,16 +11,16 @@ pub struct Ofcnfieofjd {
/// CmdId: 7802 /// CmdId: 7802
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Lejfdkbfmgo { pub struct MarkMapReq {
#[prost(message, optional, tag = "4")] #[prost(message, optional, tag = "4")]
pub leeiienppam: ::core::option::Option<Nglnpheglgn>, pub mark: ::core::option::Option<MapMarkPoint>,
#[prost(message, optional, tag = "2")] #[prost(message, optional, tag = "2")]
pub igcjmcbldjg: ::core::option::Option<Nglnpheglgn>, pub old: ::core::option::Option<MapMarkPoint>,
#[prost(enumeration = "lejfdkbfmgo::Ebneiedplpg", tag = "11")] #[prost(enumeration = "mark_map_req::Operation", tag = "11")]
pub gfokgkdiiph: i32, pub op: i32,
} }
/// Nested message and enum types in `LEJFDKBFMGO`. /// Nested message and enum types in `MarkMapReq`.
pub mod lejfdkbfmgo { pub mod mark_map_req {
#[derive( #[derive(
Clone, Clone,
Copy, Copy,
@ -33,32 +33,32 @@ pub mod lejfdkbfmgo {
::prost::Enumeration ::prost::Enumeration
)] )]
#[repr(i32)] #[repr(i32)]
pub enum Ebneiedplpg { pub enum Operation {
Add = 0, Add = 0,
Mod = 1, Mod = 1,
Del = 2, Del = 2,
Get = 3, Get = 3,
} }
impl Ebneiedplpg { impl Operation {
/// String value of the enum field names used in the ProtoBuf definition. /// 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 /// 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. /// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str { pub fn as_str_name(&self) -> &'static str {
match self { match self {
Ebneiedplpg::Add => "EBNEIEDPLPG_Add", Operation::Add => "Operation_Add",
Ebneiedplpg::Mod => "EBNEIEDPLPG_Mod", Operation::Mod => "Operation_Mod",
Ebneiedplpg::Del => "EBNEIEDPLPG_Del", Operation::Del => "Operation_Del",
Ebneiedplpg::Get => "EBNEIEDPLPG_Get", Operation::Get => "Operation_Get",
} }
} }
/// Creates an enum from field names used in the ProtoBuf definition. /// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value { match value {
"EBNEIEDPLPG_Add" => Some(Self::Add), "Operation_Add" => Some(Self::Add),
"EBNEIEDPLPG_Mod" => Some(Self::Mod), "Operation_Mod" => Some(Self::Mod),
"EBNEIEDPLPG_Del" => Some(Self::Del), "Operation_Del" => Some(Self::Del),
"EBNEIEDPLPG_Get" => Some(Self::Get), "Operation_Get" => Some(Self::Get),
_ => None, _ => None,
} }
} }
@ -897,7 +897,7 @@ pub struct Lbhkijoadff {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Jfehnaejhal { pub struct Jfehnaejhal {
#[prost(message, optional, tag = "8")] #[prost(message, optional, tag = "8")]
pub gfokgkdiiph: ::core::option::Option<Dhiiiggagmk>, pub op: ::core::option::Option<Dhiiiggagmk>,
#[prost(uint32, tag = "14")] #[prost(uint32, tag = "14")]
pub bbhadchkhpo: u32, pub bbhadchkhpo: u32,
#[prost(uint32, tag = "6")] #[prost(uint32, tag = "6")]
@ -1657,7 +1657,7 @@ pub struct Cioinleeemn {
#[prost(message, optional, tag = "9")] #[prost(message, optional, tag = "9")]
pub entity: ::core::option::Option<Jchhiaoepko>, pub entity: ::core::option::Option<Jchhiaoepko>,
#[prost(uint32, tag = "4")] #[prost(uint32, tag = "4")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "2")] #[prost(uint32, tag = "2")]
pub parent_quest_id: u32, pub parent_quest_id: u32,
#[prost(bool, tag = "12")] #[prost(bool, tag = "12")]
@ -1889,7 +1889,7 @@ pub mod liflookhepo {
#[prost(bool, tag = "2")] #[prost(bool, tag = "2")]
pub knelagpemhm: bool, pub knelagpemhm: bool,
#[prost(uint32, tag = "12")] #[prost(uint32, tag = "12")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "13")] #[prost(uint32, tag = "13")]
pub mjlibgicacg: u32, pub mjlibgicacg: u32,
} }
@ -2893,7 +2893,7 @@ pub struct AvatarEnterSceneInfo {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Gndfiidbgmp { pub struct Gndfiidbgmp {
#[prost(uint32, tag = "11")] #[prost(uint32, tag = "11")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "8")] #[prost(uint32, tag = "8")]
pub entity_id: u32, pub entity_id: u32,
#[prost(uint32, tag = "3")] #[prost(uint32, tag = "3")]
@ -4554,7 +4554,7 @@ pub struct Odgpempeeml {}
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ioandanhmjl { pub struct Ioandanhmjl {
#[prost(uint32, tag = "5")] #[prost(uint32, tag = "5")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "13")] #[prost(uint32, tag = "13")]
pub state: u32, pub state: u32,
#[prost(uint32, tag = "10")] #[prost(uint32, tag = "10")]
@ -7658,7 +7658,7 @@ pub struct Mhjfbnaniha {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Kijebomljgi { pub struct Kijebomljgi {
#[prost(uint32, tag = "10")] #[prost(uint32, tag = "10")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -9906,7 +9906,7 @@ pub struct Cjpkmhnbijb {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hiipehiplhj { pub struct Hiipehiplhj {
#[prost(uint32, tag = "11")] #[prost(uint32, tag = "11")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -10639,7 +10639,7 @@ pub struct Ngjmlhicoll {
#[prost(uint32, repeated, tag = "15")] #[prost(uint32, repeated, tag = "15")]
pub apkobinehkb: ::prost::alloc::vec::Vec<u32>, pub apkobinehkb: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "13")] #[prost(uint32, tag = "13")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -11161,7 +11161,7 @@ pub struct Aedbjmepaba {
#[prost(enumeration = "aedbjmepaba::Adpedjjijdd", tag = "11")] #[prost(enumeration = "aedbjmepaba::Adpedjjijdd", tag = "11")]
pub state: i32, pub state: i32,
#[prost(uint32, tag = "14")] #[prost(uint32, tag = "14")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "2")] #[prost(uint32, tag = "2")]
pub omeiljenicn: u32, pub omeiljenicn: u32,
#[prost(uint32, tag = "7")] #[prost(uint32, tag = "7")]
@ -11354,7 +11354,7 @@ pub struct Kakehjmiglh {
#[prost(bool, tag = "12")] #[prost(bool, tag = "12")]
pub gflglppegjk: bool, pub gflglppegjk: bool,
#[prost(uint32, tag = "10")] #[prost(uint32, tag = "10")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "6")] #[prost(uint32, tag = "6")]
pub phkohddafpa: u32, pub phkohddafpa: u32,
} }
@ -11369,7 +11369,7 @@ pub struct Fimhcnhplhd {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Hjeadllmbbc { pub struct Hjeadllmbbc {
#[prost(message, optional, tag = "1")] #[prost(message, optional, tag = "1")]
pub leeiienppam: ::core::option::Option<Pcoldcbnbbg>, pub mark: ::core::option::Option<Pcoldcbnbbg>,
} }
/// CmdId: 7902 /// CmdId: 7902
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -12436,7 +12436,7 @@ pub struct Lbohlcbepfl {
#[prost(uint32, repeated, tag = "13")] #[prost(uint32, repeated, tag = "13")]
pub kfgbjkgenfi: ::prost::alloc::vec::Vec<u32>, pub kfgbjkgenfi: ::prost::alloc::vec::Vec<u32>,
#[prost(message, repeated, tag = "12")] #[prost(message, repeated, tag = "12")]
pub jfboglilobd: ::prost::alloc::vec::Vec<Pcoldcbnbbg>, pub mark_list: ::prost::alloc::vec::Vec<Pcoldcbnbbg>,
#[prost(bool, tag = "10")] #[prost(bool, tag = "10")]
pub abjicjkehah: bool, pub abjicjkehah: bool,
#[prost(bool, tag = "15")] #[prost(bool, tag = "15")]
@ -12485,7 +12485,7 @@ pub struct Ecackgngdhj {
#[prost(uint32, repeated, tag = "2")] #[prost(uint32, repeated, tag = "2")]
pub djhgadgnhno: ::prost::alloc::vec::Vec<u32>, pub djhgadgnhno: ::prost::alloc::vec::Vec<u32>,
#[prost(uint32, tag = "5")] #[prost(uint32, tag = "5")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
/// CmdId: 23261 /// CmdId: 23261
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -12906,7 +12906,7 @@ pub struct Iheaahkbchn {
#[prost(int32, tag = "13")] #[prost(int32, tag = "13")]
pub retcode: i32, pub retcode: i32,
#[prost(enumeration = "Cpmhcibnkmj", tag = "5")] #[prost(enumeration = "Cpmhcibnkmj", tag = "5")]
pub gfokgkdiiph: i32, pub op: i32,
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -13940,7 +13940,7 @@ pub struct Klbpjpiiijp {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Chgengfloag { pub struct Chgengfloag {
#[prost(uint32, tag = "3")] #[prost(uint32, tag = "3")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "4")] #[prost(uint32, tag = "4")]
pub nohiaaphhkf: u32, pub nohiaaphhkf: u32,
#[prost(uint32, tag = "5")] #[prost(uint32, tag = "5")]
@ -14447,7 +14447,7 @@ pub struct Gdjlgibbiih {
#[prost(message, repeated, tag = "6")] #[prost(message, repeated, tag = "6")]
pub eniaoadffpi: ::prost::alloc::vec::Vec<Bnfbjeajcko>, pub eniaoadffpi: ::prost::alloc::vec::Vec<Bnfbjeajcko>,
#[prost(uint32, tag = "5")] #[prost(uint32, tag = "5")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(bool, tag = "1")] #[prost(bool, tag = "1")]
pub pfnlioenalo: bool, pub pfnlioenalo: bool,
#[prost(bool, tag = "3")] #[prost(bool, tag = "3")]
@ -14916,7 +14916,7 @@ pub struct Hhmppapdmkg {
#[prost(uint32, tag = "5")] #[prost(uint32, tag = "5")]
pub entity_id: u32, pub entity_id: u32,
#[prost(uint32, tag = "12")] #[prost(uint32, tag = "12")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
/// CmdId: 24087 /// CmdId: 24087
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -15019,7 +15019,7 @@ pub struct Kanbpggkemd {
#[prost(uint32, tag = "7")] #[prost(uint32, tag = "7")]
pub jjgeokjgeej: u32, pub jjgeokjgeej: u32,
#[prost(enumeration = "Cpmhcibnkmj", tag = "14")] #[prost(enumeration = "Cpmhcibnkmj", tag = "14")]
pub gfokgkdiiph: i32, pub op: i32,
} }
/// CmdId: 21626 /// CmdId: 21626
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -17571,7 +17571,7 @@ pub struct Hhhcenhoddn {
#[prost(int32, tag = "7")] #[prost(int32, tag = "7")]
pub retcode: i32, pub retcode: i32,
#[prost(uint32, tag = "12")] #[prost(uint32, tag = "12")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -18501,9 +18501,9 @@ pub struct Omggbmjfkpe {
/// CmdId: 25569 /// CmdId: 25569
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Kpdddliagai { pub struct MarkMapRsp {
#[prost(message, repeated, tag = "14")] #[prost(message, repeated, tag = "14")]
pub jfboglilobd: ::prost::alloc::vec::Vec<Nglnpheglgn>, pub mark_list: ::prost::alloc::vec::Vec<MapMarkPoint>,
#[prost(int32, tag = "4")] #[prost(int32, tag = "4")]
pub retcode: i32, pub retcode: i32,
} }
@ -19216,7 +19216,7 @@ pub struct Jpeajcodfbe {
#[prost(message, repeated, tag = "12")] #[prost(message, repeated, tag = "12")]
pub jnanlopjgmc: ::prost::alloc::vec::Vec<Kphngndmonk>, pub jnanlopjgmc: ::prost::alloc::vec::Vec<Kphngndmonk>,
#[prost(uint32, tag = "6")] #[prost(uint32, tag = "6")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -20193,7 +20193,7 @@ pub struct Ieghhfjhfpa {
#[prost(uint32, tag = "8")] #[prost(uint32, tag = "8")]
pub okdlgpaafhc: u32, pub okdlgpaafhc: u32,
#[prost(uint32, tag = "1")] #[prost(uint32, tag = "1")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(bool, tag = "5")] #[prost(bool, tag = "5")]
pub mbfgongjfdn: bool, pub mbfgongjfdn: bool,
#[prost(uint32, tag = "7")] #[prost(uint32, tag = "7")]
@ -21390,7 +21390,7 @@ pub struct Flmmpoonphk {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Jekhiockaad { pub struct Jekhiockaad {
#[prost(uint32, tag = "14")] #[prost(uint32, tag = "14")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(int32, tag = "7")] #[prost(int32, tag = "7")]
pub retcode: i32, pub retcode: i32,
} }
@ -22779,7 +22779,7 @@ pub struct Fmjcacaffmk {
#[prost(message, optional, tag = "5")] #[prost(message, optional, tag = "5")]
pub aobjhjihjdn: ::core::option::Option<Bocelbglbdb>, pub aobjhjihjdn: ::core::option::Option<Bocelbglbdb>,
#[prost(enumeration = "Cpmhcibnkmj", tag = "3")] #[prost(enumeration = "Cpmhcibnkmj", tag = "3")]
pub gfokgkdiiph: i32, pub op: i32,
} }
/// CmdId: 8028 /// CmdId: 8028
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -26287,7 +26287,7 @@ pub struct Afkfhplmfmb {
#[prost(message, repeated, tag = "7")] #[prost(message, repeated, tag = "7")]
pub nniilnfgjjb: ::prost::alloc::vec::Vec<Odlbcgmecnm>, pub nniilnfgjjb: ::prost::alloc::vec::Vec<Odlbcgmecnm>,
#[prost(uint32, tag = "10")] #[prost(uint32, tag = "10")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "15")] #[prost(uint32, tag = "15")]
pub parent_quest_id: u32, pub parent_quest_id: u32,
#[prost(uint32, tag = "12")] #[prost(uint32, tag = "12")]
@ -26300,7 +26300,7 @@ pub struct Nehfkmeooha {
#[prost(uint32, tag = "4")] #[prost(uint32, tag = "4")]
pub abbofbbkapb: u32, pub abbofbbkapb: u32,
#[prost(uint32, tag = "3")] #[prost(uint32, tag = "3")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "10")] #[prost(uint32, tag = "10")]
pub parent_quest_id: u32, pub parent_quest_id: u32,
#[prost(int32, tag = "6")] #[prost(int32, tag = "6")]
@ -27062,7 +27062,7 @@ pub mod onheihnjnka {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Lhebfcljnla { pub struct Lhebfcljnla {
#[prost(uint32, tag = "10")] #[prost(uint32, tag = "10")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -28774,7 +28774,7 @@ pub struct Dfdipgagjcm {
#[prost(message, repeated, tag = "6")] #[prost(message, repeated, tag = "6")]
pub mccnddlmpin: ::prost::alloc::vec::Vec<Jaclbgniman>, pub mccnddlmpin: ::prost::alloc::vec::Vec<Jaclbgniman>,
#[prost(uint32, tag = "2")] #[prost(uint32, tag = "2")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
/// CmdId: 22510 /// CmdId: 22510
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -29533,23 +29533,23 @@ pub mod dkbchkjeeie {
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Nglnpheglgn { pub struct MapMarkPoint {
#[prost(message, optional, tag = "3")] #[prost(message, optional, tag = "3")]
pub pos: ::core::option::Option<Vector>, pub pos: ::core::option::Option<Vector>,
#[prost(string, tag = "2")] #[prost(string, tag = "2")]
pub name: ::prost::alloc::string::String, pub name: ::prost::alloc::string::String,
#[prost(enumeration = "Lkabjppedih", tag = "4")] #[prost(enumeration = "MapMarkPointType", tag = "4")]
pub fcjglbamakh: i32, pub point_type: i32,
#[prost(uint32, tag = "5")] #[prost(uint32, tag = "5")]
pub monster_id: u32, pub monster_id: u32,
#[prost(uint32, tag = "1")] #[prost(uint32, tag = "1")]
pub scene_id: u32, pub scene_id: u32,
#[prost(enumeration = "Dknbdkbcpjo", tag = "6")] #[prost(enumeration = "MapMarkFromType", tag = "6")]
pub nimceenhdkm: i32, pub from_type: i32,
#[prost(uint32, tag = "8")] #[prost(uint32, tag = "8")]
pub emolgaafllp: u32, pub emolgaafllp: u32,
#[prost(uint32, tag = "7")] #[prost(uint32, tag = "7")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
/// CmdId: 29498 /// CmdId: 29498
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -29622,7 +29622,7 @@ pub struct Kmpccabkcee {}
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dkelhcecdpo { pub struct Dkelhcecdpo {
#[prost(uint32, tag = "7")] #[prost(uint32, tag = "7")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "11")] #[prost(uint32, tag = "11")]
pub homjegjkgom: u32, pub homjegjkgom: u32,
#[prost(int32, tag = "2")] #[prost(int32, tag = "2")]
@ -31110,7 +31110,7 @@ pub mod kigbchgjdha {
#[prost(uint32, tag = "10")] #[prost(uint32, tag = "10")]
pub dloklkcahpp: u32, pub dloklkcahpp: u32,
#[prost(uint32, tag = "8")] #[prost(uint32, tag = "8")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
#[derive( #[derive(
Clone, Clone,
@ -32507,7 +32507,7 @@ pub struct Ifnokkffbio {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Eapmidblefj { pub struct Eapmidblefj {
#[prost(uint32, tag = "13")] #[prost(uint32, tag = "13")]
pub aagijbfjkak: u32, pub quest_id: u32,
#[prost(uint32, tag = "1")] #[prost(uint32, tag = "1")]
pub homjegjkgom: u32, pub homjegjkgom: u32,
} }
@ -32667,7 +32667,7 @@ pub struct Ggjbdcnoaih {
#[prost(uint32, tag = "12")] #[prost(uint32, tag = "12")]
pub entity_id: u32, pub entity_id: u32,
#[prost(uint32, tag = "11")] #[prost(uint32, tag = "11")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
/// CmdId: 2656 /// CmdId: 2656
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -33099,7 +33099,7 @@ pub struct Hcgfamcmiij {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Glccangogea { pub struct Glccangogea {
#[prost(message, repeated, tag = "11")] #[prost(message, repeated, tag = "11")]
pub jfboglilobd: ::prost::alloc::vec::Vec<Nglnpheglgn>, pub mark_list: ::prost::alloc::vec::Vec<MapMarkPoint>,
} }
/// CmdId: 21238 /// CmdId: 21238
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -35394,14 +35394,14 @@ pub mod hnmiejbjimb {
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Dhiiiggagmk { pub struct Dhiiiggagmk {
#[prost(oneof = "dhiiiggagmk::Gfokgkdiiph", tags = "5, 9, 15, 3, 4, 7, 13, 14")] #[prost(oneof = "dhiiiggagmk::Op", tags = "5, 9, 15, 3, 4, 7, 13, 14")]
pub gfokgkdiiph: ::core::option::Option<dhiiiggagmk::Gfokgkdiiph>, pub op: ::core::option::Option<dhiiiggagmk::Op>,
} }
/// Nested message and enum types in `DHIIIGGAGMK`. /// Nested message and enum types in `DHIIIGGAGMK`.
pub mod dhiiiggagmk { pub mod dhiiiggagmk {
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)] #[derive(Clone, PartialEq, ::prost::Oneof)]
pub enum Gfokgkdiiph { pub enum Op {
#[prost(message, tag = "5")] #[prost(message, tag = "5")]
OpRedraw(super::Mecblnblbbo), OpRedraw(super::Mecblnblbbo),
#[prost(message, tag = "9")] #[prost(message, tag = "9")]
@ -35833,7 +35833,7 @@ pub struct Mfokkhgaodh {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Eafhmdmlolm { pub struct Eafhmdmlolm {
#[prost(uint32, tag = "9")] #[prost(uint32, tag = "9")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
/// CmdId: 26723 /// CmdId: 26723
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -38229,7 +38229,7 @@ pub struct Nkkhbleilch {
#[prost(uint32, tag = "8")] #[prost(uint32, tag = "8")]
pub phijcmelhfb: u32, pub phijcmelhfb: u32,
#[prost(uint32, tag = "9")] #[prost(uint32, tag = "9")]
pub gfokgkdiiph: u32, pub op: u32,
#[prost(uint32, tag = "7")] #[prost(uint32, tag = "7")]
pub pggehhnihod: u32, pub pggehhnihod: u32,
#[prost(uint32, tag = "4")] #[prost(uint32, tag = "4")]
@ -38829,7 +38829,7 @@ pub struct Flcbabihdlm {
#[prost(int32, tag = "15")] #[prost(int32, tag = "15")]
pub retcode: i32, pub retcode: i32,
#[prost(uint32, tag = "6")] #[prost(uint32, tag = "6")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
@ -40242,7 +40242,7 @@ pub struct Ffdgmjklonk {
#[prost(uint32, tag = "5")] #[prost(uint32, tag = "5")]
pub jablkfbjnhp: u32, pub jablkfbjnhp: u32,
#[prost(uint32, tag = "4")] #[prost(uint32, tag = "4")]
pub aagijbfjkak: u32, pub quest_id: u32,
} }
/// CmdId: 8708 /// CmdId: 8708
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -41151,7 +41151,7 @@ pub struct Eimfhonjiim {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Ajngpjibnja { pub struct Ajngpjibnja {
#[prost(message, repeated, tag = "13")] #[prost(message, repeated, tag = "13")]
pub jfboglilobd: ::prost::alloc::vec::Vec<Nglnpheglgn>, pub mark_list: ::prost::alloc::vec::Vec<MapMarkPoint>,
#[prost(int32, tag = "8")] #[prost(int32, tag = "8")]
pub retcode: i32, pub retcode: i32,
} }
@ -42638,7 +42638,7 @@ pub struct Bcpdiknpmbm {
#[prost(uint32, tag = "5")] #[prost(uint32, tag = "5")]
pub entity_id: u32, pub entity_id: u32,
#[prost(uint32, tag = "8")] #[prost(uint32, tag = "8")]
pub gfokgkdiiph: u32, pub op: u32,
#[prost(uint32, tag = "13")] #[prost(uint32, tag = "13")]
pub pggehhnihod: u32, pub pggehhnihod: u32,
} }
@ -45312,7 +45312,7 @@ pub struct Mdjhiogomni {
#[derive(Clone, PartialEq, ::prost::Message)] #[derive(Clone, PartialEq, ::prost::Message)]
pub struct Koepofignoh { pub struct Koepofignoh {
#[prost(message, repeated, tag = "7")] #[prost(message, repeated, tag = "7")]
pub jfboglilobd: ::prost::alloc::vec::Vec<Nglnpheglgn>, pub mark_list: ::prost::alloc::vec::Vec<MapMarkPoint>,
} }
/// CmdId: 7884 /// CmdId: 7884
#[allow(clippy::derive_partial_eq_without_eq)] #[allow(clippy::derive_partial_eq_without_eq)]
@ -47733,29 +47733,29 @@ impl Lihghmndadc {
} }
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)] #[repr(i32)]
pub enum Dknbdkbcpjo { pub enum MapMarkFromType {
Noe = 0, Noe = 0,
Monster = 1, Monster = 1,
Quest = 2, Quest = 2,
} }
impl Dknbdkbcpjo { impl MapMarkFromType {
/// String value of the enum field names used in the ProtoBuf definition. /// 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 /// 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. /// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str { pub fn as_str_name(&self) -> &'static str {
match self { match self {
Dknbdkbcpjo::Noe => "DKNBDKBCPJO_Noe", MapMarkFromType::Noe => "MapMarkFromType_Noe",
Dknbdkbcpjo::Monster => "DKNBDKBCPJO_Monster", MapMarkFromType::Monster => "MapMarkFromType_Monster",
Dknbdkbcpjo::Quest => "DKNBDKBCPJO_Quest", MapMarkFromType::Quest => "MapMarkFromType_Quest",
} }
} }
/// Creates an enum from field names used in the ProtoBuf definition. /// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value { match value {
"DKNBDKBCPJO_Noe" => Some(Self::Noe), "MapMarkFromType_Noe" => Some(Self::Noe),
"DKNBDKBCPJO_Monster" => Some(Self::Monster), "MapMarkFromType_Monster" => Some(Self::Monster),
"DKNBDKBCPJO_Quest" => Some(Self::Quest), "MapMarkFromType_Quest" => Some(Self::Quest),
_ => None, _ => None,
} }
} }
@ -49134,7 +49134,7 @@ impl Hmpljgiladb {
} }
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)] #[repr(i32)]
pub enum Lkabjppedih { pub enum MapMarkPointType {
Npc = 0, Npc = 0,
Quest = 1, Quest = 1,
Special = 2, Special = 2,
@ -49143,32 +49143,32 @@ pub enum Lkabjppedih {
Monster = 5, Monster = 5,
FishPool = 6, FishPool = 6,
} }
impl Lkabjppedih { impl MapMarkPointType {
/// String value of the enum field names used in the ProtoBuf definition. /// 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 /// 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. /// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str { pub fn as_str_name(&self) -> &'static str {
match self { match self {
Lkabjppedih::Npc => "LKABJPPEDIH_Npc", MapMarkPointType::Npc => "MapMarkPointType_Npc",
Lkabjppedih::Quest => "LKABJPPEDIH_Quest", MapMarkPointType::Quest => "MapMarkPointType_Quest",
Lkabjppedih::Special => "LKABJPPEDIH_Special", MapMarkPointType::Special => "MapMarkPointType_Special",
Lkabjppedih::Mine => "LKABJPPEDIH_Mine", MapMarkPointType::Mine => "MapMarkPointType_Mine",
Lkabjppedih::Collection => "LKABJPPEDIH_Collection", MapMarkPointType::Collection => "MapMarkPointType_Collection",
Lkabjppedih::Monster => "LKABJPPEDIH_Monster", MapMarkPointType::Monster => "MapMarkPointType_Monster",
Lkabjppedih::FishPool => "LKABJPPEDIH_FishPool", MapMarkPointType::FishPool => "MapMarkPointType_FishPool",
} }
} }
/// Creates an enum from field names used in the ProtoBuf definition. /// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value { match value {
"LKABJPPEDIH_Npc" => Some(Self::Npc), "MapMarkPointType_Npc" => Some(Self::Npc),
"LKABJPPEDIH_Quest" => Some(Self::Quest), "MapMarkPointType_Quest" => Some(Self::Quest),
"LKABJPPEDIH_Special" => Some(Self::Special), "MapMarkPointType_Special" => Some(Self::Special),
"LKABJPPEDIH_Mine" => Some(Self::Mine), "MapMarkPointType_Mine" => Some(Self::Mine),
"LKABJPPEDIH_Collection" => Some(Self::Collection), "MapMarkPointType_Collection" => Some(Self::Collection),
"LKABJPPEDIH_Monster" => Some(Self::Monster), "MapMarkPointType_Monster" => Some(Self::Monster),
"LKABJPPEDIH_FishPool" => Some(Self::FishPool), "MapMarkPointType_FishPool" => Some(Self::FishPool),
_ => None, _ => None,
} }
} }

View file

@ -21,3 +21,4 @@ pub const SET_UP_AVATAR_TEAM_RSP: u16 = 29283;
pub const CHANGE_AVATAR_RSP: u16 = 5958; pub const CHANGE_AVATAR_RSP: u16 = 5958;
pub const EVT_AVATAR_SIT_DOWN_RSP: u16 = 29232; pub const EVT_AVATAR_SIT_DOWN_RSP: u16 = 29232;
pub const EVT_AVATAR_STAND_UP_NOTIFY: u16 = 8549; pub const EVT_AVATAR_STAND_UP_NOTIFY: u16 = 8549;
pub const MARK_MAP_RSP: u16 = 25569;

View file

@ -4,3 +4,4 @@ format_macro_matchers = true
imports_granularity = "Crate" imports_granularity = "Crate"
group_imports = "StdExternalCrate" group_imports = "StdExternalCrate"
wrap_comments = true wrap_comments = true
edition = "2021"