Implemented drive discs (equip, unequip, equip all, generate some on first login)
This commit is contained in:
parent
b0f0aa0292
commit
0834fe0653
9 changed files with 675 additions and 594 deletions
|
@ -39,7 +39,7 @@ pub enum GMCmd {
|
|||
Jump {
|
||||
section_id: u32,
|
||||
transform_id: String,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
mod gm_cmd;
|
||||
|
||||
pub use gm_cmd::{GMInput, GMCmd, GMInputParseError};
|
||||
pub use gm_cmd::{GMCmd, GMInput, GMInputParseError};
|
||||
|
|
|
@ -62,7 +62,7 @@ impl AvatarItem {
|
|||
dressed_equip_list: self
|
||||
.dressed_equip_map
|
||||
.iter()
|
||||
.map(|(&index, &equip_uid)| vivian_proto::DressedEquip { index, equip_uid })
|
||||
.map(|(&equip_uid, &index)| vivian_proto::DressedEquip { equip_uid, index })
|
||||
.collect(),
|
||||
avatar_skin_id: self.avatar_skin_id,
|
||||
first_get_time: self.first_get_time,
|
||||
|
|
|
@ -1,22 +1,19 @@
|
|||
// This file is @generated by prost-build.
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct Transform {
|
||||
#[prost(double, repeated, tag = "1")]
|
||||
pub position: ::prost::alloc::vec::Vec<f64>,
|
||||
#[prost(double, repeated, tag = "2")]
|
||||
pub rotation: ::prost::alloc::vec::Vec<f64>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct Vector2Int {
|
||||
#[prost(int32, tag = "1")]
|
||||
pub x: i32,
|
||||
#[prost(int32, tag = "2")]
|
||||
pub y: i32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct HollowGridState {
|
||||
#[prost(int32, tag = "1")]
|
||||
pub node_state: i32,
|
||||
|
@ -27,8 +24,7 @@ pub struct HollowGridState {
|
|||
#[prost(int32, tag = "4")]
|
||||
pub sub_state: i32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct LogSkillUseInfo {
|
||||
#[prost(int32, tag = "1")]
|
||||
pub skill_id: i32,
|
||||
|
@ -43,8 +39,7 @@ pub struct LogSkillUseInfo {
|
|||
#[prost(string, tag = "6")]
|
||||
pub skill_name: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct LogBattleAvatarInfo {
|
||||
#[prost(int32, tag = "1")]
|
||||
pub avatar_id: i32,
|
||||
|
@ -73,8 +68,7 @@ pub struct LogBattleAvatarInfo {
|
|||
#[prost(message, repeated, tag = "14")]
|
||||
pub skill_use: ::prost::alloc::vec::Vec<LogSkillUseInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct LogBattleStatistics {
|
||||
#[prost(int64, tag = "1")]
|
||||
pub battle_uid: i64,
|
||||
|
@ -93,8 +87,7 @@ pub struct LogBattleStatistics {
|
|||
#[prost(int32, tag = "11")]
|
||||
pub star: i32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct FightResult {
|
||||
#[prost(int32, tag = "1")]
|
||||
pub result: i32,
|
||||
|
@ -192,9 +185,7 @@ impl HollowGridFlag {
|
|||
Self::SyncToClient => "HOLLOW_GRID_FLAG_SYNC_TO_CLIENT",
|
||||
Self::Door => "HOLLOW_GRID_FLAG_DOOR",
|
||||
Self::CanTriggerMultiTimes => "HOLLOW_GRID_FLAG_CAN_TRIGGER_MULTI_TIMES",
|
||||
Self::TemporaryVisibleAtAround => {
|
||||
"HOLLOW_GRID_FLAG_TEMPORARY_VISIBLE_AT_AROUND"
|
||||
}
|
||||
Self::TemporaryVisibleAtAround => "HOLLOW_GRID_FLAG_TEMPORARY_VISIBLE_AT_AROUND",
|
||||
Self::Unlocked => "HOLLOW_GRID_FLAG_UNLOCKED",
|
||||
Self::Brighten => "HOLLOW_GRID_FLAG_BRIGHTEN",
|
||||
Self::Guide => "HOLLOW_GRID_FLAG_GUIDE",
|
||||
|
@ -222,17 +213,11 @@ impl HollowGridFlag {
|
|||
"HOLLOW_GRID_FLAG_CAN_TRIGGER_EVENT" => Some(Self::CanTriggerEvent),
|
||||
"HOLLOW_GRID_FLAG_VISIBLE" => Some(Self::Visible),
|
||||
"HOLLOW_GRID_FLAG_VISIBLE_AT_GRID_AROUND" => Some(Self::VisibleAtGridAround),
|
||||
"HOLLOW_GRID_FLAG_VISIBLE_BY_TRIGGER_EVENT" => {
|
||||
Some(Self::VisibleByTriggerEvent)
|
||||
}
|
||||
"HOLLOW_GRID_FLAG_VISIBLE_BY_TRIGGER_EVENT" => Some(Self::VisibleByTriggerEvent),
|
||||
"HOLLOW_GRID_FLAG_SYNC_TO_CLIENT" => Some(Self::SyncToClient),
|
||||
"HOLLOW_GRID_FLAG_DOOR" => Some(Self::Door),
|
||||
"HOLLOW_GRID_FLAG_CAN_TRIGGER_MULTI_TIMES" => {
|
||||
Some(Self::CanTriggerMultiTimes)
|
||||
}
|
||||
"HOLLOW_GRID_FLAG_TEMPORARY_VISIBLE_AT_AROUND" => {
|
||||
Some(Self::TemporaryVisibleAtAround)
|
||||
}
|
||||
"HOLLOW_GRID_FLAG_CAN_TRIGGER_MULTI_TIMES" => Some(Self::CanTriggerMultiTimes),
|
||||
"HOLLOW_GRID_FLAG_TEMPORARY_VISIBLE_AT_AROUND" => Some(Self::TemporaryVisibleAtAround),
|
||||
"HOLLOW_GRID_FLAG_UNLOCKED" => Some(Self::Unlocked),
|
||||
"HOLLOW_GRID_FLAG_BRIGHTEN" => Some(Self::Brighten),
|
||||
"HOLLOW_GRID_FLAG_GUIDE" => Some(Self::Guide),
|
||||
|
@ -344,9 +329,7 @@ impl NodeVisible {
|
|||
"NODE_VISIBLE_VISIBLE" => Some(Self::Visible),
|
||||
"NODE_VISIBLE_VISIBLE_AT_GRID_AROUND" => Some(Self::VisibleAtGridAround),
|
||||
"NODE_VISIBLE_VISIBLE_BY_TRIGGER_EVENT" => Some(Self::VisibleByTriggerEvent),
|
||||
"NODE_VISIBLE_TEMPORARY_VISIBLE_AT_AROUND" => {
|
||||
Some(Self::TemporaryVisibleAtAround)
|
||||
}
|
||||
"NODE_VISIBLE_TEMPORARY_VISIBLE_AT_AROUND" => Some(Self::TemporaryVisibleAtAround),
|
||||
"NODE_VISIBLE_BLOCKED" => Some(Self::Blocked),
|
||||
_ => None,
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,5 @@
|
|||
// This file is @generated by prost-build.
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct PlayerData {
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub basic: ::core::option::Option<BasicData>,
|
||||
|
@ -29,8 +28,7 @@ pub struct PlayerData {
|
|||
#[prost(message, optional, tag = "13")]
|
||||
pub map: ::core::option::Option<MapData>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct BasicData {
|
||||
#[prost(string, tag = "1")]
|
||||
pub nick_name: ::prost::alloc::string::String,
|
||||
|
@ -51,14 +49,12 @@ pub struct BasicData {
|
|||
#[prost(uint32, tag = "9")]
|
||||
pub portrait_id: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct AvatarData {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub avatar_list: ::prost::alloc::vec::Vec<AvatarItemInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct AvatarItemInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub id: u32,
|
||||
|
@ -91,8 +87,7 @@ pub struct AvatarItemInfo {
|
|||
#[prost(bool, tag = "15")]
|
||||
pub is_favorite: bool,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ItemData {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub item_list: ::prost::alloc::vec::Vec<GenericItemInfo>,
|
||||
|
@ -105,16 +100,14 @@ pub struct ItemData {
|
|||
#[prost(uint32, tag = "5")]
|
||||
pub item_uid_counter: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct GenericItemInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub id: u32,
|
||||
#[prost(int32, tag = "2")]
|
||||
pub count: i32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct WeaponItemInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub uid: u32,
|
||||
|
@ -131,8 +124,7 @@ pub struct WeaponItemInfo {
|
|||
#[prost(bool, tag = "7")]
|
||||
pub lock: bool,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct EquipPropertyInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub property_type: u32,
|
||||
|
@ -141,8 +133,7 @@ pub struct EquipPropertyInfo {
|
|||
#[prost(uint32, tag = "3")]
|
||||
pub add_value: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct EquipItemInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub uid: u32,
|
||||
|
@ -161,28 +152,24 @@ pub struct EquipItemInfo {
|
|||
#[prost(message, repeated, tag = "8")]
|
||||
pub sub_properties: ::prost::alloc::vec::Vec<EquipPropertyInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct AutoRecoveryItemInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub buy_times: u32,
|
||||
#[prost(int64, tag = "2")]
|
||||
pub last_recovery_timestamp: i64,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct QuestData {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub quest_collection_list: ::prost::alloc::vec::Vec<QuestCollectionInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MainCityQuestInfo {
|
||||
#[prost(uint32, repeated, tag = "1")]
|
||||
pub track_npc_id_list: ::prost::alloc::vec::Vec<u32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct QuestInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub id: u32,
|
||||
|
@ -199,8 +186,7 @@ pub struct QuestInfo {
|
|||
#[prost(message, optional, tag = "7")]
|
||||
pub main_city_quest_info: ::core::option::Option<MainCityQuestInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct QuestCollectionInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub quest_type: u32,
|
||||
|
@ -209,24 +195,21 @@ pub struct QuestCollectionInfo {
|
|||
#[prost(uint32, repeated, tag = "3")]
|
||||
pub finish_quest_id_list: ::prost::alloc::vec::Vec<u32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct ArchiveData {
|
||||
#[prost(uint32, repeated, tag = "1")]
|
||||
pub hollow_archive_id_list: ::prost::alloc::vec::Vec<u32>,
|
||||
#[prost(message, repeated, tag = "2")]
|
||||
pub videotape_list: ::prost::alloc::vec::Vec<VideotapeInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct VideotapeInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub archive_file_id: u32,
|
||||
#[prost(bool, tag = "2")]
|
||||
pub finished: bool,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct HollowData {
|
||||
#[prost(uint32, repeated, tag = "1")]
|
||||
pub hollow_group_list: ::prost::alloc::vec::Vec<u32>,
|
||||
|
@ -241,8 +224,7 @@ pub struct HollowData {
|
|||
#[prost(uint32, repeated, tag = "6")]
|
||||
pub executed_hollow_event_id_list: ::prost::alloc::vec::Vec<u32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct HollowInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub hollow_quest_id: u32,
|
||||
|
@ -251,17 +233,14 @@ pub struct HollowInfo {
|
|||
#[prost(uint32, tag = "3")]
|
||||
pub acquired_hollow_challenge_reward: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct AbyssData {}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct BuddyData {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub buddy_list: ::prost::alloc::vec::Vec<BuddyItemInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct BuddyItemInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub id: u32,
|
||||
|
@ -280,8 +259,7 @@ pub struct BuddyItemInfo {
|
|||
#[prost(uint32, repeated, tag = "8")]
|
||||
pub taken_rank_up_reward_list: ::prost::alloc::vec::Vec<u32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MiscData {
|
||||
#[prost(message, optional, tag = "1")]
|
||||
pub switch: ::core::option::Option<SwitchData>,
|
||||
|
@ -300,16 +278,14 @@ pub struct MiscData {
|
|||
#[prost(message, optional, tag = "8")]
|
||||
pub player_accessory: ::core::option::Option<PlayerAccessoryData>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct PlayerSkinInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub player_skin_id: u32,
|
||||
#[prost(uint32, repeated, tag = "2")]
|
||||
pub equipped_accessory_id_list: ::prost::alloc::vec::Vec<u32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct PlayerAccessoryInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub avatar_id: u32,
|
||||
|
@ -318,28 +294,24 @@ pub struct PlayerAccessoryInfo {
|
|||
#[prost(message, repeated, tag = "3")]
|
||||
pub player_skin_list: ::prost::alloc::vec::Vec<PlayerSkinInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct PlayerAccessoryData {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub player_accessory_list: ::prost::alloc::vec::Vec<PlayerAccessoryInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct BusinessCardData {
|
||||
#[prost(uint32, repeated, tag = "1")]
|
||||
pub unlocked_id_list: ::prost::alloc::vec::Vec<u32>,
|
||||
#[prost(uint32, tag = "2")]
|
||||
pub selected_id: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct InputSettingInfo {
|
||||
#[prost(map = "uint32, int32", tag = "1")]
|
||||
pub input_type_map: ::std::collections::HashMap<u32, i32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SwitchData {
|
||||
#[prost(uint32, repeated, tag = "1")]
|
||||
pub open_system_id_list: ::prost::alloc::vec::Vec<u32>,
|
||||
|
@ -350,8 +322,7 @@ pub struct SwitchData {
|
|||
#[prost(map = "uint32, message", tag = "4")]
|
||||
pub input_setting_map: ::std::collections::HashMap<u32, InputSettingInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct QuickAccessItem {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub quick_access_id: u32,
|
||||
|
@ -360,22 +331,19 @@ pub struct QuickAccessItem {
|
|||
#[prost(int32, tag = "3")]
|
||||
pub quick_access_type: i32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct UnlockData {
|
||||
#[prost(int32, repeated, tag = "1")]
|
||||
pub unlocked_id_list: ::prost::alloc::vec::Vec<i32>,
|
||||
#[prost(message, repeated, tag = "2")]
|
||||
pub quick_access_list: ::prost::alloc::vec::Vec<QuickAccessItem>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct NewbieData {
|
||||
#[prost(int32, repeated, tag = "1")]
|
||||
pub finished_group_id_list: ::prost::alloc::vec::Vec<i32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct NewsStandData {
|
||||
#[prost(int32, tag = "1")]
|
||||
pub cur_style: i32,
|
||||
|
@ -398,16 +366,14 @@ pub struct NewsStandData {
|
|||
#[prost(int64, tag = "10")]
|
||||
pub last_sign_time: i64,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct PostGirlItem {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub id: u32,
|
||||
#[prost(int64, tag = "2")]
|
||||
pub unlock_time: i64,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct PostGirlData {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub post_girl_item_list: ::prost::alloc::vec::Vec<PostGirlItem>,
|
||||
|
@ -416,14 +382,12 @@ pub struct PostGirlData {
|
|||
#[prost(bool, tag = "3")]
|
||||
pub post_girl_random_toggle: bool,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct TeleportUnlockData {
|
||||
#[prost(int32, repeated, tag = "1")]
|
||||
pub unlocked_id_list: ::prost::alloc::vec::Vec<i32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MainCityData {
|
||||
#[prost(uint32, tag = "3")]
|
||||
pub bgm_id: u32,
|
||||
|
@ -446,8 +410,7 @@ pub mod main_city_data {
|
|||
TransformId(::prost::alloc::string::String),
|
||||
}
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SceneData {
|
||||
#[prost(uint64, tag = "1")]
|
||||
pub cur_scene_uid: u64,
|
||||
|
@ -458,8 +421,7 @@ pub struct SceneData {
|
|||
#[prost(map = "uint64, message", tag = "4")]
|
||||
pub dungeons: ::std::collections::HashMap<u64, DungeonInfo>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct SceneInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub id: u32,
|
||||
|
@ -488,8 +450,7 @@ pub mod scene_info {
|
|||
LongFight(super::LongFightSceneInfo),
|
||||
}
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct HallSceneInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub cur_section_id: u32,
|
||||
|
@ -498,8 +459,7 @@ pub struct HallSceneInfo {
|
|||
#[prost(map = "int32, int32", tag = "3")]
|
||||
pub main_city_objects_state: ::std::collections::HashMap<i32, i32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct UnitInteract {
|
||||
#[prost(int32, tag = "1")]
|
||||
pub tag_id: i32,
|
||||
|
@ -520,8 +480,7 @@ pub struct UnitInteract {
|
|||
#[prost(int32, repeated, tag = "9")]
|
||||
pub interact_target_list: ::prost::alloc::vec::Vec<i32>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct HallSceneUnit {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub npc_tag_id: u32,
|
||||
|
@ -530,16 +489,14 @@ pub struct HallSceneUnit {
|
|||
#[prost(map = "uint32, message", tag = "3")]
|
||||
pub interacts: ::std::collections::HashMap<u32, UnitInteract>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct AttachedGraphInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub reference_id: u32,
|
||||
#[prost(enumeration = "GraphReferenceType", tag = "2")]
|
||||
pub reference_type: i32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct EventStateInfo {
|
||||
#[prost(uint64, tag = "1")]
|
||||
pub event_uid: u64,
|
||||
|
@ -556,8 +513,7 @@ pub struct EventStateInfo {
|
|||
#[prost(uint32, tag = "7")]
|
||||
pub tag: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct HallSectionInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub section_id: u32,
|
||||
|
@ -570,35 +526,30 @@ pub struct HallSectionInfo {
|
|||
#[prost(uint64, repeated, tag = "5")]
|
||||
pub already_executed_event_uid_list: ::prost::alloc::vec::Vec<u64>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct HollowSceneInfo {}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct FightSceneInfo {
|
||||
#[prost(string, tag = "1")]
|
||||
pub time_period: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub weather: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct LongFightSceneInfo {
|
||||
#[prost(string, tag = "1")]
|
||||
pub time_period: ::prost::alloc::string::String,
|
||||
#[prost(string, tag = "2")]
|
||||
pub weather: ::prost::alloc::string::String,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct DungeonInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub quest_id: u32,
|
||||
#[prost(uint32, tag = "2")]
|
||||
pub quest_type: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct GachaStatisticsInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub gacha_id: u32,
|
||||
|
@ -613,16 +564,14 @@ pub struct GachaStatisticsInfo {
|
|||
#[prost(bool, tag = "6")]
|
||||
pub optional_up_item_state: bool,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct GachaData {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub gacha_statistics_list: ::prost::alloc::vec::Vec<GachaStatisticsInfo>,
|
||||
#[prost(uint32, tag = "2")]
|
||||
pub gacha_random: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct MapAreaGroupInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub group_id: u32,
|
||||
|
@ -631,8 +580,7 @@ pub struct MapAreaGroupInfo {
|
|||
#[prost(uint32, tag = "3")]
|
||||
pub area_progress: u32,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, Copy, PartialEq, ::prost::Message)]
|
||||
pub struct MapAreaStreetInfo {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub area_id: u32,
|
||||
|
@ -647,8 +595,7 @@ pub struct MapAreaStreetInfo {
|
|||
#[prost(bool, tag = "6")]
|
||||
pub new_area_portals_showed: bool,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct MapData {
|
||||
#[prost(message, repeated, tag = "1")]
|
||||
pub area_group_list: ::prost::alloc::vec::Vec<MapAreaGroupInfo>,
|
||||
|
@ -706,8 +653,7 @@ pub struct PlayerGetDataRsp {
|
|||
#[prost(message, optional, tag = "2")]
|
||||
pub player_data: ::core::option::Option<PlayerData>,
|
||||
}
|
||||
#[derive(::proto_derive::NetCmd)]
|
||||
#[derive(Clone, PartialEq, ::prost::Message)]
|
||||
#[derive(::proto_derive::NetCmd, Clone, PartialEq, ::prost::Message)]
|
||||
pub struct NetCommand {
|
||||
#[prost(uint32, tag = "1")]
|
||||
pub cmd_id: u32,
|
||||
|
|
|
@ -1,14 +1,10 @@
|
|||
use vivian_codegen::{handlers, required_state};
|
||||
use vivian_logic::item::EItemType;
|
||||
use vivian_proto::{
|
||||
AvatarFavoriteCsReq, AvatarFavoriteScRsp, AvatarLevelUpCsReq, AvatarLevelUpScRsp,
|
||||
AvatarShowWeaponCsReq, AvatarShowWeaponScRsp, AvatarSkinDressCsReq, AvatarSkinDressScRsp,
|
||||
AvatarSkinUnDressCsReq, AvatarSkinUnDressScRsp, GetAvatarDataCsReq, GetAvatarDataScRsp,
|
||||
GetAvatarRecommendEquipCsReq, GetAvatarRecommendEquipScRsp, ItemRewardInfo, WeaponDressCsReq,
|
||||
WeaponDressScRsp, WeaponUnDressCsReq, WeaponUnDressScRsp,
|
||||
AvatarFavoriteCsReq, AvatarFavoriteScRsp, AvatarLevelUpCsReq, AvatarLevelUpScRsp, AvatarShowWeaponCsReq, AvatarShowWeaponScRsp, AvatarSkinDressCsReq, AvatarSkinDressScRsp, AvatarSkinUnDressCsReq, AvatarSkinUnDressScRsp, EquipmentDressCsReq, EquipmentDressScRsp, EquipmentSuitDressCsReq, EquipmentSuitDressScRsp, EquipmentUnDressCsReq, EquipmentUnDressScRsp, GetAvatarDataCsReq, GetAvatarDataScRsp, GetAvatarRecommendEquipCsReq, GetAvatarRecommendEquipScRsp, ItemRewardInfo, WeaponDressCsReq, WeaponDressScRsp, WeaponUnDressCsReq, WeaponUnDressScRsp
|
||||
};
|
||||
|
||||
use crate::{sync::SyncType, util::item_util};
|
||||
use crate::{sync::SyncType, util::{avatar_util, item_util}};
|
||||
|
||||
use super::NetContext;
|
||||
|
||||
|
@ -330,4 +326,105 @@ impl AvatarHandler {
|
|||
) -> GetAvatarRecommendEquipScRsp {
|
||||
GetAvatarRecommendEquipScRsp { retcode: 0 }
|
||||
}
|
||||
|
||||
pub fn on_equipment_dress_cs_req(
|
||||
context: &mut NetContext<'_>,
|
||||
request: EquipmentDressCsReq,
|
||||
) -> EquipmentDressScRsp {
|
||||
if !context
|
||||
.player
|
||||
.avatar_model
|
||||
.is_avatar_unlocked(request.avatar_id)
|
||||
{
|
||||
return EquipmentDressScRsp { retcode: 1 };
|
||||
}
|
||||
|
||||
if !context
|
||||
.player
|
||||
.item_model
|
||||
.equip_map
|
||||
.contains_key(&request.equip_uid)
|
||||
{
|
||||
return EquipmentDressScRsp { retcode: 1 };
|
||||
};
|
||||
|
||||
avatar_util::dress_equip(
|
||||
context.player,
|
||||
request.avatar_id,
|
||||
(
|
||||
request.equip_uid,
|
||||
request.dress_index,
|
||||
),
|
||||
);
|
||||
|
||||
EquipmentDressScRsp { retcode: 0 }
|
||||
}
|
||||
|
||||
pub fn on_equipment_un_dress_cs_req(
|
||||
context: &mut NetContext<'_>,
|
||||
request: EquipmentUnDressCsReq,
|
||||
) -> EquipmentUnDressScRsp {
|
||||
if let Some(avatar) = context
|
||||
.player
|
||||
.avatar_model
|
||||
.avatar_map
|
||||
.get_mut(&request.avatar_id)
|
||||
{
|
||||
request
|
||||
.undress_index_list
|
||||
.iter()
|
||||
.for_each(|undress_index| {
|
||||
avatar
|
||||
.dressed_equip_map
|
||||
.retain(|_, index| index != undress_index);
|
||||
});
|
||||
|
||||
EquipmentUnDressScRsp { retcode: 0 }
|
||||
} else {
|
||||
EquipmentUnDressScRsp { retcode: 1 }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn on_equipment_suit_dress_cs_req(
|
||||
context: &mut NetContext<'_>,
|
||||
request: EquipmentSuitDressCsReq,
|
||||
) -> EquipmentSuitDressScRsp {
|
||||
if !context
|
||||
.player
|
||||
.avatar_model
|
||||
.is_avatar_unlocked(request.avatar_id)
|
||||
{
|
||||
return EquipmentSuitDressScRsp { retcode: 1 };
|
||||
}
|
||||
|
||||
if !request
|
||||
.param_list
|
||||
.iter()
|
||||
.fold(true, |v, param|
|
||||
v && context
|
||||
.player
|
||||
.item_model
|
||||
.equip_map
|
||||
.contains_key(¶m.equip_uid)
|
||||
)
|
||||
{
|
||||
return EquipmentSuitDressScRsp { retcode: 1 };
|
||||
}
|
||||
|
||||
request
|
||||
.param_list
|
||||
.iter()
|
||||
.for_each(|param| {
|
||||
avatar_util::dress_equip(
|
||||
context.player,
|
||||
request.avatar_id,
|
||||
(
|
||||
param.equip_uid,
|
||||
param.dress_index,
|
||||
),
|
||||
);
|
||||
});
|
||||
|
||||
EquipmentSuitDressScRsp { retcode: 0 }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,3 +68,35 @@ pub fn unlock_avatar(
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn dress_equip(player: &mut Player, avatar_id: u32, (equip_uid, dress_index): (u32, u32)) {
|
||||
player
|
||||
.avatar_model
|
||||
.avatar_map
|
||||
.iter()
|
||||
.filter_map(|(&id, avatar)| {
|
||||
avatar
|
||||
.dressed_equip_map
|
||||
.contains_key(&equip_uid)
|
||||
.then_some((id, equip_uid))
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
.into_iter()
|
||||
.for_each(|(id, equip_uid)| {
|
||||
player
|
||||
.avatar_model
|
||||
.avatar_map
|
||||
.get_mut(&id)
|
||||
.unwrap()
|
||||
.dressed_equip_map
|
||||
.remove(&equip_uid);
|
||||
});
|
||||
|
||||
let avatar = player.avatar_model.avatar_map.get_mut(&avatar_id).unwrap();
|
||||
|
||||
avatar
|
||||
.dressed_equip_map
|
||||
.retain(|_, dressed_equip_index| *dressed_equip_index != dress_index);
|
||||
|
||||
avatar.dressed_equip_map.insert(equip_uid, dress_index);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
use std::collections::HashMap;
|
||||
|
||||
use config::WeaponTemplate;
|
||||
use rand::{RngCore, seq::IteratorRandom};
|
||||
use vivian_logic::item::WeaponItem;
|
||||
|
||||
use crate::player::Player;
|
||||
|
@ -45,6 +48,80 @@ pub fn add_items_on_first_login(player: &mut Player) {
|
|||
},
|
||||
);
|
||||
});
|
||||
|
||||
// Generate some Drive Discs for now
|
||||
let rng = &mut rand::thread_rng();
|
||||
let properties_map: [(u32, Vec<u32>, u32, Vec<u32>, u32); 19] = [
|
||||
(11103, vec![1], 550, vec![1, 2, 3, 4, 5, 6], 112),
|
||||
(11102, vec![4, 5, 6], 750, vec![1, 2, 3, 4, 5, 6], 300),
|
||||
(12103, vec![2], 79, vec![1, 2, 3, 4, 5, 6], 19),
|
||||
(12102, vec![4, 5, 6], 750, vec![1, 2, 3, 4, 5, 6], 300),
|
||||
(13103, vec![3], 46, vec![1, 2, 3, 4, 5, 6], 15),
|
||||
(13102, vec![4, 5, 6], 1200, vec![1, 2, 3, 4, 5, 6], 480),
|
||||
(23203, vec![], 0, vec![1, 2, 3, 4, 5, 6], 9),
|
||||
(23103, vec![5], 600, vec![], 0),
|
||||
(31402, vec![6], 750, vec![], 0),
|
||||
(31203, vec![4], 23, vec![1, 2, 3, 4, 5, 6], 9),
|
||||
(21103, vec![4], 1200, vec![1, 2, 3, 4, 5, 6], 480),
|
||||
(20103, vec![4], 600, vec![1, 2, 3, 4, 5, 6], 240),
|
||||
(30502, vec![6], 1500, vec![], 0),
|
||||
(12202, vec![6], 450, vec![], 0),
|
||||
(31803, vec![5], 750, vec![], 0),
|
||||
(31903, vec![5], 750, vec![], 0),
|
||||
(31603, vec![5], 750, vec![], 0),
|
||||
(31703, vec![5], 750, vec![], 0),
|
||||
(31503, vec![5], 750, vec![], 0),
|
||||
];
|
||||
for _ in 0..100 {
|
||||
let uid = player.item_model.next_uid();
|
||||
|
||||
let id = player
|
||||
.resources
|
||||
.templates
|
||||
.equipment_suit_template_tb()
|
||||
.choose(rng)
|
||||
.unwrap()
|
||||
.id();
|
||||
let id = id + 40; // S-rank
|
||||
let slot = 1 + rng.next_u32() % 6;
|
||||
let id = id + slot;
|
||||
|
||||
let main_property = properties_map
|
||||
.iter()
|
||||
.filter(|p| p.1.contains(&slot))
|
||||
.choose(rng)
|
||||
.map(|p| (p.0, (p.2, 1)))
|
||||
.unwrap();
|
||||
|
||||
let mut sub_properties = HashMap::new();
|
||||
let mut add_value_mod = 6;
|
||||
for _ in 0..4 {
|
||||
let sub_property = properties_map
|
||||
.iter()
|
||||
.filter(|p| p.3.contains(&slot) && !sub_properties.contains_key(&p.0))
|
||||
.choose(rng)
|
||||
.map(|p| {
|
||||
let add_value = rng.next_u32() % add_value_mod;
|
||||
add_value_mod = add_value_mod - add_value;
|
||||
(p.0, (p.4, 1 + add_value))
|
||||
})
|
||||
.unwrap();
|
||||
sub_properties.insert(sub_property.0, sub_property.1);
|
||||
}
|
||||
|
||||
player.item_model.equip_map.insert(
|
||||
uid,
|
||||
vivian_logic::item::EquipItem {
|
||||
id,
|
||||
level: 15,
|
||||
exp: 0,
|
||||
star: 1,
|
||||
lock: false,
|
||||
properties: [main_property].into_iter().collect(),
|
||||
sub_properties,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn add_weapon(player: &mut Player, template: &WeaponTemplate) -> u32 {
|
||||
|
|
Loading…
Reference in a new issue