|
@ -1,5 +1,13 @@ |
|
|
use serde::{Serialize, Deserialize};
|
|
|
use serde::{Serialize, Deserialize};
|
|
|
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone)]
|
|
|
|
|
|
pub enum ItemParseError {
|
|
|
|
|
|
InvalidWeaponBytes,
|
|
|
|
|
|
InvalidWeaponType,
|
|
|
|
|
|
InvalidWeaponGrind,
|
|
|
|
|
|
InvalidWeaponSpecial,
|
|
|
|
|
|
InvalidWeaponAttribute,
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd)]
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Ord, PartialOrd)]
|
|
|
pub enum Attribute {
|
|
|
pub enum Attribute {
|
|
@ -10,6 +18,19 @@ pub enum Attribute { |
|
|
Hit
|
|
|
Hit
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
impl Attribute {
|
|
|
|
|
|
pub fn from(data: u8) -> Option<Attribute> {
|
|
|
|
|
|
match data {
|
|
|
|
|
|
1 => Some(Attribute::Native),
|
|
|
|
|
|
2 => Some(Attribute::ABeast),
|
|
|
|
|
|
3 => Some(Attribute::Machine),
|
|
|
|
|
|
4 => Some(Attribute::Dark),
|
|
|
|
|
|
5 => Some(Attribute::Hit),
|
|
|
|
|
|
_ => None,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)]
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)]
|
|
|
pub struct WeaponAttribute {
|
|
|
pub struct WeaponAttribute {
|
|
|
pub attr: Attribute,
|
|
|
pub attr: Attribute,
|
|
@ -71,6 +92,52 @@ impl WeaponSpecial { |
|
|
pub fn value(&self) -> u8 {
|
|
|
pub fn value(&self) -> u8 {
|
|
|
*self as u8
|
|
|
*self as u8
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn from(data: u8) -> Option<WeaponSpecial> {
|
|
|
|
|
|
match data {
|
|
|
|
|
|
1 => Some(WeaponSpecial::Draw),
|
|
|
|
|
|
2 => Some(WeaponSpecial::Drain),
|
|
|
|
|
|
3 => Some(WeaponSpecial::Fill),
|
|
|
|
|
|
4 => Some(WeaponSpecial::Gush),
|
|
|
|
|
|
5 => Some(WeaponSpecial::Heart),
|
|
|
|
|
|
6 => Some(WeaponSpecial::Mind),
|
|
|
|
|
|
7 => Some(WeaponSpecial::Soul),
|
|
|
|
|
|
8 => Some(WeaponSpecial::Geist),
|
|
|
|
|
|
9 => Some(WeaponSpecial::Masters),
|
|
|
|
|
|
10 => Some(WeaponSpecial::Lords),
|
|
|
|
|
|
11 => Some(WeaponSpecial::Kings),
|
|
|
|
|
|
12 => Some(WeaponSpecial::Charge),
|
|
|
|
|
|
13 => Some(WeaponSpecial::Spirit),
|
|
|
|
|
|
14 => Some(WeaponSpecial::Berserk),
|
|
|
|
|
|
15 => Some(WeaponSpecial::Ice),
|
|
|
|
|
|
16 => Some(WeaponSpecial::Frost),
|
|
|
|
|
|
17 => Some(WeaponSpecial::Freeze),
|
|
|
|
|
|
18 => Some(WeaponSpecial::Blizzard),
|
|
|
|
|
|
19 => Some(WeaponSpecial::Bind),
|
|
|
|
|
|
20 => Some(WeaponSpecial::Hold),
|
|
|
|
|
|
21 => Some(WeaponSpecial::Seize),
|
|
|
|
|
|
22 => Some(WeaponSpecial::Arrest),
|
|
|
|
|
|
23 => Some(WeaponSpecial::Heat),
|
|
|
|
|
|
24 => Some(WeaponSpecial::Fire),
|
|
|
|
|
|
25 => Some(WeaponSpecial::Flame),
|
|
|
|
|
|
26 => Some(WeaponSpecial::Burning),
|
|
|
|
|
|
27 => Some(WeaponSpecial::Shock),
|
|
|
|
|
|
28 => Some(WeaponSpecial::Thunder),
|
|
|
|
|
|
29 => Some(WeaponSpecial::Storm),
|
|
|
|
|
|
30 => Some(WeaponSpecial::Tempest),
|
|
|
|
|
|
31 => Some(WeaponSpecial::Dim),
|
|
|
|
|
|
32 => Some(WeaponSpecial::Shadow),
|
|
|
|
|
|
33 => Some(WeaponSpecial::Dark),
|
|
|
|
|
|
34 => Some(WeaponSpecial::Hell),
|
|
|
|
|
|
35 => Some(WeaponSpecial::Panic),
|
|
|
|
|
|
36 => Some(WeaponSpecial::Riot),
|
|
|
|
|
|
37 => Some(WeaponSpecial::Havoc),
|
|
|
|
|
|
38 => Some(WeaponSpecial::Chaos),
|
|
|
|
|
|
39 => Some(WeaponSpecial::Devils),
|
|
|
|
|
|
40 => Some(WeaponSpecial::Demons),
|
|
|
|
|
|
_ => None,
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
|
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Serialize, Deserialize, enum_utils::FromStr, derive_more::Display)]
|
|
@ -864,6 +931,403 @@ impl WeaponType { |
|
|
WeaponType::TypewaWand => [0x00, 0xEC, 0x00],
|
|
|
WeaponType::TypewaWand => [0x00, 0xEC, 0x00],
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
pub fn parse_type(data: [u8; 3]) -> Result<WeaponType, ItemParseError> {
|
|
|
|
|
|
match data {
|
|
|
|
|
|
[0x00, 0x01, 0x00] => Ok(WeaponType::Saber),
|
|
|
|
|
|
[0x00, 0x01, 0x01] => Ok(WeaponType::Brand),
|
|
|
|
|
|
[0x00, 0x01, 0x02] => Ok(WeaponType::Buster),
|
|
|
|
|
|
[0x00, 0x01, 0x03] => Ok(WeaponType::Pallasch),
|
|
|
|
|
|
[0x00, 0x01, 0x04] => Ok(WeaponType::Gladius),
|
|
|
|
|
|
[0x00, 0x01, 0x05] => Ok(WeaponType::DbsSaber),
|
|
|
|
|
|
[0x00, 0x01, 0x06] => Ok(WeaponType::Kaladbolg),
|
|
|
|
|
|
[0x00, 0x01, 0x07] => Ok(WeaponType::Durandal),
|
|
|
|
|
|
[0x00, 0x01, 0x08] => Ok(WeaponType::Galatine),
|
|
|
|
|
|
[0x00, 0x02, 0x00] => Ok(WeaponType::Sword),
|
|
|
|
|
|
[0x00, 0x02, 0x01] => Ok(WeaponType::Gigush),
|
|
|
|
|
|
[0x00, 0x02, 0x02] => Ok(WeaponType::Breaker),
|
|
|
|
|
|
[0x00, 0x02, 0x03] => Ok(WeaponType::Claymore),
|
|
|
|
|
|
[0x00, 0x02, 0x04] => Ok(WeaponType::Calibur),
|
|
|
|
|
|
[0x00, 0x02, 0x05] => Ok(WeaponType::FlowensSword),
|
|
|
|
|
|
[0x00, 0x02, 0x06] => Ok(WeaponType::LastSurvivor),
|
|
|
|
|
|
[0x00, 0x02, 0x07] => Ok(WeaponType::DragonSlayer),
|
|
|
|
|
|
[0x00, 0x03, 0x00] => Ok(WeaponType::Dagger),
|
|
|
|
|
|
[0x00, 0x03, 0x01] => Ok(WeaponType::Knife),
|
|
|
|
|
|
[0x00, 0x03, 0x02] => Ok(WeaponType::Blade),
|
|
|
|
|
|
[0x00, 0x03, 0x03] => Ok(WeaponType::Edge),
|
|
|
|
|
|
[0x00, 0x03, 0x04] => Ok(WeaponType::Ripper),
|
|
|
|
|
|
[0x00, 0x03, 0x05] => Ok(WeaponType::BladeDance),
|
|
|
|
|
|
[0x00, 0x03, 0x06] => Ok(WeaponType::BloodyArt),
|
|
|
|
|
|
[0x00, 0x03, 0x07] => Ok(WeaponType::CrossScar),
|
|
|
|
|
|
[0x00, 0x03, 0x08] => Ok(WeaponType::ZeroDivide),
|
|
|
|
|
|
[0x00, 0x03, 0x09] => Ok(WeaponType::TwoKamui),
|
|
|
|
|
|
[0x00, 0x04, 0x00] => Ok(WeaponType::Partisan),
|
|
|
|
|
|
[0x00, 0x04, 0x01] => Ok(WeaponType::Halbert),
|
|
|
|
|
|
[0x00, 0x04, 0x02] => Ok(WeaponType::Glaive),
|
|
|
|
|
|
[0x00, 0x04, 0x03] => Ok(WeaponType::Berdys),
|
|
|
|
|
|
[0x00, 0x04, 0x04] => Ok(WeaponType::Gungnir),
|
|
|
|
|
|
[0x00, 0x04, 0x05] => Ok(WeaponType::Brionac),
|
|
|
|
|
|
[0x00, 0x04, 0x06] => Ok(WeaponType::Vjaya),
|
|
|
|
|
|
[0x00, 0x04, 0x07] => Ok(WeaponType::GaeBolg),
|
|
|
|
|
|
[0x00, 0x04, 0x08] => Ok(WeaponType::AsteronBelt),
|
|
|
|
|
|
[0x00, 0x05, 0x00] => Ok(WeaponType::Slicer),
|
|
|
|
|
|
[0x00, 0x05, 0x01] => Ok(WeaponType::Spinner),
|
|
|
|
|
|
[0x00, 0x05, 0x02] => Ok(WeaponType::Cutter),
|
|
|
|
|
|
[0x00, 0x05, 0x03] => Ok(WeaponType::Sawcer),
|
|
|
|
|
|
[0x00, 0x05, 0x04] => Ok(WeaponType::Diska),
|
|
|
|
|
|
[0x00, 0x05, 0x05] => Ok(WeaponType::SlicerOfAssassin),
|
|
|
|
|
|
[0x00, 0x05, 0x06] => Ok(WeaponType::DiskaOfLiberator),
|
|
|
|
|
|
[0x00, 0x05, 0x07] => Ok(WeaponType::DiskaOfBraveman),
|
|
|
|
|
|
[0x00, 0x05, 0x08] => Ok(WeaponType::Izmaela),
|
|
|
|
|
|
[0x00, 0x06, 0x00] => Ok(WeaponType::Handgun),
|
|
|
|
|
|
[0x00, 0x06, 0x01] => Ok(WeaponType::Autogun),
|
|
|
|
|
|
[0x00, 0x06, 0x02] => Ok(WeaponType::Lockgun),
|
|
|
|
|
|
[0x00, 0x06, 0x03] => Ok(WeaponType::Railgun),
|
|
|
|
|
|
[0x00, 0x06, 0x04] => Ok(WeaponType::Raygun),
|
|
|
|
|
|
[0x00, 0x06, 0x05] => Ok(WeaponType::Varista),
|
|
|
|
|
|
[0x00, 0x06, 0x06] => Ok(WeaponType::CustomRayVerOo),
|
|
|
|
|
|
[0x00, 0x06, 0x07] => Ok(WeaponType::Bravace),
|
|
|
|
|
|
[0x00, 0x06, 0x08] => Ok(WeaponType::TensionBlaster),
|
|
|
|
|
|
[0x00, 0x07, 0x00] => Ok(WeaponType::Rifle),
|
|
|
|
|
|
[0x00, 0x07, 0x01] => Ok(WeaponType::Sniper),
|
|
|
|
|
|
[0x00, 0x07, 0x02] => Ok(WeaponType::Blaster),
|
|
|
|
|
|
[0x00, 0x07, 0x03] => Ok(WeaponType::Beam),
|
|
|
|
|
|
[0x00, 0x07, 0x04] => Ok(WeaponType::Laser),
|
|
|
|
|
|
[0x00, 0x07, 0x05] => Ok(WeaponType::Visk235W),
|
|
|
|
|
|
[0x00, 0x07, 0x06] => Ok(WeaponType::WalsMk2),
|
|
|
|
|
|
[0x00, 0x07, 0x07] => Ok(WeaponType::Justy23St),
|
|
|
|
|
|
[0x00, 0x07, 0x08] => Ok(WeaponType::Rianov303snr),
|
|
|
|
|
|
[0x00, 0x07, 0x09] => Ok(WeaponType::Rianov303snr1),
|
|
|
|
|
|
[0x00, 0x07, 0x0A] => Ok(WeaponType::Rianov303snr2),
|
|
|
|
|
|
[0x00, 0x07, 0x0B] => Ok(WeaponType::Rianov303snr3),
|
|
|
|
|
|
[0x00, 0x07, 0x0C] => Ok(WeaponType::Rianov303snr4),
|
|
|
|
|
|
[0x00, 0x07, 0x0D] => Ok(WeaponType::Rianov303snr5),
|
|
|
|
|
|
[0x00, 0x08, 0x00] => Ok(WeaponType::Mechgun),
|
|
|
|
|
|
[0x00, 0x08, 0x01] => Ok(WeaponType::Assault),
|
|
|
|
|
|
[0x00, 0x08, 0x02] => Ok(WeaponType::Repeater),
|
|
|
|
|
|
[0x00, 0x08, 0x03] => Ok(WeaponType::Gatling),
|
|
|
|
|
|
[0x00, 0x08, 0x04] => Ok(WeaponType::Vulcan),
|
|
|
|
|
|
[0x00, 0x08, 0x05] => Ok(WeaponType::MA60Vise),
|
|
|
|
|
|
[0x00, 0x08, 0x06] => Ok(WeaponType::HS25Justice),
|
|
|
|
|
|
[0x00, 0x08, 0x07] => Ok(WeaponType::LK14Combat),
|
|
|
|
|
|
[0x00, 0x09, 0x00] => Ok(WeaponType::Shot),
|
|
|
|
|
|
[0x00, 0x09, 0x01] => Ok(WeaponType::Spread),
|
|
|
|
|
|
[0x00, 0x09, 0x02] => Ok(WeaponType::Cannon),
|
|
|
|
|
|
[0x00, 0x09, 0x03] => Ok(WeaponType::Launcher),
|
|
|
|
|
|
[0x00, 0x09, 0x04] => Ok(WeaponType::Arms),
|
|
|
|
|
|
[0x00, 0x09, 0x05] => Ok(WeaponType::CrushBullet),
|
|
|
|
|
|
[0x00, 0x09, 0x06] => Ok(WeaponType::MeteorSmash),
|
|
|
|
|
|
[0x00, 0x09, 0x07] => Ok(WeaponType::FinalImpact),
|
|
|
|
|
|
[0x00, 0x0A, 0x00] => Ok(WeaponType::Cane),
|
|
|
|
|
|
[0x00, 0x0A, 0x01] => Ok(WeaponType::Stick),
|
|
|
|
|
|
[0x00, 0x0A, 0x02] => Ok(WeaponType::Mace),
|
|
|
|
|
|
[0x00, 0x0A, 0x03] => Ok(WeaponType::Club),
|
|
|
|
|
|
[0x00, 0x0A, 0x04] => Ok(WeaponType::ClubOfLaconium),
|
|
|
|
|
|
[0x00, 0x0A, 0x05] => Ok(WeaponType::MaceOfAdaman),
|
|
|
|
|
|
[0x00, 0x0A, 0x06] => Ok(WeaponType::ClubOfZumiuran),
|
|
|
|
|
|
[0x00, 0x0A, 0x07] => Ok(WeaponType::Lollipop),
|
|
|
|
|
|
[0x00, 0x0B, 0x00] => Ok(WeaponType::Rod),
|
|
|
|
|
|
[0x00, 0x0B, 0x01] => Ok(WeaponType::Pole),
|
|
|
|
|
|
[0x00, 0x0B, 0x02] => Ok(WeaponType::Pillar),
|
|
|
|
|
|
[0x00, 0x0B, 0x03] => Ok(WeaponType::Striker),
|
|
|
|
|
|
[0x00, 0x0B, 0x04] => Ok(WeaponType::BattleVerge),
|
|
|
|
|
|
[0x00, 0x0B, 0x05] => Ok(WeaponType::BraveHammer),
|
|
|
|
|
|
[0x00, 0x0B, 0x06] => Ok(WeaponType::AliveAqhu),
|
|
|
|
|
|
[0x00, 0x0B, 0x07] => Ok(WeaponType::Valkyrie),
|
|
|
|
|
|
[0x00, 0x0C, 0x00] => Ok(WeaponType::Wand),
|
|
|
|
|
|
[0x00, 0x0C, 0x01] => Ok(WeaponType::Staff),
|
|
|
|
|
|
[0x00, 0x0C, 0x02] => Ok(WeaponType::Baton),
|
|
|
|
|
|
[0x00, 0x0C, 0x03] => Ok(WeaponType::Scepter),
|
|
|
|
|
|
[0x00, 0x0C, 0x04] => Ok(WeaponType::FireScepterAgni),
|
|
|
|
|
|
[0x00, 0x0C, 0x05] => Ok(WeaponType::IceStaffDagon),
|
|
|
|
|
|
[0x00, 0x0C, 0x06] => Ok(WeaponType::StormWandIndra),
|
|
|
|
|
|
[0x00, 0x0C, 0x07] => Ok(WeaponType::EarthWandBrownie),
|
|
|
|
|
|
[0x00, 0x0D, 0x00] => Ok(WeaponType::PhotonClaw),
|
|
|
|
|
|
[0x00, 0x0D, 0x01] => Ok(WeaponType::SilenceClaw),
|
|
|
|
|
|
[0x00, 0x0D, 0x02] => Ok(WeaponType::NeisClaw),
|
|
|
|
|
|
[0x00, 0x0D, 0x03] => Ok(WeaponType::PhoenixClaw),
|
|
|
|
|
|
[0x00, 0x0E, 0x00] => Ok(WeaponType::DoubleSaber),
|
|
|
|
|
|
[0x00, 0x0E, 0x01] => Ok(WeaponType::StagCutlery),
|
|
|
|
|
|
[0x00, 0x0E, 0x02] => Ok(WeaponType::TwinBrand),
|
|
|
|
|
|
[0x00, 0x0F, 0x00] => Ok(WeaponType::BraveKnuckle),
|
|
|
|
|
|
[0x00, 0x0F, 0x01] => Ok(WeaponType::AngryFist),
|
|
|
|
|
|
[0x00, 0x0F, 0x02] => Ok(WeaponType::GodHand),
|
|
|
|
|
|
[0x00, 0x0F, 0x03] => Ok(WeaponType::SonicKnuckle),
|
|
|
|
|
|
[0x00, 0x0F, 0x04] => Ok(WeaponType::Login),
|
|
|
|
|
|
[0x00, 0x10, 0x00] => Ok(WeaponType::Orotiagito),
|
|
|
|
|
|
[0x00, 0x10, 0x01] => Ok(WeaponType::Agito1975),
|
|
|
|
|
|
[0x00, 0x10, 0x02] => Ok(WeaponType::Agito1983),
|
|
|
|
|
|
[0x00, 0x10, 0x03] => Ok(WeaponType::Agito2001),
|
|
|
|
|
|
[0x00, 0x10, 0x04] => Ok(WeaponType::Agito1991),
|
|
|
|
|
|
[0x00, 0x10, 0x05] => Ok(WeaponType::Agito1977),
|
|
|
|
|
|
[0x00, 0x10, 0x06] => Ok(WeaponType::Agito1980),
|
|
|
|
|
|
[0x00, 0x10, 0x07] => Ok(WeaponType::Raikiri),
|
|
|
|
|
|
[0x00, 0x11, 0x00] => Ok(WeaponType::SoulEater),
|
|
|
|
|
|
[0x00, 0x11, 0x01] => Ok(WeaponType::SoulBanish),
|
|
|
|
|
|
[0x00, 0x12, 0x00] => Ok(WeaponType::SpreadNeedle),
|
|
|
|
|
|
[0x00, 0x13, 0x00] => Ok(WeaponType::HolyRay),
|
|
|
|
|
|
[0x00, 0x14, 0x00] => Ok(WeaponType::InfernoBazooka),
|
|
|
|
|
|
[0x00, 0x14, 0x01] => Ok(WeaponType::RamblingMay),
|
|
|
|
|
|
[0x00, 0x14, 0x02] => Ok(WeaponType::LK38Combat),
|
|
|
|
|
|
[0x00, 0x15, 0x00] => Ok(WeaponType::FlameVisit),
|
|
|
|
|
|
[0x00, 0x15, 0x01] => Ok(WeaponType::BurningVisit),
|
|
|
|
|
|
[0x00, 0x16, 0x00] => Ok(WeaponType::AkikosFryingPan),
|
|
|
|
|
|
[0x00, 0x17, 0x00] => Ok(WeaponType::SorcerersCane),
|
|
|
|
|
|
[0x00, 0x18, 0x00] => Ok(WeaponType::SBeatsBlade),
|
|
|
|
|
|
[0x00, 0x19, 0x00] => Ok(WeaponType::PArmssBlade),
|
|
|
|
|
|
[0x00, 0x1A, 0x00] => Ok(WeaponType::DelsabersBuster),
|
|
|
|
|
|
[0x00, 0x1B, 0x00] => Ok(WeaponType::BringersRifle),
|
|
|
|
|
|
[0x00, 0x1C, 0x00] => Ok(WeaponType::EggBlaster),
|
|
|
|
|
|
[0x00, 0x1D, 0x00] => Ok(WeaponType::PsychoWand),
|
|
|
|
|
|
[0x00, 0x1E, 0x00] => Ok(WeaponType::HeavenPunisher),
|
|
|
|
|
|
[0x00, 0x1F, 0x00] => Ok(WeaponType::LavisCannon),
|
|
|
|
|
|
[0x00, 0x20, 0x00] => Ok(WeaponType::VictorAxe),
|
|
|
|
|
|
[0x00, 0x20, 0x01] => Ok(WeaponType::LaconiumAxe),
|
|
|
|
|
|
[0x00, 0x21, 0x00] => Ok(WeaponType::ChainSawd),
|
|
|
|
|
|
[0x00, 0x22, 0x00] => Ok(WeaponType::Caduceus),
|
|
|
|
|
|
[0x00, 0x22, 0x01] => Ok(WeaponType::MercuriusRod),
|
|
|
|
|
|
[0x00, 0x23, 0x00] => Ok(WeaponType::StingTip),
|
|
|
|
|
|
[0x00, 0x24, 0x00] => Ok(WeaponType::MagicalPiece),
|
|
|
|
|
|
[0x00, 0x25, 0x00] => Ok(WeaponType::TechnicalCrozier),
|
|
|
|
|
|
[0x00, 0x26, 0x00] => Ok(WeaponType::SuppressedGun),
|
|
|
|
|
|
[0x00, 0x27, 0x00] => Ok(WeaponType::AncientSaber),
|
|
|
|
|
|
[0x00, 0x28, 0x00] => Ok(WeaponType::HarisenBattleFan),
|
|
|
|
|
|
[0x00, 0x29, 0x00] => Ok(WeaponType::Yamigarasu),
|
|
|
|
|
|
[0x00, 0x2A, 0x00] => Ok(WeaponType::AkikosWok),
|
|
|
|
|
|
[0x00, 0x2B, 0x00] => Ok(WeaponType::ToyHammer),
|
|
|
|
|
|
[0x00, 0x2C, 0x00] => Ok(WeaponType::Elysion),
|
|
|
|
|
|
[0x00, 0x2D, 0x00] => Ok(WeaponType::RedSaber),
|
|
|
|
|
|
[0x00, 0x2E, 0x00] => Ok(WeaponType::MeteorCudgel),
|
|
|
|
|
|
[0x00, 0x2F, 0x00] => Ok(WeaponType::MonkeyKingBar),
|
|
|
|
|
|
[0x00, 0x2F, 0x01] => Ok(WeaponType::BlackKingBar),
|
|
|
|
|
|
[0x00, 0x30, 0x00] => Ok(WeaponType::DoubleCannon),
|
|
|
|
|
|
[0x00, 0x30, 0x01] => Ok(WeaponType::Girasole),
|
|
|
|
|
|
[0x00, 0x31, 0x00] => Ok(WeaponType::HugeBattleFan),
|
|
|
|
|
|
[0x00, 0x32, 0x00] => Ok(WeaponType::TsumikiriJSword),
|
|
|
|
|
|
[0x00, 0x33, 0x00] => Ok(WeaponType::SealedJSword),
|
|
|
|
|
|
[0x00, 0x34, 0x00] => Ok(WeaponType::RedSword),
|
|
|
|
|
|
[0x00, 0x35, 0x00] => Ok(WeaponType::CrazyTune),
|
|
|
|
|
|
[0x00, 0x36, 0x00] => Ok(WeaponType::TwinChakram),
|
|
|
|
|
|
[0x00, 0x37, 0x00] => Ok(WeaponType::WokOfAkikosShop),
|
|
|
|
|
|
[0x00, 0x38, 0x00] => Ok(WeaponType::LavisBlade),
|
|
|
|
|
|
[0x00, 0x39, 0x00] => Ok(WeaponType::RedDagger),
|
|
|
|
|
|
[0x00, 0x3A, 0x00] => Ok(WeaponType::MadamsParasol),
|
|
|
|
|
|
[0x00, 0x3B, 0x00] => Ok(WeaponType::MadamsUmbrella),
|
|
|
|
|
|
[0x00, 0x3C, 0x00] => Ok(WeaponType::ImperialPick),
|
|
|
|
|
|
[0x00, 0x3D, 0x00] => Ok(WeaponType::Berdysh),
|
|
|
|
|
|
[0x00, 0x3E, 0x00] => Ok(WeaponType::RedPartisan),
|
|
|
|
|
|
[0x00, 0x3F, 0x00] => Ok(WeaponType::FlightCutter),
|
|
|
|
|
|
[0x00, 0x40, 0x00] => Ok(WeaponType::FlightFan),
|
|
|
|
|
|
[0x00, 0x41, 0x00] => Ok(WeaponType::RedSlicer),
|
|
|
|
|
|
[0x00, 0x42, 0x00] => Ok(WeaponType::HandgunGuld),
|
|
|
|
|
|
[0x00, 0x42, 0x01] => Ok(WeaponType::MasterRaven),
|
|
|
|
|
|
[0x00, 0x43, 0x00] => Ok(WeaponType::HandgunMilla),
|
|
|
|
|
|
[0x00, 0x43, 0x01] => Ok(WeaponType::LastSwan),
|
|
|
|
|
|
[0x00, 0x44, 0x00] => Ok(WeaponType::RedHandgun),
|
|
|
|
|
|
[0x00, 0x45, 0x00] => Ok(WeaponType::FrozenShooter),
|
|
|
|
|
|
[0x00, 0x45, 0x01] => Ok(WeaponType::SnowQueen),
|
|
|
|
|
|
[0x00, 0x46, 0x00] => Ok(WeaponType::AntiAndroidRifle),
|
|
|
|
|
|
[0x00, 0x47, 0x00] => Ok(WeaponType::RocketPunch),
|
|
|
|
|
|
[0x00, 0x48, 0x00] => Ok(WeaponType::SambaMaracas),
|
|
|
|
|
|
[0x00, 0x49, 0x00] => Ok(WeaponType::TwinPsychogun),
|
|
|
|
|
|
[0x00, 0x4A, 0x00] => Ok(WeaponType::DrillLauncher),
|
|
|
|
|
|
[0x00, 0x4B, 0x00] => Ok(WeaponType::GuldMilla),
|
|
|
|
|
|
[0x00, 0x4B, 0x01] => Ok(WeaponType::DualBird),
|
|
|
|
|
|
[0x00, 0x4C, 0x00] => Ok(WeaponType::RedMechgun),
|
|
|
|
|
|
[0x00, 0x4D, 0x00] => Ok(WeaponType::BelraCannon),
|
|
|
|
|
|
[0x00, 0x4E, 0x00] => Ok(WeaponType::PanzerFaust),
|
|
|
|
|
|
[0x00, 0x4E, 0x01] => Ok(WeaponType::IronFaust),
|
|
|
|
|
|
[0x00, 0x4F, 0x00] => Ok(WeaponType::SummitMoon),
|
|
|
|
|
|
[0x00, 0x50, 0x00] => Ok(WeaponType::Windmill),
|
|
|
|
|
|
[0x00, 0x51, 0x00] => Ok(WeaponType::EvilCurst),
|
|
|
|
|
|
[0x00, 0x52, 0x00] => Ok(WeaponType::FlowerCane),
|
|
|
|
|
|
[0x00, 0x53, 0x00] => Ok(WeaponType::HildebearsCane),
|
|
|
|
|
|
[0x00, 0x54, 0x00] => Ok(WeaponType::HildebluesCane),
|
|
|
|
|
|
[0x00, 0x55, 0x00] => Ok(WeaponType::RabbitWand),
|
|
|
|
|
|
[0x00, 0x56, 0x00] => Ok(WeaponType::PlantainLeaf),
|
|
|
|
|
|
[0x00, 0x56, 0x01] => Ok(WeaponType::Fatsia),
|
|
|
|
|
|
[0x00, 0x57, 0x00] => Ok(WeaponType::DemonicFork),
|
|
|
|
|
|
[0x00, 0x58, 0x00] => Ok(WeaponType::StrikerOfChao),
|
|
|
|
|
|
[0x00, 0x59, 0x00] => Ok(WeaponType::Broom),
|
|
|
|
|
|
[0x00, 0x5A, 0x00] => Ok(WeaponType::ProphetsOfMotav),
|
|
|
|
|
|
[0x00, 0x5B, 0x00] => Ok(WeaponType::TheSighOfAGod),
|
|
|
|
|
|
[0x00, 0x5C, 0x00] => Ok(WeaponType::TwinkleStar),
|
|
|
|
|
|
[0x00, 0x5D, 0x00] => Ok(WeaponType::PlantainFan),
|
|
|
|
|
|
[0x00, 0x5E, 0x00] => Ok(WeaponType::TwinBlaze),
|
|
|
|
|
|
[0x00, 0x5F, 0x00] => Ok(WeaponType::MarinasBag),
|
|
|
|
|
|
[0x00, 0x60, 0x00] => Ok(WeaponType::DragonsClaw),
|
|
|
|
|
|
[0x00, 0x61, 0x00] => Ok(WeaponType::PanthersClaw),
|
|
|
|
|
|
[0x00, 0x62, 0x00] => Ok(WeaponType::SRedsBlade),
|
|
|
|
|
|
[0x00, 0x63, 0x00] => Ok(WeaponType::PlantainHugeFan),
|
|
|
|
|
|
[0x00, 0x64, 0x00] => Ok(WeaponType::ChameleonScythe),
|
|
|
|
|
|
[0x00, 0x65, 0x00] => Ok(WeaponType::Yasminkov3000R),
|
|
|
|
|
|
[0x00, 0x66, 0x00] => Ok(WeaponType::AnoRifle),
|
|
|
|
|
|
[0x00, 0x67, 0x00] => Ok(WeaponType::BaranzLauncher),
|
|
|
|
|
|
[0x00, 0x68, 0x00] => Ok(WeaponType::BranchOfPakupaku),
|
|
|
|
|
|
[0x00, 0x69, 0x00] => Ok(WeaponType::HeartOfPoumn),
|
|
|
|
|
|
[0x00, 0x6A, 0x00] => Ok(WeaponType::Yasminkov2000H),
|
|
|
|
|
|
[0x00, 0x6B, 0x00] => Ok(WeaponType::Yasminkov7000V),
|
|
|
|
|
|
[0x00, 0x6C, 0x00] => Ok(WeaponType::Yasminkov9000M),
|
|
|
|
|
|
[0x00, 0x6D, 0x00] => Ok(WeaponType::MaserBeam),
|
|
|
|
|
|
[0x00, 0x6D, 0x01] => Ok(WeaponType::PowerMaser),
|
|
|
|
|
|
[0x00, 0x6E, 0x00] => Ok(WeaponType::GameMagazne),
|
|
|
|
|
|
[0x00, 0x6E, 0x01] => Ok(WeaponType::Login2),
|
|
|
|
|
|
[0x00, 0x6F, 0x00] => Ok(WeaponType::FlowerBouquet),
|
|
|
|
|
|
[0x00, 0x89, 0x00] => Ok(WeaponType::Musashi),
|
|
|
|
|
|
[0x00, 0x89, 0x01] => Ok(WeaponType::Yamato),
|
|
|
|
|
|
[0x00, 0x89, 0x02] => Ok(WeaponType::Asuka),
|
|
|
|
|
|
[0x00, 0x89, 0x03] => Ok(WeaponType::SangeYasha),
|
|
|
|
|
|
[0x00, 0x8A, 0x00] => Ok(WeaponType::Sange),
|
|
|
|
|
|
[0x00, 0x8A, 0x01] => Ok(WeaponType::Yasha),
|
|
|
|
|
|
[0x00, 0x8A, 0x02] => Ok(WeaponType::Kamui),
|
|
|
|
|
|
[0x00, 0x8B, 0x00] => Ok(WeaponType::PhotonLauncher),
|
|
|
|
|
|
[0x00, 0x8B, 0x01] => Ok(WeaponType::GuiltyLight),
|
|
|
|
|
|
[0x00, 0x8B, 0x02] => Ok(WeaponType::RedScorpio),
|
|
|
|
|
|
[0x00, 0x8B, 0x03] => Ok(WeaponType::PhononMaser),
|
|
|
|
|
|
[0x00, 0x8C, 0x00] => Ok(WeaponType::Talis),
|
|
|
|
|
|
[0x00, 0x8C, 0x01] => Ok(WeaponType::Mahu),
|
|
|
|
|
|
[0x00, 0x8C, 0x02] => Ok(WeaponType::Hitogata),
|
|
|
|
|
|
[0x00, 0x8C, 0x03] => Ok(WeaponType::DancingHitogata),
|
|
|
|
|
|
[0x00, 0x8C, 0x04] => Ok(WeaponType::Kunai),
|
|
|
|
|
|
[0x00, 0x8D, 0x00] => Ok(WeaponType::Nug2000Bazooka),
|
|
|
|
|
|
[0x00, 0x8E, 0x00] => Ok(WeaponType::SBerillsHands0),
|
|
|
|
|
|
[0x00, 0x8E, 0x01] => Ok(WeaponType::SBerillsHands1),
|
|
|
|
|
|
[0x00, 0x8F, 0x00] => Ok(WeaponType::FlowensSword3060),
|
|
|
|
|
|
[0x00, 0x8F, 0x01] => Ok(WeaponType::FlowensSword3064),
|
|
|
|
|
|
[0x00, 0x8F, 0x02] => Ok(WeaponType::FlowensSword3067),
|
|
|
|
|
|
[0x00, 0x8F, 0x03] => Ok(WeaponType::FlowensSword3073),
|
|
|
|
|
|
[0x00, 0x8F, 0x04] => Ok(WeaponType::FlowensSword3077),
|
|
|
|
|
|
[0x00, 0x8F, 0x05] => Ok(WeaponType::FlowensSword3082),
|
|
|
|
|
|
[0x00, 0x8F, 0x06] => Ok(WeaponType::FlowensSword3083),
|
|
|
|
|
|
[0x00, 0x8F, 0x07] => Ok(WeaponType::FlowensSword3084),
|
|
|
|
|
|
[0x00, 0x8F, 0x08] => Ok(WeaponType::FlowensSword3079),
|
|
|
|
|
|
[0x00, 0x90, 0x00] => Ok(WeaponType::DbsSaber3062),
|
|
|
|
|
|
[0x00, 0x90, 0x01] => Ok(WeaponType::DbsSaber3067),
|
|
|
|
|
|
[0x00, 0x90, 0x02] => Ok(WeaponType::DbsSaber3069Chris),
|
|
|
|
|
|
[0x00, 0x90, 0x03] => Ok(WeaponType::DbsSaber3064),
|
|
|
|
|
|
[0x00, 0x90, 0x04] => Ok(WeaponType::DbsSaber3069Torato),
|
|
|
|
|
|
[0x00, 0x90, 0x05] => Ok(WeaponType::DbsSaber3073),
|
|
|
|
|
|
[0x00, 0x90, 0x06] => Ok(WeaponType::DbsSaber3070),
|
|
|
|
|
|
[0x00, 0x90, 0x07] => Ok(WeaponType::DbsSaber3075),
|
|
|
|
|
|
[0x00, 0x90, 0x08] => Ok(WeaponType::DbsSaber3077),
|
|
|
|
|
|
[0x00, 0x91, 0x00] => Ok(WeaponType::GiGueBazooka),
|
|
|
|
|
|
[0x00, 0x92, 0x00] => Ok(WeaponType::Guardianna),
|
|
|
|
|
|
[0x00, 0x93, 0x00] => Ok(WeaponType::ViridiaCard),
|
|
|
|
|
|
[0x00, 0x93, 0x01] => Ok(WeaponType::GreenillCard),
|
|
|
|
|
|
[0x00, 0x93, 0x02] => Ok(WeaponType::SkylyCard),
|
|
|
|
|
|
[0x00, 0x93, 0x03] => Ok(WeaponType::BluefullCard),
|
|
|
|
|
|
[0x00, 0x93, 0x04] => Ok(WeaponType::PurplenumCard),
|
|
|
|
|
|
[0x00, 0x93, 0x05] => Ok(WeaponType::PinkalCard),
|
|
|
|
|
|
[0x00, 0x93, 0x06] => Ok(WeaponType::RedriaCard),
|
|
|
|
|
|
[0x00, 0x93, 0x07] => Ok(WeaponType::OranCard),
|
|
|
|
|
|
[0x00, 0x93, 0x08] => Ok(WeaponType::YellowbozeCard),
|
|
|
|
|
|
[0x00, 0x93, 0x09] => Ok(WeaponType::WhitillCard),
|
|
|
|
|
|
[0x00, 0x94, 0x00] => Ok(WeaponType::MorningGlory),
|
|
|
|
|
|
[0x00, 0x95, 0x00] => Ok(WeaponType::PartisanOfLightning),
|
|
|
|
|
|
[0x00, 0x96, 0x00] => Ok(WeaponType::GalWind),
|
|
|
|
|
|
[0x00, 0x97, 0x00] => Ok(WeaponType::Zanba),
|
|
|
|
|
|
[0x00, 0x98, 0x00] => Ok(WeaponType::RikasClaw),
|
|
|
|
|
|
[0x00, 0x99, 0x00] => Ok(WeaponType::AngelHarp),
|
|
|
|
|
|
[0x00, 0x9A, 0x00] => Ok(WeaponType::DemolitionComet),
|
|
|
|
|
|
[0x00, 0x9B, 0x00] => Ok(WeaponType::NeisClaw2),
|
|
|
|
|
|
[0x00, 0x9C, 0x00] => Ok(WeaponType::RainbowBaton),
|
|
|
|
|
|
[0x00, 0x9D, 0x00] => Ok(WeaponType::DarkFlow),
|
|
|
|
|
|
[0x00, 0x9E, 0x00] => Ok(WeaponType::DarkMeteor),
|
|
|
|
|
|
[0x00, 0x9F, 0x00] => Ok(WeaponType::DarkBridge),
|
|
|
|
|
|
[0x00, 0xA0, 0x00] => Ok(WeaponType::GAssassinsSabers),
|
|
|
|
|
|
[0x00, 0xA1, 0x00] => Ok(WeaponType::RappysFan),
|
|
|
|
|
|
[0x00, 0xA2, 0x00] => Ok(WeaponType::BoomasClaw),
|
|
|
|
|
|
[0x00, 0xA2, 0x01] => Ok(WeaponType::GoboomasClaw),
|
|
|
|
|
|
[0x00, 0xA2, 0x02] => Ok(WeaponType::GigoboomasClaw),
|
|
|
|
|
|
[0x00, 0xA3, 0x00] => Ok(WeaponType::RubyBullet),
|
|
|
|
|
|
[0x00, 0xA4, 0x00] => Ok(WeaponType::AmoreRose),
|
|
|
|
|
|
[0x00, 0xAA, 0x00] => Ok(WeaponType::SlicerOfFanatic),
|
|
|
|
|
|
[0x00, 0xAB, 0x00] => Ok(WeaponType::LameDArgent),
|
|
|
|
|
|
[0x00, 0xAC, 0x00] => Ok(WeaponType::Excalibur),
|
|
|
|
|
|
[0x00, 0xAD, 0x00] => Ok(WeaponType::RageDeFeu),
|
|
|
|
|
|
[0x00, 0xAD, 0x01] => Ok(WeaponType::RageDeFeu2),
|
|
|
|
|
|
[0x00, 0xAD, 0x02] => Ok(WeaponType::RageDeFeu3),
|
|
|
|
|
|
[0x00, 0xAD, 0x03] => Ok(WeaponType::RageDeFeu4),
|
|
|
|
|
|
[0x00, 0xAE, 0x00] => Ok(WeaponType::DaisyChain),
|
|
|
|
|
|
[0x00, 0xAF, 0x00] => Ok(WeaponType::OphelieSeize),
|
|
|
|
|
|
[0x00, 0xB0, 0x00] => Ok(WeaponType::MilleMarteaux),
|
|
|
|
|
|
[0x00, 0xB1, 0x00] => Ok(WeaponType::LeCogneur),
|
|
|
|
|
|
[0x00, 0xB2, 0x00] => Ok(WeaponType::CommanderBlade),
|
|
|
|
|
|
[0x00, 0xB3, 0x00] => Ok(WeaponType::Vivienne),
|
|
|
|
|
|
[0x00, 0xB4, 0x00] => Ok(WeaponType::Kusanagi),
|
|
|
|
|
|
[0x00, 0xB5, 0x00] => Ok(WeaponType::SacredDuster),
|
|
|
|
|
|
[0x00, 0xB6, 0x00] => Ok(WeaponType::Guren),
|
|
|
|
|
|
[0x00, 0xB7, 0x00] => Ok(WeaponType::Shouren),
|
|
|
|
|
|
[0x00, 0xB8, 0x00] => Ok(WeaponType::Jizai),
|
|
|
|
|
|
[0x00, 0xB9, 0x00] => Ok(WeaponType::Flamberge),
|
|
|
|
|
|
[0x00, 0xBA, 0x00] => Ok(WeaponType::Yunchang),
|
|
|
|
|
|
[0x00, 0xBB, 0x00] => Ok(WeaponType::SnakeSpire),
|
|
|
|
|
|
[0x00, 0xBC, 0x00] => Ok(WeaponType::FlapjackFlapper),
|
|
|
|
|
|
[0x00, 0xBD, 0x00] => Ok(WeaponType::Getsugasan),
|
|
|
|
|
|
[0x00, 0xBE, 0x00] => Ok(WeaponType::Maguwa),
|
|
|
|
|
|
[0x00, 0xBF, 0x00] => Ok(WeaponType::HeavenStriker),
|
|
|
|
|
|
[0x00, 0xC0, 0x00] => Ok(WeaponType::CannonRouge),
|
|
|
|
|
|
[0x00, 0xC1, 0x00] => Ok(WeaponType::MeteorRouge),
|
|
|
|
|
|
[0x00, 0xC2, 0x00] => Ok(WeaponType::Solferino),
|
|
|
|
|
|
[0x00, 0xC3, 0x00] => Ok(WeaponType::Clio),
|
|
|
|
|
|
[0x00, 0xC4, 0x00] => Ok(WeaponType::SirenGlassHammer),
|
|
|
|
|
|
[0x00, 0xC5, 0x00] => Ok(WeaponType::GlideDivine),
|
|
|
|
|
|
[0x00, 0xC6, 0x00] => Ok(WeaponType::Shichishito),
|
|
|
|
|
|
[0x00, 0xC7, 0x00] => Ok(WeaponType::Murasame),
|
|
|
|
|
|
[0x00, 0xC8, 0x00] => Ok(WeaponType::DaylightScar),
|
|
|
|
|
|
[0x00, 0xC9, 0x00] => Ok(WeaponType::Decalog),
|
|
|
|
|
|
[0x00, 0xCA, 0x00] => Ok(WeaponType::FifthAnnivBlade),
|
|
|
|
|
|
[0x00, 0xCB, 0x00] => Ok(WeaponType::TyrellsParasol),
|
|
|
|
|
|
[0x00, 0xCC, 0x00] => Ok(WeaponType::AkikosCleaver),
|
|
|
|
|
|
[0x00, 0xCD, 0x00] => Ok(WeaponType::Tanegashima),
|
|
|
|
|
|
[0x00, 0xCE, 0x00] => Ok(WeaponType::TreeClippers),
|
|
|
|
|
|
[0x00, 0xCF, 0x00] => Ok(WeaponType::NiceShot),
|
|
|
|
|
|
[0x00, 0xD0, 0x00] => Ok(WeaponType::Unknown3),
|
|
|
|
|
|
[0x00, 0xD1, 0x00] => Ok(WeaponType::Unknown4),
|
|
|
|
|
|
[0x00, 0xD2, 0x00] => Ok(WeaponType::AnoBazooka),
|
|
|
|
|
|
[0x00, 0xD3, 0x00] => Ok(WeaponType::Synthesizer),
|
|
|
|
|
|
[0x00, 0xD4, 0x00] => Ok(WeaponType::BambooSpear),
|
|
|
|
|
|
[0x00, 0xD5, 0x00] => Ok(WeaponType::KaneiTsuho),
|
|
|
|
|
|
[0x00, 0xD6, 0x00] => Ok(WeaponType::Jitte),
|
|
|
|
|
|
[0x00, 0xD7, 0x00] => Ok(WeaponType::ButterflyNet),
|
|
|
|
|
|
[0x00, 0xD8, 0x00] => Ok(WeaponType::Syringe),
|
|
|
|
|
|
[0x00, 0xD9, 0x00] => Ok(WeaponType::Battledore),
|
|
|
|
|
|
[0x00, 0xDA, 0x00] => Ok(WeaponType::Racket),
|
|
|
|
|
|
[0x00, 0xDB, 0x00] => Ok(WeaponType::Hammer),
|
|
|
|
|
|
[0x00, 0xDC, 0x00] => Ok(WeaponType::GreatBouquet),
|
|
|
|
|
|
[0x00, 0xDD, 0x00] => Ok(WeaponType::TypesaSaber),
|
|
|
|
|
|
[0x00, 0xDE, 0x00] => Ok(WeaponType::TypeslSaber),
|
|
|
|
|
|
[0x00, 0xDE, 0x01] => Ok(WeaponType::TypeslSlicer),
|
|
|
|
|
|
[0x00, 0xDE, 0x02] => Ok(WeaponType::TypeslClaw),
|
|
|
|
|
|
[0x00, 0xDE, 0x03] => Ok(WeaponType::TypeslKatana),
|
|
|
|
|
|
[0x00, 0xDF, 0x00] => Ok(WeaponType::TypejsSaber),
|
|
|
|
|
|
[0x00, 0xDF, 0x01] => Ok(WeaponType::TypejsSlicer),
|
|
|
|
|
|
[0x00, 0xDF, 0x02] => Ok(WeaponType::TypejsJSword),
|
|
|
|
|
|
[0x00, 0xE0, 0x00] => Ok(WeaponType::TypeswSword),
|
|
|
|
|
|
[0x00, 0xE0, 0x01] => Ok(WeaponType::TypeswSlicer),
|
|
|
|
|
|
[0x00, 0xE0, 0x02] => Ok(WeaponType::TypeswJSword),
|
|
|
|
|
|
[0x00, 0xE1, 0x00] => Ok(WeaponType::TyperoSword),
|
|
|
|
|
|
[0x00, 0xE1, 0x01] => Ok(WeaponType::TyperoHalbert),
|
|
|
|
|
|
[0x00, 0xE1, 0x02] => Ok(WeaponType::TyperoRod),
|
|
|
|
|
|
[0x00, 0xE2, 0x00] => Ok(WeaponType::TypeblBlade),
|
|
|
|
|
|
[0x00, 0xE3, 0x00] => Ok(WeaponType::TypeknBlade),
|
|
|
|
|
|
[0x00, 0xE3, 0x01] => Ok(WeaponType::TypeknClaw),
|
|
|
|
|
|
[0x00, 0xE4, 0x00] => Ok(WeaponType::TypehaHalbert),
|
|
|
|
|
|
[0x00, 0xE4, 0x01] => Ok(WeaponType::TypehaRod),
|
|
|
|
|
|
[0x00, 0xE5, 0x00] => Ok(WeaponType::TypedsDSaber),
|
|
|
|
|
|
[0x00, 0xE5, 0x01] => Ok(WeaponType::TypedsRod),
|
|
|
|
|
|
[0x00, 0xE5, 0x02] => Ok(WeaponType::Typeds),
|
|
|
|
|
|
[0x00, 0xE6, 0x00] => Ok(WeaponType::TypeclClaw),
|
|
|
|
|
|
[0x00, 0xE7, 0x00] => Ok(WeaponType::TypessSw),
|
|
|
|
|
|
[0x00, 0xE8, 0x00] => Ok(WeaponType::TypeguHand),
|
|
|
|
|
|
[0x00, 0xE8, 0x01] => Ok(WeaponType::TypeguMechgun),
|
|
|
|
|
|
[0x00, 0xE9, 0x00] => Ok(WeaponType::TyperiRifle),
|
|
|
|
|
|
[0x00, 0xEA, 0x00] => Ok(WeaponType::TypemeMechgun),
|
|
|
|
|
|
[0x00, 0xEB, 0x00] => Ok(WeaponType::TypeshShot),
|
|
|
|
|
|
[0x00, 0xEC, 0x00] => Ok(WeaponType::TypewaWand),
|
|
|
|
|
|
_ => Err(ItemParseError::InvalidWeaponType),
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)]
|
|
|
#[derive(Debug, Copy, Clone, PartialEq)]
|
|
@ -903,6 +1367,61 @@ impl Weapon { |
|
|
|
|
|
|
|
|
result
|
|
|
result
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// TODO: error handling
|
|
|
|
|
|
pub fn from_bytes(data: [u8; 16]) -> Result<Weapon, ItemParseError> {
|
|
|
|
|
|
let w = WeaponType::parse_type([data[0], data[1], data[2]]);
|
|
|
|
|
|
if w.is_ok() {
|
|
|
|
|
|
let mut s = None;
|
|
|
|
|
|
let mut t = true;
|
|
|
|
|
|
let g = data[3];
|
|
|
|
|
|
|
|
|
|
|
|
if data[4] >= 0x81 && data[4] <= 0xA8 {
|
|
|
|
|
|
s = WeaponSpecial::from(data[4] - 0x80);
|
|
|
|
|
|
t = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
else if data[4] >= 0x01 && data[4] <= 0x28 {
|
|
|
|
|
|
s = WeaponSpecial::from(data[4]);
|
|
|
|
|
|
t = true;
|
|
|
|
|
|
}
|
|
|
|
|
|
// else {
|
|
|
|
|
|
// return Err(ItemParseError::InvalidSpecial)
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
let mut a = [
|
|
|
|
|
|
None,
|
|
|
|
|
|
None,
|
|
|
|
|
|
None
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
for i in 0..3 {
|
|
|
|
|
|
if data[2 * (3 + i)] >= 1 && data[2 * (3 + i)] <= 5 {
|
|
|
|
|
|
a[i] = Some(WeaponAttribute{
|
|
|
|
|
|
attr: Attribute::from(data[2 * (3 + i)]).unwrap(),
|
|
|
|
|
|
value: data[2 * (3 + i) + 1] as i8,
|
|
|
|
|
|
});
|
|
|
|
|
|
} else {
|
|
|
|
|
|
a[i] = None;
|
|
|
|
|
|
// return Err(ItemParseError::InvalidAttribute)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Ok(Weapon {
|
|
|
|
|
|
weapon: w.unwrap(),
|
|
|
|
|
|
special: s,
|
|
|
|
|
|
grind: g,
|
|
|
|
|
|
attrs:[
|
|
|
|
|
|
a[0],
|
|
|
|
|
|
a[1],
|
|
|
|
|
|
a[2],
|
|
|
|
|
|
],
|
|
|
|
|
|
tekked: t,
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
else {
|
|
|
|
|
|
Err(ItemParseError::InvalidWeaponBytes) // TODO: error handling if wrong bytes are given
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|