Implement W-Engines
This commit is contained in:
parent
b63c7c0f0d
commit
205fda45dc
16 changed files with 1391 additions and 137 deletions
|
@ -36,7 +36,7 @@ You should configure each service using their own config files. They're being cr
|
||||||
|
|
||||||
### Connecting
|
### Connecting
|
||||||
You have to get a compatible game client. Currently supported one is `CNBetaWin1.4.2`, you can [get it here](https://git.xeondev.com/xeon/3/raw/branch/3/ZZZ_1.4_beta_reversedrooms.torrent). Next, you have to apply [this patch](https://git.xeondev.com/HollowSpecialOperationsS6/Yanagi-Patch/releases), it allows you to connect to local server and replaces RSA encryption keys with custom ones.
|
You have to get a compatible game client. Currently supported one is `CNBetaWin1.4.2`, you can [get it here](https://git.xeondev.com/xeon/3/raw/branch/3/ZZZ_1.4_beta_reversedrooms.torrent). Next, you have to apply [this patch](https://git.xeondev.com/HollowSpecialOperationsS6/Yanagi-Patch/releases), it allows you to connect to local server and replaces RSA encryption keys with custom ones.
|
||||||
##### NOTE: you have to create in-game account, by default, you can do so at https://127.0.0.1:10001/account/register
|
##### NOTE: you have to create in-game account, by default, you can do so at http://127.0.0.1:10001/account/register
|
||||||
##### NOTE2: to register an account, you should have `yanagi-sdk-server` up and running!
|
##### NOTE2: to register an account, you should have `yanagi-sdk-server` up and running!
|
||||||
|
|
||||||
## Community
|
## Community
|
||||||
|
|
|
@ -310,6 +310,8 @@ pub fn create_starting_player_info(uid: u64, nick_name: &str) -> (UidCounter, Pl
|
||||||
main_city_avatar_id: Some(1221),
|
main_city_avatar_id: Some(1221),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let first_get_time = time_util::unix_timestamp();
|
||||||
|
|
||||||
// Give all avatars
|
// Give all avatars
|
||||||
FILECFG
|
FILECFG
|
||||||
.get()
|
.get()
|
||||||
|
@ -328,7 +330,7 @@ pub fn create_starting_player_info(uid: u64, nick_name: &str) -> (UidCounter, Pl
|
||||||
id: tmpl.id(),
|
id: tmpl.id(),
|
||||||
count: 1,
|
count: 1,
|
||||||
package: 0,
|
package: 0,
|
||||||
first_get_time: time_util::unix_timestamp(),
|
first_get_time,
|
||||||
star: 6,
|
star: 6,
|
||||||
exp: 0,
|
exp: 0,
|
||||||
level: 60,
|
level: 60,
|
||||||
|
@ -342,5 +344,33 @@ pub fn create_starting_player_info(uid: u64, nick_name: &str) -> (UidCounter, Pl
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Give all w-engines
|
||||||
|
FILECFG
|
||||||
|
.get()
|
||||||
|
.unwrap()
|
||||||
|
.weapon_template_tb
|
||||||
|
.data()
|
||||||
|
.unwrap_or_default()
|
||||||
|
.iter()
|
||||||
|
.for_each(|tmpl| {
|
||||||
|
let uid = counter.next();
|
||||||
|
player_info.items.as_mut().unwrap().insert(
|
||||||
|
uid,
|
||||||
|
ItemInfo::Weapon {
|
||||||
|
uid,
|
||||||
|
id: tmpl.item_id(),
|
||||||
|
count: 1,
|
||||||
|
package: 0,
|
||||||
|
first_get_time,
|
||||||
|
avatar_uid: 0,
|
||||||
|
star: 1 + tmpl.star_limit() as u8,
|
||||||
|
exp: 0,
|
||||||
|
level: 60,
|
||||||
|
lock: 0,
|
||||||
|
refine_level: tmpl.refine_limit() as u8,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
(counter, player_info)
|
(counter, player_info)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
use item_info::ItemInfo;
|
||||||
|
use tracing::{debug, instrument};
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
pub async fn on_rpc_get_weapon_data_arg(
|
pub async fn on_rpc_get_weapon_data_arg(
|
||||||
|
@ -30,14 +33,7 @@ pub async fn on_rpc_get_resource_data_arg(
|
||||||
Ok(RpcGetResourceDataRet {
|
Ok(RpcGetResourceDataRet {
|
||||||
retcode: 0,
|
retcode: 0,
|
||||||
resource_list: protocol::util::build_sync_resource_info_list(&session.player_info),
|
resource_list: protocol::util::build_sync_resource_info_list(&session.player_info),
|
||||||
auto_recovery_info: session
|
auto_recovery_info: protocol::util::build_sync_auto_recovery_info(&session.player_info),
|
||||||
.player_info
|
|
||||||
.auto_recovery_info
|
|
||||||
.as_ref()
|
|
||||||
.unwrap()
|
|
||||||
.iter()
|
|
||||||
.map(|(id, info)| (*id as u32, info.clone()))
|
|
||||||
.collect(),
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,3 +66,101 @@ pub async fn on_rpc_get_buddy_data_arg(
|
||||||
) -> Result<RpcGetBuddyDataRet, i32> {
|
) -> Result<RpcGetBuddyDataRet, i32> {
|
||||||
Ok(RpcGetBuddyDataRet::default())
|
Ok(RpcGetBuddyDataRet::default())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[instrument(skip(ctx, session))]
|
||||||
|
pub async fn on_rpc_weapon_dress_arg(
|
||||||
|
ctx: &RpcPtcContext,
|
||||||
|
session: &mut PlayerSession,
|
||||||
|
arg: RpcWeaponDressArg,
|
||||||
|
) -> Result<RpcWeaponDressRet, i32> {
|
||||||
|
let Some(target_avatar_uid) = session
|
||||||
|
.player_info
|
||||||
|
.items
|
||||||
|
.as_ref()
|
||||||
|
.unwrap()
|
||||||
|
.iter()
|
||||||
|
.find(|(_, item)| {
|
||||||
|
if let ItemInfo::AvatarInfo { id, .. } = item {
|
||||||
|
*id as u32 == arg.avatar_id
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.map(|(uid, _)| *uid)
|
||||||
|
else {
|
||||||
|
debug!("target avatar not found");
|
||||||
|
return Err(-1);
|
||||||
|
};
|
||||||
|
|
||||||
|
let Some((_, ItemInfo::Weapon { avatar_uid, .. })) = session
|
||||||
|
.player_info
|
||||||
|
.items
|
||||||
|
.as_mut()
|
||||||
|
.unwrap()
|
||||||
|
.iter_mut()
|
||||||
|
.find(|(uid, _)| (*uid & 0xFFFFFFFF) as u32 == arg.weapon_uid)
|
||||||
|
else {
|
||||||
|
debug!("target weapon not found");
|
||||||
|
return Err(-1);
|
||||||
|
};
|
||||||
|
|
||||||
|
*avatar_uid = target_avatar_uid;
|
||||||
|
|
||||||
|
ctx.send_ptc(PtcPlayerSyncArg {
|
||||||
|
avatar: Some(protocol::util::build_avatar_sync(&session.player_info)),
|
||||||
|
item: Some(protocol::util::build_item_sync(&session.player_info)),
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
.await;
|
||||||
|
|
||||||
|
Ok(RpcWeaponDressRet::default())
|
||||||
|
}
|
||||||
|
|
||||||
|
#[instrument(skip(ctx, session))]
|
||||||
|
pub async fn on_rpc_weapon_un_dress_arg(
|
||||||
|
ctx: &RpcPtcContext,
|
||||||
|
session: &mut PlayerSession,
|
||||||
|
arg: RpcWeaponUnDressArg,
|
||||||
|
) -> Result<RpcWeaponUnDressRet, i32> {
|
||||||
|
let Some(target_avatar_uid) = session
|
||||||
|
.player_info
|
||||||
|
.items
|
||||||
|
.as_ref()
|
||||||
|
.unwrap()
|
||||||
|
.iter()
|
||||||
|
.find(|(_, item)| {
|
||||||
|
if let ItemInfo::AvatarInfo { id, .. } = item {
|
||||||
|
*id as u32 == arg.avatar_id
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.map(|(uid, _)| *uid)
|
||||||
|
else {
|
||||||
|
debug!("target avatar not found");
|
||||||
|
return Err(-1);
|
||||||
|
};
|
||||||
|
|
||||||
|
session
|
||||||
|
.player_info
|
||||||
|
.items
|
||||||
|
.as_mut()
|
||||||
|
.unwrap()
|
||||||
|
.iter_mut()
|
||||||
|
.for_each(|(_, item)| {
|
||||||
|
if let ItemInfo::Weapon { avatar_uid, .. } = item {
|
||||||
|
if *avatar_uid == target_avatar_uid {
|
||||||
|
*avatar_uid = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ctx.send_ptc(PtcPlayerSyncArg {
|
||||||
|
avatar: Some(protocol::util::build_avatar_sync(&session.player_info)),
|
||||||
|
item: Some(protocol::util::build_item_sync(&session.player_info)),
|
||||||
|
..Default::default()
|
||||||
|
})
|
||||||
|
.await;
|
||||||
|
|
||||||
|
Ok(RpcWeaponUnDressRet::default())
|
||||||
|
}
|
||||||
|
|
|
@ -180,5 +180,9 @@ pub fn register_handlers(listen_point: &RpcPtcPoint) {
|
||||||
RpcBattleReport;
|
RpcBattleReport;
|
||||||
RpcEndBattle;
|
RpcEndBattle;
|
||||||
RpcLeaveCurDungeon;
|
RpcLeaveCurDungeon;
|
||||||
|
|
||||||
|
RpcGetPlayerNetworkData;
|
||||||
|
RpcWeaponDress;
|
||||||
|
RpcWeaponUnDress;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,3 +107,14 @@ pub async fn on_rpc_player_transaction_arg(
|
||||||
transaction: format!("{player_uid}-{scene_uid}"),
|
transaction: format!("{player_uid}-{scene_uid}"),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub async fn on_rpc_get_player_network_data_arg(
|
||||||
|
_: &RpcPtcContext,
|
||||||
|
_: &mut PlayerSession,
|
||||||
|
_: RpcGetPlayerNetworkDataArg,
|
||||||
|
) -> Result<RpcGetPlayerNetworkDataRet, i32> {
|
||||||
|
Ok(RpcGetPlayerNetworkDataRet {
|
||||||
|
retcode: 0,
|
||||||
|
player_network_data: Some(PlayerNetworkData::default()),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ pub async fn decode_and_handle(
|
||||||
session.rpc_ptc_point.lock().await,
|
session.rpc_ptc_point.lock().await,
|
||||||
end_point,
|
end_point,
|
||||||
middleware_list,
|
middleware_list,
|
||||||
Duration::from_secs(30)
|
Duration::from_secs(2)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
cmd_id => debug!("received cmd_id: {cmd_id}, session is not logged in, expected PlayerGetTokenCsReq (cmd_id: {})", PlayerGetTokenCsReq::CMD_ID),
|
cmd_id => debug!("received cmd_id: {cmd_id}, session is not logged in, expected PlayerGetTokenCsReq (cmd_id: {})", PlayerGetTokenCsReq::CMD_ID),
|
||||||
|
|
|
@ -67,6 +67,7 @@ pub struct AvatarInfo {
|
||||||
pub unlocked_talent_num: u32,
|
pub unlocked_talent_num: u32,
|
||||||
pub talent_switch_list: Vec<bool>,
|
pub talent_switch_list: Vec<bool>,
|
||||||
pub skill_type_level: Vec<AvatarSkillInfo>,
|
pub skill_type_level: Vec<AvatarSkillInfo>,
|
||||||
|
pub cur_weapon_uid: u32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(OctData, Debug, Default)]
|
#[derive(OctData, Debug, Default)]
|
||||||
|
@ -805,7 +806,9 @@ pub struct RpcSavePosInMainCityRet {
|
||||||
|
|
||||||
#[derive(OctData, Debug, Default, ProtocolID)]
|
#[derive(OctData, Debug, Default, ProtocolID)]
|
||||||
#[id(156)]
|
#[id(156)]
|
||||||
pub struct RpcPlayerOperationArg {}
|
pub struct RpcPlayerOperationArg {
|
||||||
|
pub param: i32,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(OctData, Debug, Default)]
|
#[derive(OctData, Debug, Default)]
|
||||||
pub struct RpcPlayerOperationRet {
|
pub struct RpcPlayerOperationRet {
|
||||||
|
@ -929,10 +932,25 @@ pub struct RpcModMainCityAvatarRet {
|
||||||
pub retcode: i32,
|
pub retcode: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default)]
|
||||||
|
pub struct AvatarSync {
|
||||||
|
pub avatar_list: Vec<AvatarInfo>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default)]
|
||||||
|
pub struct ItemSync {
|
||||||
|
pub weapon_list: Vec<WeaponInfo>,
|
||||||
|
pub equip_list: Vec<EquipInfo>,
|
||||||
|
pub resource_list: Vec<ResourceInfo>,
|
||||||
|
pub auto_recovery_info: HashMap<u32, AutoRecoveryInfo>,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(OctData, Debug, Default, ProtocolID)]
|
#[derive(OctData, Debug, Default, ProtocolID)]
|
||||||
#[id(500)]
|
#[id(500)]
|
||||||
pub struct PtcPlayerSyncArg {
|
pub struct PtcPlayerSyncArg {
|
||||||
pub basic_info: Option<PlayerBasicInfo>,
|
pub basic_info: Option<PlayerBasicInfo>,
|
||||||
|
pub avatar: Option<AvatarSync>,
|
||||||
|
pub item: Option<ItemSync>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(OctData, Debug, Default, ProtocolID)]
|
#[derive(OctData, Debug, Default, ProtocolID)]
|
||||||
|
@ -1117,3 +1135,39 @@ pub struct RpcLeaveCurDungeonArg {}
|
||||||
pub struct RpcLeaveCurDungeonRet {
|
pub struct RpcLeaveCurDungeonRet {
|
||||||
pub retcode: i32,
|
pub retcode: i32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default, ProtocolID)]
|
||||||
|
#[id(178)]
|
||||||
|
pub struct RpcGetPlayerNetworkDataArg {}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default)]
|
||||||
|
pub struct PlayerNetworkData {}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default)]
|
||||||
|
pub struct RpcGetPlayerNetworkDataRet {
|
||||||
|
pub retcode: i32,
|
||||||
|
pub player_network_data: Option<PlayerNetworkData>,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default, ProtocolID)]
|
||||||
|
#[id(179)]
|
||||||
|
pub struct RpcWeaponDressArg {
|
||||||
|
pub avatar_id: u32,
|
||||||
|
pub weapon_uid: u32,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default)]
|
||||||
|
pub struct RpcWeaponDressRet {
|
||||||
|
pub retcode: i32,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default, ProtocolID)]
|
||||||
|
#[id(180)]
|
||||||
|
pub struct RpcWeaponUnDressArg {
|
||||||
|
pub avatar_id: u32,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(OctData, Debug, Default)]
|
||||||
|
pub struct RpcWeaponUnDressRet {
|
||||||
|
pub retcode: i32,
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
use std::collections::HashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
item_info::ItemInfo, player_info::PlayerInfo, scene_info::SceneInfo, AvatarInfo,
|
item_info::ItemInfo, player_info::PlayerInfo, scene_info::SceneInfo, AvatarInfo,
|
||||||
AvatarSkillInfo, AvatarUnitInfo, EquipInfo, PlayerBasicInfo, PtcHallRefreshArg, ResourceInfo,
|
AvatarSkillInfo, AvatarSync, AvatarUnitInfo, EquipInfo, ItemSync, PlayerBasicInfo,
|
||||||
WeaponInfo,
|
PtcHallRefreshArg, ResourceInfo, WeaponInfo,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn build_player_basic_info(player_info: &PlayerInfo) -> PlayerBasicInfo {
|
pub fn build_player_basic_info(player_info: &PlayerInfo) -> PlayerBasicInfo {
|
||||||
|
@ -223,7 +225,7 @@ pub fn build_sync_avatar_info_list(player_info: &PlayerInfo) -> Vec<AvatarInfo>
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(_, item)| {
|
.map(|(uid, item)| {
|
||||||
if let ItemInfo::AvatarInfo {
|
if let ItemInfo::AvatarInfo {
|
||||||
id,
|
id,
|
||||||
first_get_time,
|
first_get_time,
|
||||||
|
@ -246,6 +248,20 @@ pub fn build_sync_avatar_info_list(player_info: &PlayerInfo) -> Vec<AvatarInfo>
|
||||||
unlocked_talent_num: *unlocked_talent_num as u32,
|
unlocked_talent_num: *unlocked_talent_num as u32,
|
||||||
first_get_time: *first_get_time as i64,
|
first_get_time: *first_get_time as i64,
|
||||||
talent_switch_list: talent_switch.clone(),
|
talent_switch_list: talent_switch.clone(),
|
||||||
|
cur_weapon_uid: player_info
|
||||||
|
.items
|
||||||
|
.as_ref()
|
||||||
|
.unwrap()
|
||||||
|
.iter()
|
||||||
|
.find(|(_, item)| {
|
||||||
|
if let ItemInfo::Weapon { avatar_uid, .. } = item {
|
||||||
|
*avatar_uid == *uid
|
||||||
|
} else {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.map(|(uid, _)| (*uid & 0xFFFFFFFF) as u32)
|
||||||
|
.unwrap_or(0),
|
||||||
skill_type_level: skills
|
skill_type_level: skills
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(ty, lv)| AvatarSkillInfo {
|
.map(|(ty, lv)| AvatarSkillInfo {
|
||||||
|
@ -358,3 +374,30 @@ pub fn build_sync_resource_info_list(player_info: &PlayerInfo) -> Vec<ResourceIn
|
||||||
.flatten()
|
.flatten()
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn build_sync_auto_recovery_info(
|
||||||
|
player_info: &PlayerInfo,
|
||||||
|
) -> HashMap<u32, crate::AutoRecoveryInfo> {
|
||||||
|
player_info
|
||||||
|
.auto_recovery_info
|
||||||
|
.as_ref()
|
||||||
|
.unwrap()
|
||||||
|
.iter()
|
||||||
|
.map(|(id, info)| (*id as u32, info.clone()))
|
||||||
|
.collect()
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn build_item_sync(player_info: &PlayerInfo) -> ItemSync {
|
||||||
|
ItemSync {
|
||||||
|
weapon_list: build_sync_weapon_info_list(player_info),
|
||||||
|
equip_list: build_sync_equip_info_list(player_info),
|
||||||
|
resource_list: build_sync_resource_info_list(player_info),
|
||||||
|
auto_recovery_info: build_sync_auto_recovery_info(player_info),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn build_avatar_sync(player_info: &PlayerInfo) -> AvatarSync {
|
||||||
|
AvatarSync {
|
||||||
|
avatar_list: build_sync_avatar_info_list(player_info),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ impl ProtocolPoint {
|
||||||
self.channel,
|
self.channel,
|
||||||
to_channel,
|
to_channel,
|
||||||
addr,
|
addr,
|
||||||
rpc_arg,
|
&rpc_arg,
|
||||||
Duration::ZERO,
|
Duration::ZERO,
|
||||||
arg_uid == 0,
|
arg_uid == 0,
|
||||||
arg_uid,
|
arg_uid,
|
||||||
|
@ -62,7 +62,7 @@ impl ProtocolPoint {
|
||||||
pub async fn call_rpc(
|
pub async fn call_rpc(
|
||||||
&self,
|
&self,
|
||||||
addr: SocketAddr,
|
addr: SocketAddr,
|
||||||
rpc_arg: Box<[u8]>,
|
rpc_arg: &[u8],
|
||||||
timeout: Duration,
|
timeout: Duration,
|
||||||
) -> Option<Box<[u8]>> {
|
) -> Option<Box<[u8]>> {
|
||||||
self.service_backend
|
self.service_backend
|
||||||
|
|
|
@ -114,7 +114,7 @@ impl ProtocolServiceFrontendImpl {
|
||||||
from_channel: u16,
|
from_channel: u16,
|
||||||
to_channel: u16,
|
to_channel: u16,
|
||||||
to_addr: SocketAddr,
|
to_addr: SocketAddr,
|
||||||
body: Box<[u8]>,
|
body: &[u8],
|
||||||
timeout: Duration,
|
timeout: Duration,
|
||||||
is_ptc: bool,
|
is_ptc: bool,
|
||||||
arg_uid: u64,
|
arg_uid: u64,
|
||||||
|
|
|
@ -232,10 +232,7 @@ impl RpcPtcPoint {
|
||||||
|
|
||||||
marshal_middleware_list(&mut ProtocolStream::new(&mut cursor), &middleware_list).unwrap();
|
marshal_middleware_list(&mut ProtocolStream::new(&mut cursor), &middleware_list).unwrap();
|
||||||
|
|
||||||
let ret_buf = self
|
let ret_buf = self.protocol_point.call_rpc(addr, &buf, timeout).await?;
|
||||||
.protocol_point
|
|
||||||
.call_rpc(addr, buf.into_boxed_slice(), timeout)
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
Some(RpcRawRet(ret_buf))
|
Some(RpcRawRet(ret_buf))
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,8 +13,50 @@ table AvatarBaseTemplate {
|
||||||
unk_2: [string];
|
unk_2: [string];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct Property {
|
||||||
|
property: int;
|
||||||
|
value: int;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct RefineCost {
|
||||||
|
item_id: int;
|
||||||
|
number: int;
|
||||||
|
}
|
||||||
|
|
||||||
|
table WeaponTemplate {
|
||||||
|
item_id: int;
|
||||||
|
weapon_name: string;
|
||||||
|
unk_missing_field: int;
|
||||||
|
base_property: Property;
|
||||||
|
rand_property: Property;
|
||||||
|
star_limit: int;
|
||||||
|
exp_recycle: int;
|
||||||
|
weapon_script_config: string;
|
||||||
|
weapon_ui_model: string;
|
||||||
|
unk_1: int;
|
||||||
|
unk_missing_field_2: int;
|
||||||
|
unk_weapon_path: string;
|
||||||
|
unk_missing_field_3: int;
|
||||||
|
refine_initial: int;
|
||||||
|
refine_limit: int;
|
||||||
|
unk_missing_field_4: int;
|
||||||
|
unk_missing_field_5: int;
|
||||||
|
unk_string_with_values: string;
|
||||||
|
unk_missing_field_6: int;
|
||||||
|
unk_2: int; // 3
|
||||||
|
weapon_desc: string;
|
||||||
|
weapon_release_tag: string;
|
||||||
|
unk_empty_string: string;
|
||||||
|
avatar_id: int;
|
||||||
|
weapon_comment: string;
|
||||||
|
refine_costs: [RefineCost];
|
||||||
|
unk_3: int;
|
||||||
|
}
|
||||||
|
|
||||||
table AvatarBaseTemplateTb {
|
table AvatarBaseTemplateTb {
|
||||||
data: [AvatarBaseTemplate];
|
data: [AvatarBaseTemplate];
|
||||||
}
|
}
|
||||||
|
|
||||||
root_type AvatarBaseTemplateTb;
|
table WeaponTemplateTb {
|
||||||
|
data: [WeaponTemplate];
|
||||||
|
}
|
||||||
|
|
|
@ -9,6 +9,254 @@ use core::cmp::Ordering;
|
||||||
extern crate flatbuffers;
|
extern crate flatbuffers;
|
||||||
use self::flatbuffers::{EndianScalar, Follow};
|
use self::flatbuffers::{EndianScalar, Follow};
|
||||||
|
|
||||||
|
// struct Property, aligned to 4
|
||||||
|
#[repr(transparent)]
|
||||||
|
#[derive(Clone, Copy, PartialEq)]
|
||||||
|
pub struct Property(pub [u8; 8]);
|
||||||
|
impl Default for Property {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self([0; 8])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl core::fmt::Debug for Property {
|
||||||
|
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
|
||||||
|
f.debug_struct("Property")
|
||||||
|
.field("property", &self.property())
|
||||||
|
.field("value", &self.value())
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl flatbuffers::SimpleToVerifyInSlice for Property {}
|
||||||
|
impl<'a> flatbuffers::Follow<'a> for Property {
|
||||||
|
type Inner = &'a Property;
|
||||||
|
#[inline]
|
||||||
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||||
|
<&'a Property>::follow(buf, loc)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'a> flatbuffers::Follow<'a> for &'a Property {
|
||||||
|
type Inner = &'a Property;
|
||||||
|
#[inline]
|
||||||
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||||
|
flatbuffers::follow_cast_ref::<Property>(buf, loc)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'b> flatbuffers::Push for Property {
|
||||||
|
type Output = Property;
|
||||||
|
#[inline]
|
||||||
|
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
|
||||||
|
let src = ::core::slice::from_raw_parts(self as *const Property as *const u8, Self::size());
|
||||||
|
dst.copy_from_slice(src);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> flatbuffers::Verifiable for Property {
|
||||||
|
#[inline]
|
||||||
|
fn run_verifier(
|
||||||
|
v: &mut flatbuffers::Verifier, pos: usize
|
||||||
|
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
||||||
|
use self::flatbuffers::Verifiable;
|
||||||
|
v.in_buffer::<Self>(pos)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> Property {
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
|
pub fn new(
|
||||||
|
property: i32,
|
||||||
|
value: i32,
|
||||||
|
) -> Self {
|
||||||
|
let mut s = Self([0; 8]);
|
||||||
|
s.set_property(property);
|
||||||
|
s.set_value(value);
|
||||||
|
s
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn property(&self) -> i32 {
|
||||||
|
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
|
||||||
|
// Safety:
|
||||||
|
// Created from a valid Table for this object
|
||||||
|
// Which contains a valid value in this slot
|
||||||
|
EndianScalar::from_little_endian(unsafe {
|
||||||
|
core::ptr::copy_nonoverlapping(
|
||||||
|
self.0[0..].as_ptr(),
|
||||||
|
mem.as_mut_ptr() as *mut u8,
|
||||||
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
||||||
|
);
|
||||||
|
mem.assume_init()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_property(&mut self, x: i32) {
|
||||||
|
let x_le = x.to_little_endian();
|
||||||
|
// Safety:
|
||||||
|
// Created from a valid Table for this object
|
||||||
|
// Which contains a valid value in this slot
|
||||||
|
unsafe {
|
||||||
|
core::ptr::copy_nonoverlapping(
|
||||||
|
&x_le as *const _ as *const u8,
|
||||||
|
self.0[0..].as_mut_ptr(),
|
||||||
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn value(&self) -> i32 {
|
||||||
|
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
|
||||||
|
// Safety:
|
||||||
|
// Created from a valid Table for this object
|
||||||
|
// Which contains a valid value in this slot
|
||||||
|
EndianScalar::from_little_endian(unsafe {
|
||||||
|
core::ptr::copy_nonoverlapping(
|
||||||
|
self.0[4..].as_ptr(),
|
||||||
|
mem.as_mut_ptr() as *mut u8,
|
||||||
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
||||||
|
);
|
||||||
|
mem.assume_init()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_value(&mut self, x: i32) {
|
||||||
|
let x_le = x.to_little_endian();
|
||||||
|
// Safety:
|
||||||
|
// Created from a valid Table for this object
|
||||||
|
// Which contains a valid value in this slot
|
||||||
|
unsafe {
|
||||||
|
core::ptr::copy_nonoverlapping(
|
||||||
|
&x_le as *const _ as *const u8,
|
||||||
|
self.0[4..].as_mut_ptr(),
|
||||||
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// struct RefineCost, aligned to 4
|
||||||
|
#[repr(transparent)]
|
||||||
|
#[derive(Clone, Copy, PartialEq)]
|
||||||
|
pub struct RefineCost(pub [u8; 8]);
|
||||||
|
impl Default for RefineCost {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self([0; 8])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl core::fmt::Debug for RefineCost {
|
||||||
|
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
|
||||||
|
f.debug_struct("RefineCost")
|
||||||
|
.field("item_id", &self.item_id())
|
||||||
|
.field("number", &self.number())
|
||||||
|
.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl flatbuffers::SimpleToVerifyInSlice for RefineCost {}
|
||||||
|
impl<'a> flatbuffers::Follow<'a> for RefineCost {
|
||||||
|
type Inner = &'a RefineCost;
|
||||||
|
#[inline]
|
||||||
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||||
|
<&'a RefineCost>::follow(buf, loc)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'a> flatbuffers::Follow<'a> for &'a RefineCost {
|
||||||
|
type Inner = &'a RefineCost;
|
||||||
|
#[inline]
|
||||||
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||||
|
flatbuffers::follow_cast_ref::<RefineCost>(buf, loc)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
impl<'b> flatbuffers::Push for RefineCost {
|
||||||
|
type Output = RefineCost;
|
||||||
|
#[inline]
|
||||||
|
unsafe fn push(&self, dst: &mut [u8], _written_len: usize) {
|
||||||
|
let src = ::core::slice::from_raw_parts(self as *const RefineCost as *const u8, Self::size());
|
||||||
|
dst.copy_from_slice(src);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> flatbuffers::Verifiable for RefineCost {
|
||||||
|
#[inline]
|
||||||
|
fn run_verifier(
|
||||||
|
v: &mut flatbuffers::Verifier, pos: usize
|
||||||
|
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
||||||
|
use self::flatbuffers::Verifiable;
|
||||||
|
v.in_buffer::<Self>(pos)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> RefineCost {
|
||||||
|
#[allow(clippy::too_many_arguments)]
|
||||||
|
pub fn new(
|
||||||
|
item_id: i32,
|
||||||
|
number: i32,
|
||||||
|
) -> Self {
|
||||||
|
let mut s = Self([0; 8]);
|
||||||
|
s.set_item_id(item_id);
|
||||||
|
s.set_number(number);
|
||||||
|
s
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn item_id(&self) -> i32 {
|
||||||
|
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
|
||||||
|
// Safety:
|
||||||
|
// Created from a valid Table for this object
|
||||||
|
// Which contains a valid value in this slot
|
||||||
|
EndianScalar::from_little_endian(unsafe {
|
||||||
|
core::ptr::copy_nonoverlapping(
|
||||||
|
self.0[0..].as_ptr(),
|
||||||
|
mem.as_mut_ptr() as *mut u8,
|
||||||
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
||||||
|
);
|
||||||
|
mem.assume_init()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_item_id(&mut self, x: i32) {
|
||||||
|
let x_le = x.to_little_endian();
|
||||||
|
// Safety:
|
||||||
|
// Created from a valid Table for this object
|
||||||
|
// Which contains a valid value in this slot
|
||||||
|
unsafe {
|
||||||
|
core::ptr::copy_nonoverlapping(
|
||||||
|
&x_le as *const _ as *const u8,
|
||||||
|
self.0[0..].as_mut_ptr(),
|
||||||
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn number(&self) -> i32 {
|
||||||
|
let mut mem = core::mem::MaybeUninit::<<i32 as EndianScalar>::Scalar>::uninit();
|
||||||
|
// Safety:
|
||||||
|
// Created from a valid Table for this object
|
||||||
|
// Which contains a valid value in this slot
|
||||||
|
EndianScalar::from_little_endian(unsafe {
|
||||||
|
core::ptr::copy_nonoverlapping(
|
||||||
|
self.0[4..].as_ptr(),
|
||||||
|
mem.as_mut_ptr() as *mut u8,
|
||||||
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
||||||
|
);
|
||||||
|
mem.assume_init()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn set_number(&mut self, x: i32) {
|
||||||
|
let x_le = x.to_little_endian();
|
||||||
|
// Safety:
|
||||||
|
// Created from a valid Table for this object
|
||||||
|
// Which contains a valid value in this slot
|
||||||
|
unsafe {
|
||||||
|
core::ptr::copy_nonoverlapping(
|
||||||
|
&x_le as *const _ as *const u8,
|
||||||
|
self.0[4..].as_mut_ptr(),
|
||||||
|
core::mem::size_of::<<i32 as EndianScalar>::Scalar>(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
pub enum AvatarBaseTemplateOffset {}
|
pub enum AvatarBaseTemplateOffset {}
|
||||||
#[derive(Copy, Clone, PartialEq)]
|
#[derive(Copy, Clone, PartialEq)]
|
||||||
|
|
||||||
|
@ -293,6 +541,545 @@ impl core::fmt::Debug for AvatarBaseTemplate<'_> {
|
||||||
ds.finish()
|
ds.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
pub enum WeaponTemplateOffset {}
|
||||||
|
#[derive(Copy, Clone, PartialEq)]
|
||||||
|
|
||||||
|
pub struct WeaponTemplate<'a> {
|
||||||
|
pub _tab: flatbuffers::Table<'a>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> flatbuffers::Follow<'a> for WeaponTemplate<'a> {
|
||||||
|
type Inner = WeaponTemplate<'a>;
|
||||||
|
#[inline]
|
||||||
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||||
|
Self { _tab: flatbuffers::Table::new(buf, loc) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> WeaponTemplate<'a> {
|
||||||
|
pub const VT_ITEM_ID: flatbuffers::VOffsetT = 4;
|
||||||
|
pub const VT_WEAPON_NAME: flatbuffers::VOffsetT = 6;
|
||||||
|
pub const VT_UNK_MISSING_FIELD: flatbuffers::VOffsetT = 8;
|
||||||
|
pub const VT_BASE_PROPERTY: flatbuffers::VOffsetT = 10;
|
||||||
|
pub const VT_RAND_PROPERTY: flatbuffers::VOffsetT = 12;
|
||||||
|
pub const VT_STAR_LIMIT: flatbuffers::VOffsetT = 14;
|
||||||
|
pub const VT_EXP_RECYCLE: flatbuffers::VOffsetT = 16;
|
||||||
|
pub const VT_WEAPON_SCRIPT_CONFIG: flatbuffers::VOffsetT = 18;
|
||||||
|
pub const VT_WEAPON_UI_MODEL: flatbuffers::VOffsetT = 20;
|
||||||
|
pub const VT_UNK_1: flatbuffers::VOffsetT = 22;
|
||||||
|
pub const VT_UNK_MISSING_FIELD_2: flatbuffers::VOffsetT = 24;
|
||||||
|
pub const VT_UNK_WEAPON_PATH: flatbuffers::VOffsetT = 26;
|
||||||
|
pub const VT_UNK_MISSING_FIELD_3: flatbuffers::VOffsetT = 28;
|
||||||
|
pub const VT_REFINE_INITIAL: flatbuffers::VOffsetT = 30;
|
||||||
|
pub const VT_REFINE_LIMIT: flatbuffers::VOffsetT = 32;
|
||||||
|
pub const VT_UNK_MISSING_FIELD_4: flatbuffers::VOffsetT = 34;
|
||||||
|
pub const VT_UNK_MISSING_FIELD_5: flatbuffers::VOffsetT = 36;
|
||||||
|
pub const VT_UNK_STRING_WITH_VALUES: flatbuffers::VOffsetT = 38;
|
||||||
|
pub const VT_UNK_MISSING_FIELD_6: flatbuffers::VOffsetT = 40;
|
||||||
|
pub const VT_UNK_2: flatbuffers::VOffsetT = 42;
|
||||||
|
pub const VT_WEAPON_DESC: flatbuffers::VOffsetT = 44;
|
||||||
|
pub const VT_WEAPON_RELEASE_TAG: flatbuffers::VOffsetT = 46;
|
||||||
|
pub const VT_UNK_EMPTY_STRING: flatbuffers::VOffsetT = 48;
|
||||||
|
pub const VT_AVATAR_ID: flatbuffers::VOffsetT = 50;
|
||||||
|
pub const VT_WEAPON_COMMENT: flatbuffers::VOffsetT = 52;
|
||||||
|
pub const VT_REFINE_COSTS: flatbuffers::VOffsetT = 54;
|
||||||
|
pub const VT_UNK_3: flatbuffers::VOffsetT = 56;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
||||||
|
WeaponTemplate { _tab: table }
|
||||||
|
}
|
||||||
|
#[allow(unused_mut)]
|
||||||
|
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
|
||||||
|
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
|
||||||
|
args: &'args WeaponTemplateArgs<'args>
|
||||||
|
) -> flatbuffers::WIPOffset<WeaponTemplate<'bldr>> {
|
||||||
|
let mut builder = WeaponTemplateBuilder::new(_fbb);
|
||||||
|
builder.add_unk_3(args.unk_3);
|
||||||
|
if let Some(x) = args.refine_costs { builder.add_refine_costs(x); }
|
||||||
|
if let Some(x) = args.weapon_comment { builder.add_weapon_comment(x); }
|
||||||
|
builder.add_avatar_id(args.avatar_id);
|
||||||
|
if let Some(x) = args.unk_empty_string { builder.add_unk_empty_string(x); }
|
||||||
|
if let Some(x) = args.weapon_release_tag { builder.add_weapon_release_tag(x); }
|
||||||
|
if let Some(x) = args.weapon_desc { builder.add_weapon_desc(x); }
|
||||||
|
builder.add_unk_2(args.unk_2);
|
||||||
|
builder.add_unk_missing_field_6(args.unk_missing_field_6);
|
||||||
|
if let Some(x) = args.unk_string_with_values { builder.add_unk_string_with_values(x); }
|
||||||
|
builder.add_unk_missing_field_5(args.unk_missing_field_5);
|
||||||
|
builder.add_unk_missing_field_4(args.unk_missing_field_4);
|
||||||
|
builder.add_refine_limit(args.refine_limit);
|
||||||
|
builder.add_refine_initial(args.refine_initial);
|
||||||
|
builder.add_unk_missing_field_3(args.unk_missing_field_3);
|
||||||
|
if let Some(x) = args.unk_weapon_path { builder.add_unk_weapon_path(x); }
|
||||||
|
builder.add_unk_missing_field_2(args.unk_missing_field_2);
|
||||||
|
builder.add_unk_1(args.unk_1);
|
||||||
|
if let Some(x) = args.weapon_ui_model { builder.add_weapon_ui_model(x); }
|
||||||
|
if let Some(x) = args.weapon_script_config { builder.add_weapon_script_config(x); }
|
||||||
|
builder.add_exp_recycle(args.exp_recycle);
|
||||||
|
builder.add_star_limit(args.star_limit);
|
||||||
|
if let Some(x) = args.rand_property { builder.add_rand_property(x); }
|
||||||
|
if let Some(x) = args.base_property { builder.add_base_property(x); }
|
||||||
|
builder.add_unk_missing_field(args.unk_missing_field);
|
||||||
|
if let Some(x) = args.weapon_name { builder.add_weapon_name(x); }
|
||||||
|
builder.add_item_id(args.item_id);
|
||||||
|
builder.finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub fn item_id(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_ITEM_ID, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn weapon_name(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_NAME, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_missing_field(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn base_property(&self) -> Option<&'a Property> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<Property>(WeaponTemplate::VT_BASE_PROPERTY, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn rand_property(&self) -> Option<&'a Property> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<Property>(WeaponTemplate::VT_RAND_PROPERTY, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn star_limit(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_STAR_LIMIT, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn exp_recycle(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_EXP_RECYCLE, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn weapon_script_config(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_SCRIPT_CONFIG, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn weapon_ui_model(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_UI_MODEL, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_1(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_1, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_missing_field_2(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_2, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_weapon_path(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_UNK_WEAPON_PATH, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_missing_field_3(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_3, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn refine_initial(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_REFINE_INITIAL, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn refine_limit(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_REFINE_LIMIT, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_missing_field_4(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_4, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_missing_field_5(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_5, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_string_with_values(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_UNK_STRING_WITH_VALUES, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_missing_field_6(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_6, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_2(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_2, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn weapon_desc(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_DESC, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn weapon_release_tag(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_RELEASE_TAG, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_empty_string(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_UNK_EMPTY_STRING, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn avatar_id(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_AVATAR_ID, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn weapon_comment(&self) -> Option<&'a str> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(WeaponTemplate::VT_WEAPON_COMMENT, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn refine_costs(&self) -> Option<flatbuffers::Vector<'a, RefineCost>> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, RefineCost>>>(WeaponTemplate::VT_REFINE_COSTS, None)}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn unk_3(&self) -> i32 {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<i32>(WeaponTemplate::VT_UNK_3, Some(0)).unwrap()}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl flatbuffers::Verifiable for WeaponTemplate<'_> {
|
||||||
|
#[inline]
|
||||||
|
fn run_verifier(
|
||||||
|
v: &mut flatbuffers::Verifier, pos: usize
|
||||||
|
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
||||||
|
use self::flatbuffers::Verifiable;
|
||||||
|
v.visit_table(pos)?
|
||||||
|
.visit_field::<i32>("item_id", Self::VT_ITEM_ID, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_name", Self::VT_WEAPON_NAME, false)?
|
||||||
|
.visit_field::<i32>("unk_missing_field", Self::VT_UNK_MISSING_FIELD, false)?
|
||||||
|
.visit_field::<Property>("base_property", Self::VT_BASE_PROPERTY, false)?
|
||||||
|
.visit_field::<Property>("rand_property", Self::VT_RAND_PROPERTY, false)?
|
||||||
|
.visit_field::<i32>("star_limit", Self::VT_STAR_LIMIT, false)?
|
||||||
|
.visit_field::<i32>("exp_recycle", Self::VT_EXP_RECYCLE, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_script_config", Self::VT_WEAPON_SCRIPT_CONFIG, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_ui_model", Self::VT_WEAPON_UI_MODEL, false)?
|
||||||
|
.visit_field::<i32>("unk_1", Self::VT_UNK_1, false)?
|
||||||
|
.visit_field::<i32>("unk_missing_field_2", Self::VT_UNK_MISSING_FIELD_2, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_weapon_path", Self::VT_UNK_WEAPON_PATH, false)?
|
||||||
|
.visit_field::<i32>("unk_missing_field_3", Self::VT_UNK_MISSING_FIELD_3, false)?
|
||||||
|
.visit_field::<i32>("refine_initial", Self::VT_REFINE_INITIAL, false)?
|
||||||
|
.visit_field::<i32>("refine_limit", Self::VT_REFINE_LIMIT, false)?
|
||||||
|
.visit_field::<i32>("unk_missing_field_4", Self::VT_UNK_MISSING_FIELD_4, false)?
|
||||||
|
.visit_field::<i32>("unk_missing_field_5", Self::VT_UNK_MISSING_FIELD_5, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_string_with_values", Self::VT_UNK_STRING_WITH_VALUES, false)?
|
||||||
|
.visit_field::<i32>("unk_missing_field_6", Self::VT_UNK_MISSING_FIELD_6, false)?
|
||||||
|
.visit_field::<i32>("unk_2", Self::VT_UNK_2, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_desc", Self::VT_WEAPON_DESC, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_release_tag", Self::VT_WEAPON_RELEASE_TAG, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("unk_empty_string", Self::VT_UNK_EMPTY_STRING, false)?
|
||||||
|
.visit_field::<i32>("avatar_id", Self::VT_AVATAR_ID, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<&str>>("weapon_comment", Self::VT_WEAPON_COMMENT, false)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, RefineCost>>>("refine_costs", Self::VT_REFINE_COSTS, false)?
|
||||||
|
.visit_field::<i32>("unk_3", Self::VT_UNK_3, false)?
|
||||||
|
.finish();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub struct WeaponTemplateArgs<'a> {
|
||||||
|
pub item_id: i32,
|
||||||
|
pub weapon_name: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub unk_missing_field: i32,
|
||||||
|
pub base_property: Option<&'a Property>,
|
||||||
|
pub rand_property: Option<&'a Property>,
|
||||||
|
pub star_limit: i32,
|
||||||
|
pub exp_recycle: i32,
|
||||||
|
pub weapon_script_config: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub weapon_ui_model: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub unk_1: i32,
|
||||||
|
pub unk_missing_field_2: i32,
|
||||||
|
pub unk_weapon_path: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub unk_missing_field_3: i32,
|
||||||
|
pub refine_initial: i32,
|
||||||
|
pub refine_limit: i32,
|
||||||
|
pub unk_missing_field_4: i32,
|
||||||
|
pub unk_missing_field_5: i32,
|
||||||
|
pub unk_string_with_values: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub unk_missing_field_6: i32,
|
||||||
|
pub unk_2: i32,
|
||||||
|
pub weapon_desc: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub weapon_release_tag: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub unk_empty_string: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub avatar_id: i32,
|
||||||
|
pub weapon_comment: Option<flatbuffers::WIPOffset<&'a str>>,
|
||||||
|
pub refine_costs: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, RefineCost>>>,
|
||||||
|
pub unk_3: i32,
|
||||||
|
}
|
||||||
|
impl<'a> Default for WeaponTemplateArgs<'a> {
|
||||||
|
#[inline]
|
||||||
|
fn default() -> Self {
|
||||||
|
WeaponTemplateArgs {
|
||||||
|
item_id: 0,
|
||||||
|
weapon_name: None,
|
||||||
|
unk_missing_field: 0,
|
||||||
|
base_property: None,
|
||||||
|
rand_property: None,
|
||||||
|
star_limit: 0,
|
||||||
|
exp_recycle: 0,
|
||||||
|
weapon_script_config: None,
|
||||||
|
weapon_ui_model: None,
|
||||||
|
unk_1: 0,
|
||||||
|
unk_missing_field_2: 0,
|
||||||
|
unk_weapon_path: None,
|
||||||
|
unk_missing_field_3: 0,
|
||||||
|
refine_initial: 0,
|
||||||
|
refine_limit: 0,
|
||||||
|
unk_missing_field_4: 0,
|
||||||
|
unk_missing_field_5: 0,
|
||||||
|
unk_string_with_values: None,
|
||||||
|
unk_missing_field_6: 0,
|
||||||
|
unk_2: 0,
|
||||||
|
weapon_desc: None,
|
||||||
|
weapon_release_tag: None,
|
||||||
|
unk_empty_string: None,
|
||||||
|
avatar_id: 0,
|
||||||
|
weapon_comment: None,
|
||||||
|
refine_costs: None,
|
||||||
|
unk_3: 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct WeaponTemplateBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
|
||||||
|
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
||||||
|
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
||||||
|
}
|
||||||
|
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponTemplateBuilder<'a, 'b, A> {
|
||||||
|
#[inline]
|
||||||
|
pub fn add_item_id(&mut self, item_id: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_ITEM_ID, item_id, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_weapon_name(&mut self, weapon_name: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_NAME, weapon_name);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_missing_field(&mut self, unk_missing_field: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD, unk_missing_field, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_base_property(&mut self, base_property: &Property) {
|
||||||
|
self.fbb_.push_slot_always::<&Property>(WeaponTemplate::VT_BASE_PROPERTY, base_property);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_rand_property(&mut self, rand_property: &Property) {
|
||||||
|
self.fbb_.push_slot_always::<&Property>(WeaponTemplate::VT_RAND_PROPERTY, rand_property);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_star_limit(&mut self, star_limit: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_STAR_LIMIT, star_limit, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_exp_recycle(&mut self, exp_recycle: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_EXP_RECYCLE, exp_recycle, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_weapon_script_config(&mut self, weapon_script_config: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_SCRIPT_CONFIG, weapon_script_config);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_weapon_ui_model(&mut self, weapon_ui_model: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_UI_MODEL, weapon_ui_model);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_1(&mut self, unk_1: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_1, unk_1, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_missing_field_2(&mut self, unk_missing_field_2: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_2, unk_missing_field_2, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_weapon_path(&mut self, unk_weapon_path: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_UNK_WEAPON_PATH, unk_weapon_path);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_missing_field_3(&mut self, unk_missing_field_3: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_3, unk_missing_field_3, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_refine_initial(&mut self, refine_initial: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_REFINE_INITIAL, refine_initial, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_refine_limit(&mut self, refine_limit: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_REFINE_LIMIT, refine_limit, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_missing_field_4(&mut self, unk_missing_field_4: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_4, unk_missing_field_4, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_missing_field_5(&mut self, unk_missing_field_5: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_5, unk_missing_field_5, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_string_with_values(&mut self, unk_string_with_values: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_UNK_STRING_WITH_VALUES, unk_string_with_values);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_missing_field_6(&mut self, unk_missing_field_6: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_MISSING_FIELD_6, unk_missing_field_6, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_2(&mut self, unk_2: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_2, unk_2, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_weapon_desc(&mut self, weapon_desc: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_DESC, weapon_desc);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_weapon_release_tag(&mut self, weapon_release_tag: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_RELEASE_TAG, weapon_release_tag);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_empty_string(&mut self, unk_empty_string: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_UNK_EMPTY_STRING, unk_empty_string);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_avatar_id(&mut self, avatar_id: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_AVATAR_ID, avatar_id, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_weapon_comment(&mut self, weapon_comment: flatbuffers::WIPOffset<&'b str>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_WEAPON_COMMENT, weapon_comment);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_refine_costs(&mut self, refine_costs: flatbuffers::WIPOffset<flatbuffers::Vector<'b , RefineCost>>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplate::VT_REFINE_COSTS, refine_costs);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn add_unk_3(&mut self, unk_3: i32) {
|
||||||
|
self.fbb_.push_slot::<i32>(WeaponTemplate::VT_UNK_3, unk_3, 0);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> WeaponTemplateBuilder<'a, 'b, A> {
|
||||||
|
let start = _fbb.start_table();
|
||||||
|
WeaponTemplateBuilder {
|
||||||
|
fbb_: _fbb,
|
||||||
|
start_: start,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn finish(self) -> flatbuffers::WIPOffset<WeaponTemplate<'a>> {
|
||||||
|
let o = self.fbb_.end_table(self.start_);
|
||||||
|
flatbuffers::WIPOffset::new(o.value())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl core::fmt::Debug for WeaponTemplate<'_> {
|
||||||
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||||
|
let mut ds = f.debug_struct("WeaponTemplate");
|
||||||
|
ds.field("item_id", &self.item_id());
|
||||||
|
ds.field("weapon_name", &self.weapon_name());
|
||||||
|
ds.field("unk_missing_field", &self.unk_missing_field());
|
||||||
|
ds.field("base_property", &self.base_property());
|
||||||
|
ds.field("rand_property", &self.rand_property());
|
||||||
|
ds.field("star_limit", &self.star_limit());
|
||||||
|
ds.field("exp_recycle", &self.exp_recycle());
|
||||||
|
ds.field("weapon_script_config", &self.weapon_script_config());
|
||||||
|
ds.field("weapon_ui_model", &self.weapon_ui_model());
|
||||||
|
ds.field("unk_1", &self.unk_1());
|
||||||
|
ds.field("unk_missing_field_2", &self.unk_missing_field_2());
|
||||||
|
ds.field("unk_weapon_path", &self.unk_weapon_path());
|
||||||
|
ds.field("unk_missing_field_3", &self.unk_missing_field_3());
|
||||||
|
ds.field("refine_initial", &self.refine_initial());
|
||||||
|
ds.field("refine_limit", &self.refine_limit());
|
||||||
|
ds.field("unk_missing_field_4", &self.unk_missing_field_4());
|
||||||
|
ds.field("unk_missing_field_5", &self.unk_missing_field_5());
|
||||||
|
ds.field("unk_string_with_values", &self.unk_string_with_values());
|
||||||
|
ds.field("unk_missing_field_6", &self.unk_missing_field_6());
|
||||||
|
ds.field("unk_2", &self.unk_2());
|
||||||
|
ds.field("weapon_desc", &self.weapon_desc());
|
||||||
|
ds.field("weapon_release_tag", &self.weapon_release_tag());
|
||||||
|
ds.field("unk_empty_string", &self.unk_empty_string());
|
||||||
|
ds.field("avatar_id", &self.avatar_id());
|
||||||
|
ds.field("weapon_comment", &self.weapon_comment());
|
||||||
|
ds.field("refine_costs", &self.refine_costs());
|
||||||
|
ds.field("unk_3", &self.unk_3());
|
||||||
|
ds.finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
pub enum AvatarBaseTemplateTbOffset {}
|
pub enum AvatarBaseTemplateTbOffset {}
|
||||||
#[derive(Copy, Clone, PartialEq)]
|
#[derive(Copy, Clone, PartialEq)]
|
||||||
|
|
||||||
|
@ -390,74 +1177,100 @@ impl core::fmt::Debug for AvatarBaseTemplateTb<'_> {
|
||||||
ds.finish()
|
ds.finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[inline]
|
pub enum WeaponTemplateTbOffset {}
|
||||||
/// Verifies that a buffer of bytes contains a `AvatarBaseTemplateTb`
|
#[derive(Copy, Clone, PartialEq)]
|
||||||
/// and returns it.
|
|
||||||
/// Note that verification is still experimental and may not
|
pub struct WeaponTemplateTb<'a> {
|
||||||
/// catch every error, or be maximally performant. For the
|
pub _tab: flatbuffers::Table<'a>,
|
||||||
/// previous, unchecked, behavior use
|
|
||||||
/// `root_as_avatar_base_template_tb_unchecked`.
|
|
||||||
pub fn root_as_avatar_base_template_tb(buf: &[u8]) -> Result<AvatarBaseTemplateTb, flatbuffers::InvalidFlatbuffer> {
|
|
||||||
flatbuffers::root::<AvatarBaseTemplateTb>(buf)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
/// Verifies that a buffer of bytes contains a size prefixed
|
|
||||||
/// `AvatarBaseTemplateTb` and returns it.
|
|
||||||
/// Note that verification is still experimental and may not
|
|
||||||
/// catch every error, or be maximally performant. For the
|
|
||||||
/// previous, unchecked, behavior use
|
|
||||||
/// `size_prefixed_root_as_avatar_base_template_tb_unchecked`.
|
|
||||||
pub fn size_prefixed_root_as_avatar_base_template_tb(buf: &[u8]) -> Result<AvatarBaseTemplateTb, flatbuffers::InvalidFlatbuffer> {
|
|
||||||
flatbuffers::size_prefixed_root::<AvatarBaseTemplateTb>(buf)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
/// Verifies, with the given options, that a buffer of bytes
|
|
||||||
/// contains a `AvatarBaseTemplateTb` and returns it.
|
|
||||||
/// Note that verification is still experimental and may not
|
|
||||||
/// catch every error, or be maximally performant. For the
|
|
||||||
/// previous, unchecked, behavior use
|
|
||||||
/// `root_as_avatar_base_template_tb_unchecked`.
|
|
||||||
pub fn root_as_avatar_base_template_tb_with_opts<'b, 'o>(
|
|
||||||
opts: &'o flatbuffers::VerifierOptions,
|
|
||||||
buf: &'b [u8],
|
|
||||||
) -> Result<AvatarBaseTemplateTb<'b>, flatbuffers::InvalidFlatbuffer> {
|
|
||||||
flatbuffers::root_with_opts::<AvatarBaseTemplateTb<'b>>(opts, buf)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
/// Verifies, with the given verifier options, that a buffer of
|
|
||||||
/// bytes contains a size prefixed `AvatarBaseTemplateTb` and returns
|
|
||||||
/// it. Note that verification is still experimental and may not
|
|
||||||
/// catch every error, or be maximally performant. For the
|
|
||||||
/// previous, unchecked, behavior use
|
|
||||||
/// `root_as_avatar_base_template_tb_unchecked`.
|
|
||||||
pub fn size_prefixed_root_as_avatar_base_template_tb_with_opts<'b, 'o>(
|
|
||||||
opts: &'o flatbuffers::VerifierOptions,
|
|
||||||
buf: &'b [u8],
|
|
||||||
) -> Result<AvatarBaseTemplateTb<'b>, flatbuffers::InvalidFlatbuffer> {
|
|
||||||
flatbuffers::size_prefixed_root_with_opts::<AvatarBaseTemplateTb<'b>>(opts, buf)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
/// Assumes, without verification, that a buffer of bytes contains a AvatarBaseTemplateTb and returns it.
|
|
||||||
/// # Safety
|
|
||||||
/// Callers must trust the given bytes do indeed contain a valid `AvatarBaseTemplateTb`.
|
|
||||||
pub unsafe fn root_as_avatar_base_template_tb_unchecked(buf: &[u8]) -> AvatarBaseTemplateTb {
|
|
||||||
flatbuffers::root_unchecked::<AvatarBaseTemplateTb>(buf)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
/// Assumes, without verification, that a buffer of bytes contains a size prefixed AvatarBaseTemplateTb and returns it.
|
|
||||||
/// # Safety
|
|
||||||
/// Callers must trust the given bytes do indeed contain a valid size prefixed `AvatarBaseTemplateTb`.
|
|
||||||
pub unsafe fn size_prefixed_root_as_avatar_base_template_tb_unchecked(buf: &[u8]) -> AvatarBaseTemplateTb {
|
|
||||||
flatbuffers::size_prefixed_root_unchecked::<AvatarBaseTemplateTb>(buf)
|
|
||||||
}
|
|
||||||
#[inline]
|
|
||||||
pub fn finish_avatar_base_template_tb_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(
|
|
||||||
fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
|
||||||
root: flatbuffers::WIPOffset<AvatarBaseTemplateTb<'a>>) {
|
|
||||||
fbb.finish(root, None);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<'a> flatbuffers::Follow<'a> for WeaponTemplateTb<'a> {
|
||||||
|
type Inner = WeaponTemplateTb<'a>;
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn finish_size_prefixed_avatar_base_template_tb_buffer<'a, 'b, A: flatbuffers::Allocator + 'a>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>, root: flatbuffers::WIPOffset<AvatarBaseTemplateTb<'a>>) {
|
unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
|
||||||
fbb.finish_size_prefixed(root, None);
|
Self { _tab: flatbuffers::Table::new(buf, loc) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'a> WeaponTemplateTb<'a> {
|
||||||
|
pub const VT_DATA: flatbuffers::VOffsetT = 4;
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
|
||||||
|
WeaponTemplateTb { _tab: table }
|
||||||
|
}
|
||||||
|
#[allow(unused_mut)]
|
||||||
|
pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr, A: flatbuffers::Allocator + 'bldr>(
|
||||||
|
_fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr, A>,
|
||||||
|
args: &'args WeaponTemplateTbArgs<'args>
|
||||||
|
) -> flatbuffers::WIPOffset<WeaponTemplateTb<'bldr>> {
|
||||||
|
let mut builder = WeaponTemplateTbBuilder::new(_fbb);
|
||||||
|
if let Some(x) = args.data { builder.add_data(x); }
|
||||||
|
builder.finish()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#[inline]
|
||||||
|
pub fn data(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<WeaponTemplate<'a>>>> {
|
||||||
|
// Safety:
|
||||||
|
// Created from valid Table for this object
|
||||||
|
// which contains a valid value in this slot
|
||||||
|
unsafe { self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<WeaponTemplate>>>>(WeaponTemplateTb::VT_DATA, None)}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl flatbuffers::Verifiable for WeaponTemplateTb<'_> {
|
||||||
|
#[inline]
|
||||||
|
fn run_verifier(
|
||||||
|
v: &mut flatbuffers::Verifier, pos: usize
|
||||||
|
) -> Result<(), flatbuffers::InvalidFlatbuffer> {
|
||||||
|
use self::flatbuffers::Verifiable;
|
||||||
|
v.visit_table(pos)?
|
||||||
|
.visit_field::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'_, flatbuffers::ForwardsUOffset<WeaponTemplate>>>>("data", Self::VT_DATA, false)?
|
||||||
|
.finish();
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
pub struct WeaponTemplateTbArgs<'a> {
|
||||||
|
pub data: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<WeaponTemplate<'a>>>>>,
|
||||||
|
}
|
||||||
|
impl<'a> Default for WeaponTemplateTbArgs<'a> {
|
||||||
|
#[inline]
|
||||||
|
fn default() -> Self {
|
||||||
|
WeaponTemplateTbArgs {
|
||||||
|
data: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub struct WeaponTemplateTbBuilder<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> {
|
||||||
|
fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a, A>,
|
||||||
|
start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
|
||||||
|
}
|
||||||
|
impl<'a: 'b, 'b, A: flatbuffers::Allocator + 'a> WeaponTemplateTbBuilder<'a, 'b, A> {
|
||||||
|
#[inline]
|
||||||
|
pub fn add_data(&mut self, data: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<WeaponTemplate<'b >>>>) {
|
||||||
|
self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(WeaponTemplateTb::VT_DATA, data);
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a, A>) -> WeaponTemplateTbBuilder<'a, 'b, A> {
|
||||||
|
let start = _fbb.start_table();
|
||||||
|
WeaponTemplateTbBuilder {
|
||||||
|
fbb_: _fbb,
|
||||||
|
start_: start,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[inline]
|
||||||
|
pub fn finish(self) -> flatbuffers::WIPOffset<WeaponTemplateTb<'a>> {
|
||||||
|
let o = self.fbb_.end_table(self.start_);
|
||||||
|
flatbuffers::WIPOffset::new(o.value())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl core::fmt::Debug for WeaponTemplateTb<'_> {
|
||||||
|
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
|
||||||
|
let mut ds = f.debug_struct("WeaponTemplateTb");
|
||||||
|
ds.field("data", &self.data());
|
||||||
|
ds.finish()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ macro_rules! file_cfg {
|
||||||
Self {
|
Self {
|
||||||
$(
|
$(
|
||||||
[<$name:snake>]: {
|
[<$name:snake>]: {
|
||||||
[<root_as_ $name:snake>](archive_file.open(::const_format::formatcp!("{}", ::xxhash_rust::const_xxh64::xxh64(stringify!([<$name:lower>]).as_bytes(), 0))).unwrap()).unwrap()
|
::flatbuffers::root::<$name>(archive_file.open(::const_format::formatcp!("{}", ::xxhash_rust::const_xxh64::xxh64(stringify!([<$name:lower>]).as_bytes(), 0))).unwrap()).unwrap()
|
||||||
},
|
},
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ macro_rules! file_cfg {
|
||||||
|
|
||||||
file_cfg! {
|
file_cfg! {
|
||||||
AvatarBaseTemplateTb;
|
AvatarBaseTemplateTb;
|
||||||
|
WeaponTemplateTb;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn read_archive_file<R: Read>(buf: R) -> std::io::Result<ArchiveFile> {
|
pub fn read_archive_file<R: Read>(buf: R) -> std::io::Result<ArchiveFile> {
|
||||||
|
|
|
@ -647,7 +647,7 @@ pub struct Pmnndmijimi {
|
||||||
#[prost(message, optional, tag = "1")]
|
#[prost(message, optional, tag = "1")]
|
||||||
pub iidnjcionhi: ::core::option::Option<Jiahalkoppm>,
|
pub iidnjcionhi: ::core::option::Option<Jiahalkoppm>,
|
||||||
#[prost(message, optional, tag = "2")]
|
#[prost(message, optional, tag = "2")]
|
||||||
pub fmkfjcmjjik: ::core::option::Option<Jiahalkoppm>,
|
pub param: ::core::option::Option<Jiahalkoppm>,
|
||||||
#[prost(enumeration = "Jpnihhbgepd", tag = "3")]
|
#[prost(enumeration = "Jpnihhbgepd", tag = "3")]
|
||||||
pub odnpbhepnoa: i32,
|
pub odnpbhepnoa: i32,
|
||||||
#[prost(enumeration = "Pcekojidped", tag = "4")]
|
#[prost(enumeration = "Pcekojidped", tag = "4")]
|
||||||
|
@ -2180,7 +2180,7 @@ pub struct Mmiiehdmfgp {
|
||||||
pub plcmabdfkpf: u32,
|
pub plcmabdfkpf: u32,
|
||||||
#[xor(9424)]
|
#[xor(9424)]
|
||||||
#[prost(uint32, tag = "7")]
|
#[prost(uint32, tag = "7")]
|
||||||
pub ohdkcchhekh: u32,
|
pub weapon_uid: u32,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
|
@ -5062,7 +5062,7 @@ pub struct Mjfpfcnncgp {
|
||||||
pub struct Bekmebilpcb {
|
pub struct Bekmebilpcb {
|
||||||
#[xor(433)]
|
#[xor(433)]
|
||||||
#[prost(int32, tag = "2")]
|
#[prost(int32, tag = "2")]
|
||||||
pub fmkfjcmjjik: i32,
|
pub param: i32,
|
||||||
#[xor(1641)]
|
#[xor(1641)]
|
||||||
#[prost(int32, tag = "6")]
|
#[prost(int32, tag = "6")]
|
||||||
pub dajkfnlgcbh: i32,
|
pub dajkfnlgcbh: i32,
|
||||||
|
@ -7671,7 +7671,7 @@ pub struct Iaklgbglpem {
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
pub struct Pokljdnilhl {
|
pub struct ItemSync {
|
||||||
#[prost(uint32, repeated, tag = "1")]
|
#[prost(uint32, repeated, tag = "1")]
|
||||||
pub icdbfaacpgk: ::prost::alloc::vec::Vec<u32>,
|
pub icdbfaacpgk: ::prost::alloc::vec::Vec<u32>,
|
||||||
#[prost(uint32, repeated, tag = "2")]
|
#[prost(uint32, repeated, tag = "2")]
|
||||||
|
@ -10367,12 +10367,12 @@ pub struct Jnmaoeoikpl {
|
||||||
#[cmdid(1918)]
|
#[cmdid(1918)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
pub struct Ecloiccbepc {
|
pub struct GetPlayerNetworkDataScRsp {
|
||||||
#[xor(11954)]
|
#[xor(11954)]
|
||||||
#[prost(int32, tag = "10")]
|
#[prost(int32, tag = "10")]
|
||||||
pub retcode: i32,
|
pub retcode: i32,
|
||||||
#[prost(message, optional, tag = "5")]
|
#[prost(message, optional, tag = "5")]
|
||||||
pub ccjiedgdklb: ::core::option::Option<Ijihfcaondn>,
|
pub player_network_data: ::core::option::Option<PlayerNetworkData>,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
|
@ -11854,7 +11854,7 @@ pub struct Njjffeiflin {
|
||||||
pub mcpmobeikhc: i64,
|
pub mcpmobeikhc: i64,
|
||||||
#[xor(3054)]
|
#[xor(3054)]
|
||||||
#[prost(uint32, tag = "9")]
|
#[prost(uint32, tag = "9")]
|
||||||
pub fmkfjcmjjik: u32,
|
pub param: u32,
|
||||||
#[xor(4875)]
|
#[xor(4875)]
|
||||||
#[prost(uint32, tag = "8")]
|
#[prost(uint32, tag = "8")]
|
||||||
pub fceflpmncba: u32,
|
pub fceflpmncba: u32,
|
||||||
|
@ -12204,7 +12204,7 @@ pub struct Mhbjjkncegl {
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
pub struct Poabpdcddaf {
|
pub struct Poabpdcddaf {
|
||||||
#[prost(message, optional, tag = "1")]
|
#[prost(message, optional, tag = "1")]
|
||||||
pub fmkfjcmjjik: ::core::option::Option<Hlndkenohjb>,
|
pub param: ::core::option::Option<Hlndkenohjb>,
|
||||||
#[prost(uint32, tag = "2")]
|
#[prost(uint32, tag = "2")]
|
||||||
pub khdllfefdko: u32,
|
pub khdllfefdko: u32,
|
||||||
#[prost(uint32, tag = "3")]
|
#[prost(uint32, tag = "3")]
|
||||||
|
@ -13137,7 +13137,7 @@ pub struct Ohockeiibig {
|
||||||
pub pbehkahplpc: bool,
|
pub pbehkahplpc: bool,
|
||||||
#[xor(5023)]
|
#[xor(5023)]
|
||||||
#[prost(uint32, tag = "14")]
|
#[prost(uint32, tag = "14")]
|
||||||
pub ohdkcchhekh: u32,
|
pub weapon_uid: u32,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[cmdid(4940)]
|
#[cmdid(4940)]
|
||||||
|
@ -13148,7 +13148,7 @@ pub struct Legpdhniadi {
|
||||||
pub aoppojcdgge: ::prost::alloc::vec::Vec<Ccpchecifcf>,
|
pub aoppojcdgge: ::prost::alloc::vec::Vec<Ccpchecifcf>,
|
||||||
#[xor(11061)]
|
#[xor(11061)]
|
||||||
#[prost(uint32, tag = "6")]
|
#[prost(uint32, tag = "6")]
|
||||||
pub fmkfjcmjjik: u32,
|
pub param: u32,
|
||||||
#[prost(enumeration = "Mdjodbafohl", tag = "14")]
|
#[prost(enumeration = "Mdjodbafohl", tag = "14")]
|
||||||
pub nkjhacjoagi: i32,
|
pub nkjhacjoagi: i32,
|
||||||
}
|
}
|
||||||
|
@ -13391,7 +13391,7 @@ pub struct AvatarInfo {
|
||||||
pub mggafoelnin: u32,
|
pub mggafoelnin: u32,
|
||||||
#[xor(5052)]
|
#[xor(5052)]
|
||||||
#[prost(uint32, tag = "2")]
|
#[prost(uint32, tag = "2")]
|
||||||
pub bleigcnljfo: u32,
|
pub cur_weapon_uid: u32,
|
||||||
#[prost(message, repeated, tag = "5")]
|
#[prost(message, repeated, tag = "5")]
|
||||||
pub skill_type_level: ::prost::alloc::vec::Vec<AvatarSkillInfo>,
|
pub skill_type_level: ::prost::alloc::vec::Vec<AvatarSkillInfo>,
|
||||||
#[xor(1670)]
|
#[xor(1670)]
|
||||||
|
@ -13704,7 +13704,7 @@ pub struct Pibgkaalkka {
|
||||||
#[prost(message, optional, tag = "1")]
|
#[prost(message, optional, tag = "1")]
|
||||||
pub iidnjcionhi: ::core::option::Option<Jiahalkoppm>,
|
pub iidnjcionhi: ::core::option::Option<Jiahalkoppm>,
|
||||||
#[prost(message, optional, tag = "2")]
|
#[prost(message, optional, tag = "2")]
|
||||||
pub fmkfjcmjjik: ::core::option::Option<Jiahalkoppm>,
|
pub param: ::core::option::Option<Jiahalkoppm>,
|
||||||
#[prost(enumeration = "Jpnihhbgepd", tag = "3")]
|
#[prost(enumeration = "Jpnihhbgepd", tag = "3")]
|
||||||
pub odnpbhepnoa: i32,
|
pub odnpbhepnoa: i32,
|
||||||
#[prost(enumeration = "Pcekojidped", tag = "4")]
|
#[prost(enumeration = "Pcekojidped", tag = "4")]
|
||||||
|
@ -13872,10 +13872,10 @@ pub struct Njedfobgbll {
|
||||||
#[cmdid(2244)]
|
#[cmdid(2244)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||||
pub struct Pkfmcbgahle {
|
pub struct WeaponDressCsReq {
|
||||||
#[xor(3727)]
|
#[xor(3727)]
|
||||||
#[prost(uint32, tag = "13")]
|
#[prost(uint32, tag = "13")]
|
||||||
pub ohdkcchhekh: u32,
|
pub weapon_uid: u32,
|
||||||
#[xor(2088)]
|
#[xor(2088)]
|
||||||
#[prost(uint32, tag = "1")]
|
#[prost(uint32, tag = "1")]
|
||||||
pub avatar_id: u32,
|
pub avatar_id: u32,
|
||||||
|
@ -14543,7 +14543,7 @@ pub struct Mmncdfccjjl {
|
||||||
#[prost(enumeration = "TimePeriodType", tag = "4")]
|
#[prost(enumeration = "TimePeriodType", tag = "4")]
|
||||||
pub time_period: i32,
|
pub time_period: i32,
|
||||||
#[prost(enumeration = "Ompbfjdfljk", tag = "5")]
|
#[prost(enumeration = "Ompbfjdfljk", tag = "5")]
|
||||||
pub iiggaglkijl: i32,
|
pub avatar: i32,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[cmdid(737)]
|
#[cmdid(737)]
|
||||||
|
@ -15700,7 +15700,7 @@ pub struct Mcncgpompai {
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
pub struct Ijihfcaondn {
|
pub struct PlayerNetworkData {
|
||||||
#[prost(message, optional, tag = "5")]
|
#[prost(message, optional, tag = "5")]
|
||||||
pub lbfnphfiaef: ::core::option::Option<Gpfpgifbdfp>,
|
pub lbfnphfiaef: ::core::option::Option<Gpfpgifbdfp>,
|
||||||
#[prost(message, optional, tag = "9")]
|
#[prost(message, optional, tag = "9")]
|
||||||
|
@ -16129,7 +16129,7 @@ pub struct PlayerOperationCsReq {
|
||||||
pub cjbdlgcdgcb: bool,
|
pub cjbdlgcdgcb: bool,
|
||||||
#[xor(5029)]
|
#[xor(5029)]
|
||||||
#[prost(int32, tag = "14")]
|
#[prost(int32, tag = "14")]
|
||||||
pub fmkfjcmjjik: i32,
|
pub param: i32,
|
||||||
#[prost(bytes = "vec", tag = "15")]
|
#[prost(bytes = "vec", tag = "15")]
|
||||||
pub info: ::prost::alloc::vec::Vec<u8>,
|
pub info: ::prost::alloc::vec::Vec<u8>,
|
||||||
#[xor(8845)]
|
#[xor(8845)]
|
||||||
|
@ -16205,13 +16205,13 @@ pub struct Kndfnifkdac {
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
pub struct PlayerSyncScNotify {
|
pub struct PlayerSyncScNotify {
|
||||||
#[prost(message, optional, tag = "1")]
|
#[prost(message, optional, tag = "1")]
|
||||||
pub iiggaglkijl: ::core::option::Option<Ojmfigbbpli>,
|
pub avatar: ::core::option::Option<AvatarSync>,
|
||||||
#[prost(message, optional, tag = "2")]
|
#[prost(message, optional, tag = "2")]
|
||||||
pub gllgbdhaphh: ::core::option::Option<Jpcgnimohil>,
|
pub gllgbdhaphh: ::core::option::Option<Jpcgnimohil>,
|
||||||
#[prost(message, optional, tag = "3")]
|
#[prost(message, optional, tag = "3")]
|
||||||
pub dmfpbeopfko: ::core::option::Option<Flbfjkfbdnh>,
|
pub dmfpbeopfko: ::core::option::Option<Flbfjkfbdnh>,
|
||||||
#[prost(message, optional, tag = "4")]
|
#[prost(message, optional, tag = "4")]
|
||||||
pub cgcgfgfnhne: ::core::option::Option<Pokljdnilhl>,
|
pub item: ::core::option::Option<ItemSync>,
|
||||||
#[prost(message, optional, tag = "5")]
|
#[prost(message, optional, tag = "5")]
|
||||||
pub anblgeifhjh: ::core::option::Option<Pdfpkehdged>,
|
pub anblgeifhjh: ::core::option::Option<Pdfpkehdged>,
|
||||||
#[prost(message, optional, tag = "6")]
|
#[prost(message, optional, tag = "6")]
|
||||||
|
@ -16904,7 +16904,7 @@ pub struct Eilbfkaaahk {
|
||||||
#[prost(int32, tag = "11")]
|
#[prost(int32, tag = "11")]
|
||||||
pub retcode: i32,
|
pub retcode: i32,
|
||||||
#[prost(message, optional, tag = "9")]
|
#[prost(message, optional, tag = "9")]
|
||||||
pub ccjiedgdklb: ::core::option::Option<Ijihfcaondn>,
|
pub player_network_data: ::core::option::Option<PlayerNetworkData>,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
|
@ -17371,7 +17371,7 @@ pub struct Anaapljedem {
|
||||||
#[prost(string, tag = "2")]
|
#[prost(string, tag = "2")]
|
||||||
pub hhdhdjphojg: ::prost::alloc::string::String,
|
pub hhdhdjphojg: ::prost::alloc::string::String,
|
||||||
#[prost(message, repeated, tag = "3")]
|
#[prost(message, repeated, tag = "3")]
|
||||||
pub fmkfjcmjjik: ::prost::alloc::vec::Vec<Jijoflccbpj>,
|
pub param: ::prost::alloc::vec::Vec<Jijoflccbpj>,
|
||||||
#[prost(message, repeated, tag = "4")]
|
#[prost(message, repeated, tag = "4")]
|
||||||
pub jbmhoedjjlc: ::prost::alloc::vec::Vec<Ifplpheneno>,
|
pub jbmhoedjjlc: ::prost::alloc::vec::Vec<Ifplpheneno>,
|
||||||
}
|
}
|
||||||
|
@ -18724,7 +18724,7 @@ pub struct Adgncnkkbhj {
|
||||||
pub struct Pggkcgckcal {
|
pub struct Pggkcgckcal {
|
||||||
#[xor(5182)]
|
#[xor(5182)]
|
||||||
#[prost(uint32, tag = "7")]
|
#[prost(uint32, tag = "7")]
|
||||||
pub fmkfjcmjjik: u32,
|
pub param: u32,
|
||||||
#[prost(uint32, repeated, tag = "14")]
|
#[prost(uint32, repeated, tag = "14")]
|
||||||
pub bfgenanklmg: ::prost::alloc::vec::Vec<u32>,
|
pub bfgenanklmg: ::prost::alloc::vec::Vec<u32>,
|
||||||
#[prost(enumeration = "Dniekkmfapo", tag = "10")]
|
#[prost(enumeration = "Dniekkmfapo", tag = "10")]
|
||||||
|
@ -18966,7 +18966,7 @@ pub struct Imphglieghn {
|
||||||
#[cmdid(8854)]
|
#[cmdid(8854)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||||
pub struct Akbciceipfe {
|
pub struct GetPlayerNetworkDataCsReq {
|
||||||
#[xor(1373)]
|
#[xor(1373)]
|
||||||
#[prost(uint32, tag = "10")]
|
#[prost(uint32, tag = "10")]
|
||||||
pub tag: u32,
|
pub tag: u32,
|
||||||
|
@ -19490,7 +19490,7 @@ pub struct RefreshSectionScRsp {
|
||||||
#[cmdid(6782)]
|
#[cmdid(6782)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||||
pub struct Hpbcepaeoda {
|
pub struct WeaponUnDressCsReq {
|
||||||
#[xor(11698)]
|
#[xor(11698)]
|
||||||
#[prost(uint32, tag = "15")]
|
#[prost(uint32, tag = "15")]
|
||||||
pub avatar_id: u32,
|
pub avatar_id: u32,
|
||||||
|
@ -25331,7 +25331,7 @@ pub struct Ieeigfmmmoo {
|
||||||
#[prost(enumeration = "Heonecgjbdl", tag = "1")]
|
#[prost(enumeration = "Heonecgjbdl", tag = "1")]
|
||||||
pub balojeikfko: i32,
|
pub balojeikfko: i32,
|
||||||
#[prost(uint32, tag = "2")]
|
#[prost(uint32, tag = "2")]
|
||||||
pub fmkfjcmjjik: u32,
|
pub param: u32,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
|
@ -25422,7 +25422,7 @@ pub struct AvatarWishlistPlan {
|
||||||
#[prost(uint32, tag = "3")]
|
#[prost(uint32, tag = "3")]
|
||||||
pub avatar_plan_param2: u32,
|
pub avatar_plan_param2: u32,
|
||||||
#[prost(uint32, tag = "4")]
|
#[prost(uint32, tag = "4")]
|
||||||
pub ohdkcchhekh: u32,
|
pub weapon_uid: u32,
|
||||||
#[prost(uint32, tag = "5")]
|
#[prost(uint32, tag = "5")]
|
||||||
pub fpdghbnfdha: u32,
|
pub fpdghbnfdha: u32,
|
||||||
#[prost(uint32, tag = "6")]
|
#[prost(uint32, tag = "6")]
|
||||||
|
@ -30770,7 +30770,7 @@ pub struct Pfbijfegcce {
|
||||||
pub lgegnbdmjnl: u32,
|
pub lgegnbdmjnl: u32,
|
||||||
#[xor(13905)]
|
#[xor(13905)]
|
||||||
#[prost(uint32, tag = "2")]
|
#[prost(uint32, tag = "2")]
|
||||||
pub ohdkcchhekh: u32,
|
pub weapon_uid: u32,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[cmdid(2014)]
|
#[cmdid(2014)]
|
||||||
|
@ -30803,7 +30803,7 @@ pub struct Jjpgjfacajh {
|
||||||
#[prost(string, tag = "3")]
|
#[prost(string, tag = "3")]
|
||||||
pub iidnjcionhi: ::prost::alloc::string::String,
|
pub iidnjcionhi: ::prost::alloc::string::String,
|
||||||
#[prost(int32, tag = "4")]
|
#[prost(int32, tag = "4")]
|
||||||
pub fmkfjcmjjik: i32,
|
pub param: i32,
|
||||||
#[prost(enumeration = "Jpnihhbgepd", tag = "5")]
|
#[prost(enumeration = "Jpnihhbgepd", tag = "5")]
|
||||||
pub odnpbhepnoa: i32,
|
pub odnpbhepnoa: i32,
|
||||||
}
|
}
|
||||||
|
@ -32933,7 +32933,7 @@ pub struct Onbnjigpcna {}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||||
pub struct Ojmfigbbpli {
|
pub struct AvatarSync {
|
||||||
#[prost(message, repeated, tag = "3")]
|
#[prost(message, repeated, tag = "3")]
|
||||||
pub avatar_list: ::prost::alloc::vec::Vec<AvatarInfo>,
|
pub avatar_list: ::prost::alloc::vec::Vec<AvatarInfo>,
|
||||||
#[prost(uint32, repeated, tag = "14")]
|
#[prost(uint32, repeated, tag = "14")]
|
||||||
|
@ -34206,7 +34206,7 @@ pub struct Ggecejkbaef {
|
||||||
pub paaaeeobgoa: i32,
|
pub paaaeeobgoa: i32,
|
||||||
#[xor(2241)]
|
#[xor(2241)]
|
||||||
#[prost(int32, tag = "5")]
|
#[prost(int32, tag = "5")]
|
||||||
pub fmkfjcmjjik: i32,
|
pub param: i32,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[derive(yanagi_proto_derive::XorFields)]
|
#[derive(yanagi_proto_derive::XorFields)]
|
||||||
|
@ -34279,7 +34279,7 @@ pub struct Anhibikpjdf {
|
||||||
#[prost(enumeration = "Ogepfnogkhm", tag = "1")]
|
#[prost(enumeration = "Ogepfnogkhm", tag = "1")]
|
||||||
pub r#type: i32,
|
pub r#type: i32,
|
||||||
#[prost(message, optional, tag = "2")]
|
#[prost(message, optional, tag = "2")]
|
||||||
pub fmkfjcmjjik: ::core::option::Option<Ojeofbgcaal>,
|
pub param: ::core::option::Option<Ojeofbgcaal>,
|
||||||
}
|
}
|
||||||
#[derive(yanagi_proto_derive::CmdID)]
|
#[derive(yanagi_proto_derive::CmdID)]
|
||||||
#[cmdid(5491)]
|
#[cmdid(5491)]
|
||||||
|
|
|
@ -556,6 +556,38 @@ impl From<ReportUiLayoutPlatformCsReq> for ::protocol::RpcReportUiLayoutPlatform
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
impl From<::protocol::ItemSync> for ItemSync {
|
||||||
|
fn from(value: ::protocol::ItemSync) -> Self {
|
||||||
|
Self {
|
||||||
|
weapon_list: value.weapon_list.into_iter().map(|v| v.into()).collect(),
|
||||||
|
auto_recovery_info: value
|
||||||
|
.auto_recovery_info
|
||||||
|
.into_iter()
|
||||||
|
.map(|(k, v)| (k.into(), v.into()))
|
||||||
|
.collect(),
|
||||||
|
resource_list: value.resource_list.into_iter().map(|v| v.into()).collect(),
|
||||||
|
equip_list: value.equip_list.into_iter().map(|v| v.into()).collect(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
|
impl From<ItemSync> for ::protocol::ItemSync {
|
||||||
|
fn from(value: ItemSync) -> Self {
|
||||||
|
Self {
|
||||||
|
weapon_list: value.weapon_list.into_iter().map(|v| v.into()).collect(),
|
||||||
|
auto_recovery_info: value
|
||||||
|
.auto_recovery_info
|
||||||
|
.into_iter()
|
||||||
|
.map(|(k, v)| (k.into(), v.into()))
|
||||||
|
.collect(),
|
||||||
|
resource_list: value.resource_list.into_iter().map(|v| v.into()).collect(),
|
||||||
|
equip_list: value.equip_list.into_iter().map(|v| v.into()).collect(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
impl From<::protocol::RpcBattleReportArg> for BattleReportCsReq {
|
impl From<::protocol::RpcBattleReportArg> for BattleReportCsReq {
|
||||||
fn from(value: ::protocol::RpcBattleReportArg) -> Self {
|
fn from(value: ::protocol::RpcBattleReportArg) -> Self {
|
||||||
Self { ..Default::default() }
|
Self { ..Default::default() }
|
||||||
|
@ -708,6 +740,26 @@ impl From<EndBattleScRsp> for ::protocol::RpcEndBattleRet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
impl From<::protocol::RpcGetPlayerNetworkDataRet> for GetPlayerNetworkDataScRsp {
|
||||||
|
fn from(value: ::protocol::RpcGetPlayerNetworkDataRet) -> Self {
|
||||||
|
Self {
|
||||||
|
retcode: value.retcode.into(),
|
||||||
|
player_network_data: value.player_network_data.map(|v| v.into()),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
|
impl From<GetPlayerNetworkDataScRsp> for ::protocol::RpcGetPlayerNetworkDataRet {
|
||||||
|
fn from(value: GetPlayerNetworkDataScRsp) -> Self {
|
||||||
|
Self {
|
||||||
|
retcode: value.retcode.into(),
|
||||||
|
player_network_data: value.player_network_data.map(|v| v.into()),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
impl From<::protocol::RpcGetArchiveInfoArg> for GetArchiveInfoCsReq {
|
impl From<::protocol::RpcGetArchiveInfoArg> for GetArchiveInfoCsReq {
|
||||||
fn from(value: ::protocol::RpcGetArchiveInfoArg) -> Self {
|
fn from(value: ::protocol::RpcGetArchiveInfoArg) -> Self {
|
||||||
Self { ..Default::default() }
|
Self { ..Default::default() }
|
||||||
|
@ -935,6 +987,7 @@ impl From<::protocol::AvatarInfo> for AvatarInfo {
|
||||||
level: value.level.into(),
|
level: value.level.into(),
|
||||||
first_get_time: value.first_get_time.into(),
|
first_get_time: value.first_get_time.into(),
|
||||||
exp: value.exp.into(),
|
exp: value.exp.into(),
|
||||||
|
cur_weapon_uid: value.cur_weapon_uid.into(),
|
||||||
skill_type_level: value
|
skill_type_level: value
|
||||||
.skill_type_level
|
.skill_type_level
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
@ -960,6 +1013,7 @@ impl From<AvatarInfo> for ::protocol::AvatarInfo {
|
||||||
level: value.level.into(),
|
level: value.level.into(),
|
||||||
first_get_time: value.first_get_time.into(),
|
first_get_time: value.first_get_time.into(),
|
||||||
exp: value.exp.into(),
|
exp: value.exp.into(),
|
||||||
|
cur_weapon_uid: value.cur_weapon_uid.into(),
|
||||||
skill_type_level: value
|
skill_type_level: value
|
||||||
.skill_type_level
|
.skill_type_level
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
@ -1032,6 +1086,26 @@ impl From<JourneyInfo> for ::protocol::JourneyInfo {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
impl From<::protocol::RpcWeaponDressArg> for WeaponDressCsReq {
|
||||||
|
fn from(value: ::protocol::RpcWeaponDressArg) -> Self {
|
||||||
|
Self {
|
||||||
|
weapon_uid: value.weapon_uid.into(),
|
||||||
|
avatar_id: value.avatar_id.into(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
|
impl From<WeaponDressCsReq> for ::protocol::RpcWeaponDressArg {
|
||||||
|
fn from(value: WeaponDressCsReq) -> Self {
|
||||||
|
Self {
|
||||||
|
weapon_uid: value.weapon_uid.into(),
|
||||||
|
avatar_id: value.avatar_id.into(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
impl From<::protocol::RpcModMainCityAvatarArg> for ModMainCityAvatarCsReq {
|
impl From<::protocol::RpcModMainCityAvatarArg> for ModMainCityAvatarCsReq {
|
||||||
fn from(value: ::protocol::RpcModMainCityAvatarArg) -> Self {
|
fn from(value: ::protocol::RpcModMainCityAvatarArg) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
@ -1090,6 +1164,18 @@ impl From<GetBabelTowerDataCsReq> for ::protocol::RpcGetBabelTowerDataArg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
impl From<::protocol::PlayerNetworkData> for PlayerNetworkData {
|
||||||
|
fn from(value: ::protocol::PlayerNetworkData) -> Self {
|
||||||
|
Self { ..Default::default() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
|
impl From<PlayerNetworkData> for ::protocol::PlayerNetworkData {
|
||||||
|
fn from(value: PlayerNetworkData) -> Self {
|
||||||
|
Self { ..Default::default() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
impl From<::protocol::PtcEnterSceneArg> for EnterSceneScNotify {
|
impl From<::protocol::PtcEnterSceneArg> for EnterSceneScNotify {
|
||||||
fn from(value: ::protocol::PtcEnterSceneArg) -> Self {
|
fn from(value: ::protocol::PtcEnterSceneArg) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
@ -1124,19 +1210,27 @@ impl From<GetBuddyDataCsReq> for ::protocol::RpcGetBuddyDataArg {
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
impl From<::protocol::RpcPlayerOperationArg> for PlayerOperationCsReq {
|
impl From<::protocol::RpcPlayerOperationArg> for PlayerOperationCsReq {
|
||||||
fn from(value: ::protocol::RpcPlayerOperationArg) -> Self {
|
fn from(value: ::protocol::RpcPlayerOperationArg) -> Self {
|
||||||
Self { ..Default::default() }
|
Self {
|
||||||
|
param: value.param.into(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
impl From<PlayerOperationCsReq> for ::protocol::RpcPlayerOperationArg {
|
impl From<PlayerOperationCsReq> for ::protocol::RpcPlayerOperationArg {
|
||||||
fn from(value: PlayerOperationCsReq) -> Self {
|
fn from(value: PlayerOperationCsReq) -> Self {
|
||||||
Self { ..Default::default() }
|
Self {
|
||||||
|
param: value.param.into(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
impl From<::protocol::PtcPlayerSyncArg> for PlayerSyncScNotify {
|
impl From<::protocol::PtcPlayerSyncArg> for PlayerSyncScNotify {
|
||||||
fn from(value: ::protocol::PtcPlayerSyncArg) -> Self {
|
fn from(value: ::protocol::PtcPlayerSyncArg) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
avatar: value.avatar.map(|v| v.into()),
|
||||||
|
item: value.item.map(|v| v.into()),
|
||||||
basic_info: value.basic_info.map(|v| v.into()),
|
basic_info: value.basic_info.map(|v| v.into()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
|
@ -1146,6 +1240,8 @@ impl From<::protocol::PtcPlayerSyncArg> for PlayerSyncScNotify {
|
||||||
impl From<PlayerSyncScNotify> for ::protocol::PtcPlayerSyncArg {
|
impl From<PlayerSyncScNotify> for ::protocol::PtcPlayerSyncArg {
|
||||||
fn from(value: PlayerSyncScNotify) -> Self {
|
fn from(value: PlayerSyncScNotify) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
avatar: value.avatar.map(|v| v.into()),
|
||||||
|
item: value.item.map(|v| v.into()),
|
||||||
basic_info: value.basic_info.map(|v| v.into()),
|
basic_info: value.basic_info.map(|v| v.into()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
|
@ -1324,6 +1420,18 @@ impl From<GetAbyssInfoScRsp> for ::protocol::RpcGetAbyssInfoRet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
impl From<::protocol::RpcGetPlayerNetworkDataArg> for GetPlayerNetworkDataCsReq {
|
||||||
|
fn from(value: ::protocol::RpcGetPlayerNetworkDataArg) -> Self {
|
||||||
|
Self { ..Default::default() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
|
impl From<GetPlayerNetworkDataCsReq> for ::protocol::RpcGetPlayerNetworkDataArg {
|
||||||
|
fn from(value: GetPlayerNetworkDataCsReq) -> Self {
|
||||||
|
Self { ..Default::default() }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
impl From<::protocol::RpcGetNewsStandDataRet> for GetNewsStandDataScRsp {
|
impl From<::protocol::RpcGetNewsStandDataRet> for GetNewsStandDataScRsp {
|
||||||
fn from(value: ::protocol::RpcGetNewsStandDataRet) -> Self {
|
fn from(value: ::protocol::RpcGetNewsStandDataRet) -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
@ -1364,6 +1472,24 @@ impl From<RefreshSectionScRsp> for ::protocol::RpcRefreshSectionRet {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
impl From<::protocol::RpcWeaponUnDressArg> for WeaponUnDressCsReq {
|
||||||
|
fn from(value: ::protocol::RpcWeaponUnDressArg) -> Self {
|
||||||
|
Self {
|
||||||
|
avatar_id: value.avatar_id.into(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
|
impl From<WeaponUnDressCsReq> for ::protocol::RpcWeaponUnDressArg {
|
||||||
|
fn from(value: WeaponUnDressCsReq) -> Self {
|
||||||
|
Self {
|
||||||
|
avatar_id: value.avatar_id.into(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
impl From<::protocol::LevelRewardInfo> for LevelRewardInfo {
|
impl From<::protocol::LevelRewardInfo> for LevelRewardInfo {
|
||||||
fn from(value: ::protocol::LevelRewardInfo) -> Self {
|
fn from(value: ::protocol::LevelRewardInfo) -> Self {
|
||||||
Self { ..Default::default() }
|
Self { ..Default::default() }
|
||||||
|
@ -2208,6 +2334,24 @@ impl From<GetPlayerMailsCsReq> for ::protocol::RpcGetPlayerMailsArg {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[allow(unused)]
|
#[allow(unused)]
|
||||||
|
impl From<::protocol::AvatarSync> for AvatarSync {
|
||||||
|
fn from(value: ::protocol::AvatarSync) -> Self {
|
||||||
|
Self {
|
||||||
|
avatar_list: value.avatar_list.into_iter().map(|v| v.into()).collect(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
|
impl From<AvatarSync> for ::protocol::AvatarSync {
|
||||||
|
fn from(value: AvatarSync) -> Self {
|
||||||
|
Self {
|
||||||
|
avatar_list: value.avatar_list.into_iter().map(|v| v.into()).collect(),
|
||||||
|
..Default::default()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#[allow(unused)]
|
||||||
impl From<::protocol::RpcEndBattleArg> for EndBattleCsReq {
|
impl From<::protocol::RpcEndBattleArg> for EndBattleCsReq {
|
||||||
fn from(value: ::protocol::RpcEndBattleArg) -> Self {
|
fn from(value: ::protocol::RpcEndBattleArg) -> Self {
|
||||||
Self { ..Default::default() }
|
Self { ..Default::default() }
|
||||||
|
@ -3054,7 +3198,12 @@ macro_rules! decode_and_forward_proto {
|
||||||
rpc_arg = ::protocol::RpcGetChatEmojiListArg::from(packet.body); let rpc_ret :
|
rpc_arg = ::protocol::RpcGetChatEmojiListArg::from(packet.body); let rpc_ret :
|
||||||
::protocol::RpcGetChatEmojiListRet = $point .call_rpc($addr, rpc_arg,
|
::protocol::RpcGetChatEmojiListRet = $point .call_rpc($addr, rpc_arg,
|
||||||
$middlewares, $timeout). await ?; $session .send_null_rsp(packet.head.packet_id);
|
$middlewares, $timeout). await ?; $session .send_null_rsp(packet.head.packet_id);
|
||||||
}, ModMainCityAvatarCsReq::CMD_ID => { let packet = NetPacket:: <
|
}, WeaponDressCsReq::CMD_ID => { let packet = NetPacket:: <
|
||||||
|
::yanagi_proto::WeaponDressCsReq > ::decode($buf) ?; let rpc_arg =
|
||||||
|
::protocol::RpcWeaponDressArg::from(packet.body); let rpc_ret :
|
||||||
|
::protocol::RpcWeaponDressRet = $point .call_rpc($addr, rpc_arg, $middlewares,
|
||||||
|
$timeout). await ?; $session .send_null_rsp(packet.head.packet_id); },
|
||||||
|
ModMainCityAvatarCsReq::CMD_ID => { let packet = NetPacket:: <
|
||||||
::yanagi_proto::ModMainCityAvatarCsReq > ::decode($buf) ?; let rpc_arg =
|
::yanagi_proto::ModMainCityAvatarCsReq > ::decode($buf) ?; let rpc_arg =
|
||||||
::protocol::RpcModMainCityAvatarArg::from(packet.body); let rpc_ret :
|
::protocol::RpcModMainCityAvatarArg::from(packet.body); let rpc_ret :
|
||||||
::protocol::RpcModMainCityAvatarRet = $point .call_rpc($addr, rpc_arg,
|
::protocol::RpcModMainCityAvatarRet = $point .call_rpc($addr, rpc_arg,
|
||||||
|
@ -3100,11 +3249,23 @@ macro_rules! decode_and_forward_proto {
|
||||||
: ::protocol::RpcGetClientSystemsInfoRet = $point .call_rpc($addr, rpc_arg,
|
: ::protocol::RpcGetClientSystemsInfoRet = $point .call_rpc($addr, rpc_arg,
|
||||||
$middlewares, $timeout). await ?; let proto_rsp =
|
$middlewares, $timeout). await ?; let proto_rsp =
|
||||||
::yanagi_proto::GetClientSystemsInfoScRsp::from(rpc_ret); $session
|
::yanagi_proto::GetClientSystemsInfoScRsp::from(rpc_ret); $session
|
||||||
.send_rsp(packet.head.packet_id, proto_rsp); }, RefreshSectionCsReq::CMD_ID => {
|
.send_rsp(packet.head.packet_id, proto_rsp); }, GetPlayerNetworkDataCsReq::CMD_ID
|
||||||
let packet = NetPacket:: < ::yanagi_proto::RefreshSectionCsReq > ::decode($buf)
|
=> { let packet = NetPacket:: < ::yanagi_proto::GetPlayerNetworkDataCsReq >
|
||||||
?; let rpc_arg = ::protocol::RpcRefreshSectionArg::from(packet.body); let rpc_ret
|
::decode($buf) ?; let rpc_arg =
|
||||||
: ::protocol::RpcRefreshSectionRet = $point .call_rpc($addr, rpc_arg,
|
::protocol::RpcGetPlayerNetworkDataArg::from(packet.body); let rpc_ret :
|
||||||
|
::protocol::RpcGetPlayerNetworkDataRet = $point .call_rpc($addr, rpc_arg,
|
||||||
$middlewares, $timeout). await ?; let proto_rsp =
|
$middlewares, $timeout). await ?; let proto_rsp =
|
||||||
|
::yanagi_proto::GetPlayerNetworkDataScRsp::from(rpc_ret); $session
|
||||||
|
.send_rsp(packet.head.packet_id, proto_rsp); }, WeaponUnDressCsReq::CMD_ID => {
|
||||||
|
let packet = NetPacket:: < ::yanagi_proto::WeaponUnDressCsReq > ::decode($buf) ?;
|
||||||
|
let rpc_arg = ::protocol::RpcWeaponUnDressArg::from(packet.body); let rpc_ret :
|
||||||
|
::protocol::RpcWeaponUnDressRet = $point .call_rpc($addr, rpc_arg, $middlewares,
|
||||||
|
$timeout). await ?; $session .send_null_rsp(packet.head.packet_id); },
|
||||||
|
RefreshSectionCsReq::CMD_ID => { let packet = NetPacket:: <
|
||||||
|
::yanagi_proto::RefreshSectionCsReq > ::decode($buf) ?; let rpc_arg =
|
||||||
|
::protocol::RpcRefreshSectionArg::from(packet.body); let rpc_ret :
|
||||||
|
::protocol::RpcRefreshSectionRet = $point .call_rpc($addr, rpc_arg, $middlewares,
|
||||||
|
$timeout). await ?; let proto_rsp =
|
||||||
::yanagi_proto::RefreshSectionScRsp::from(rpc_ret); $session .send_rsp(packet
|
::yanagi_proto::RefreshSectionScRsp::from(rpc_ret); $session .send_rsp(packet
|
||||||
.head.packet_id, proto_rsp); }, PlayerTransactionCsReq::CMD_ID => { let packet =
|
.head.packet_id, proto_rsp); }, PlayerTransactionCsReq::CMD_ID => { let packet =
|
||||||
NetPacket:: < ::yanagi_proto::PlayerTransactionCsReq > ::decode($buf) ?; let
|
NetPacket:: < ::yanagi_proto::PlayerTransactionCsReq > ::decode($buf) ?; let
|
||||||
|
@ -3363,11 +3524,12 @@ macro_rules! impl_qwer_to_proto_match {
|
||||||
::protocol::RpcGetWeaponDataArg::PROTOCOL_ID => $process_proto_message
|
::protocol::RpcGetWeaponDataArg::PROTOCOL_ID => $process_proto_message
|
||||||
(GetWeaponDataCsReq::from(qwer)), ::protocol::RpcGetChatEmojiListArg::PROTOCOL_ID
|
(GetWeaponDataCsReq::from(qwer)), ::protocol::RpcGetChatEmojiListArg::PROTOCOL_ID
|
||||||
=> $process_proto_message (GetChatEmojiListCsReq::from(qwer)),
|
=> $process_proto_message (GetChatEmojiListCsReq::from(qwer)),
|
||||||
::protocol::RpcModMainCityAvatarArg::PROTOCOL_ID => $process_proto_message
|
::protocol::RpcWeaponDressArg::PROTOCOL_ID => $process_proto_message
|
||||||
(ModMainCityAvatarCsReq::from(qwer)), ::protocol::RpcGetCafeDataArg::PROTOCOL_ID
|
(WeaponDressCsReq::from(qwer)), ::protocol::RpcModMainCityAvatarArg::PROTOCOL_ID
|
||||||
=> $process_proto_message (GetCafeDataCsReq::from(qwer)),
|
=> $process_proto_message (ModMainCityAvatarCsReq::from(qwer)),
|
||||||
::protocol::RpcGetAvatarDataArg::PROTOCOL_ID => $process_proto_message
|
::protocol::RpcGetCafeDataArg::PROTOCOL_ID => $process_proto_message
|
||||||
(GetAvatarDataCsReq::from(qwer)),
|
(GetCafeDataCsReq::from(qwer)), ::protocol::RpcGetAvatarDataArg::PROTOCOL_ID =>
|
||||||
|
$process_proto_message (GetAvatarDataCsReq::from(qwer)),
|
||||||
::protocol::RpcGetBabelTowerDataArg::PROTOCOL_ID => $process_proto_message
|
::protocol::RpcGetBabelTowerDataArg::PROTOCOL_ID => $process_proto_message
|
||||||
(GetBabelTowerDataCsReq::from(qwer)), ::protocol::PtcEnterSceneArg::PROTOCOL_ID
|
(GetBabelTowerDataCsReq::from(qwer)), ::protocol::PtcEnterSceneArg::PROTOCOL_ID
|
||||||
=> $process_proto_message (EnterSceneScNotify::from(qwer)),
|
=> $process_proto_message (EnterSceneScNotify::from(qwer)),
|
||||||
|
@ -3381,8 +3543,11 @@ macro_rules! impl_qwer_to_proto_match {
|
||||||
(PlayerLoginCsReq::from(qwer)),
|
(PlayerLoginCsReq::from(qwer)),
|
||||||
::protocol::RpcGetClientSystemsInfoArg::PROTOCOL_ID => $process_proto_message
|
::protocol::RpcGetClientSystemsInfoArg::PROTOCOL_ID => $process_proto_message
|
||||||
(GetClientSystemsInfoCsReq::from(qwer)),
|
(GetClientSystemsInfoCsReq::from(qwer)),
|
||||||
::protocol::RpcRefreshSectionArg::PROTOCOL_ID => $process_proto_message
|
::protocol::RpcGetPlayerNetworkDataArg::PROTOCOL_ID => $process_proto_message
|
||||||
(RefreshSectionCsReq::from(qwer)),
|
(GetPlayerNetworkDataCsReq::from(qwer)),
|
||||||
|
::protocol::RpcWeaponUnDressArg::PROTOCOL_ID => $process_proto_message
|
||||||
|
(WeaponUnDressCsReq::from(qwer)), ::protocol::RpcRefreshSectionArg::PROTOCOL_ID
|
||||||
|
=> $process_proto_message (RefreshSectionCsReq::from(qwer)),
|
||||||
::protocol::RpcPlayerTransactionArg::PROTOCOL_ID => $process_proto_message
|
::protocol::RpcPlayerTransactionArg::PROTOCOL_ID => $process_proto_message
|
||||||
(PlayerTransactionCsReq::from(qwer)),
|
(PlayerTransactionCsReq::from(qwer)),
|
||||||
::protocol::RpcGetAbyssArpeggioDataArg::PROTOCOL_ID => $process_proto_message
|
::protocol::RpcGetAbyssArpeggioDataArg::PROTOCOL_ID => $process_proto_message
|
||||||
|
|
Reference in a new issue