diff --git a/include/RE/T/TESObjectWEAP.h b/include/RE/T/TESObjectWEAP.h index 71284bec7..ec3079622 100644 --- a/include/RE/T/TESObjectWEAP.h +++ b/include/RE/T/TESObjectWEAP.h @@ -39,19 +39,25 @@ namespace RE kPeriodicSawtooth = 3 }; - enum class WEAPON_TYPE + struct WeaponTypes { - kHandToHandMelee = 0, - kOneHandSword = 1, - kOneHandDagger = 2, - kOneHandAxe = 3, - kOneHandMace = 4, - kTwoHandSword = 5, - kTwoHandAxe = 6, - kBow = 7, - kStaff = 8, - kCrossbow = 9 + enum WEAPON_TYPE : std::uint32_t + { + kHandToHandMelee = 0, + kOneHandSword = 1, + kOneHandDagger = 2, + kOneHandAxe = 3, + kOneHandMace = 4, + kTwoHandSword = 5, + kTwoHandAxe = 6, + kBow = 7, + kStaff = 8, + kCrossbow = 9, + + kTotal = 10 + }; }; + using WEAPON_TYPE = WeaponTypes::WEAPON_TYPE; class TESObjectWEAP : public TESBoundObject, // 000 @@ -73,6 +79,7 @@ namespace RE { public: inline static constexpr auto RTTI = RTTI_TESObjectWEAP; + inline static constexpr auto VTABLE = VTABLE_TESObjectWEAP; inline static constexpr auto FORMTYPE = FormType::Weapon; struct RecordFlags @@ -159,24 +166,24 @@ namespace RE }; // members - RangedData* rangedData; // 00 - float speed; // 08 - float reach; // 0C - float minRange; // 10 - float maxRange; // 14 - float animationAttackMult; // 18 - float damageToWeaponMult; // 1C - used in (unused?) condition calculations if Flag2::kOverridesConditionDamage is set - float staggerValue; // 20 - stl::enumeration hitBehavior; // 24 - stl::enumeration skill; // 28 - stl::enumeration resistance; // 2C - stl::enumeration flags2; // 30 - std::uint8_t baseVATSToHitChance; // 32 - stl::enumeration attackAnimation; // 33 - stl::enumeration embeddedWeaponAV; // 34 - unused - stl::enumeration animationType; // 35 - stl::enumeration flags; // 36 - std::uint8_t unk37; // 37 + RangedData* rangedData; // 00 + float speed; // 08 + float reach; // 0C + float minRange; // 10 + float maxRange; // 14 + float animationAttackMult; // 18 + float damageToWeaponMult; // 1C - used in (unused?) condition calculations if Flag2::kOverridesConditionDamage is set + float staggerValue; // 20 + REX::EnumSet hitBehavior; // 24 + REX::EnumSet skill; // 28 + REX::EnumSet resistance; // 2C + REX::EnumSet flags2; // 30 + std::uint8_t baseVATSToHitChance; // 32 + REX::EnumSet attackAnimation; // 33 + REX::EnumSet embeddedWeaponAV; // 34 - unused + REX::EnumSet animationType; // 35 + REX::EnumSet flags; // 36 + std::uint8_t unk37; // 37 }; static_assert(sizeof(Data) == 0x38); @@ -190,13 +197,13 @@ namespace RE }; // members - float prcntMult; // 00 - std::uint32_t pad04; // 04 - SpellItem* effect; // 08 - std::uint16_t damage; // 10 - stl::enumeration flags; // 12 - std::uint8_t pad13; // 13 - std::uint32_t pad14; // 14 + float prcntMult; // 00 + std::uint32_t pad04; // 04 + SpellItem* effect; // 08 + std::uint16_t damage; // 10 + REX::EnumSet flags; // 12 + std::uint8_t pad13; // 13 + std::uint32_t pad14; // 14 }; static_assert(sizeof(CriticalData) == 0x18); @@ -231,6 +238,7 @@ namespace RE [[nodiscard]] float GetMinRange() const; [[nodiscard]] float GetMaxRange() const; [[nodiscard]] std::uint16_t GetCritDamage() const; + NiAVObject* GetFireNode(NiAVObject* a_root) const; void GetNodeName(char* a_dstBuff) const; [[nodiscard]] WEAPON_TYPE GetWeaponType() const; [[nodiscard]] bool IsBound() const; @@ -248,22 +256,22 @@ namespace RE [[nodiscard]] bool IsCrossbow() const; // members - Data weaponData; // 168 - DNAM - CriticalData criticalData; // 1A0 - CRDT - ScopeArt* scopeArt; // 1B8 - BGSSoundDescriptorForm* attackSound; // 1C0 - SNAM - BGSSoundDescriptorForm* attackSound2D; // 1C8 - XNAM - BGSSoundDescriptorForm* attackLoopSound; // 1D0 - NAM7 - BGSSoundDescriptorForm* attackFailSound; // 1D8 - TNAM - BGSSoundDescriptorForm* idleSound; // 1E0 - UNAM - BGSSoundDescriptorForm* equipSound; // 1E8 - NAM9 - BGSSoundDescriptorForm* unequipSound; // 1F0 - NAM8 - BGSImpactDataSet* impactDataSet; // 1F8 - TESObjectSTAT* firstPersonModelObject; // 200 - WNAM - TESObjectWEAP* templateWeapon; // 208 - CNAM - BSFixedString embeddedNode; // 210 - stl::enumeration soundLevel; // 218 - VNAM - std::uint32_t pad21C; // 21C + Data weaponData; // 168 - DNAM + CriticalData criticalData; // 1A0 - CRDT + ScopeArt* scopeArt; // 1B8 + BGSSoundDescriptorForm* attackSound; // 1C0 - SNAM + BGSSoundDescriptorForm* attackSound2D; // 1C8 - XNAM + BGSSoundDescriptorForm* attackLoopSound; // 1D0 - NAM7 + BGSSoundDescriptorForm* attackFailSound; // 1D8 - TNAM + BGSSoundDescriptorForm* idleSound; // 1E0 - UNAM + BGSSoundDescriptorForm* equipSound; // 1E8 - NAM9 + BGSSoundDescriptorForm* unequipSound; // 1F0 - NAM8 + BGSImpactDataSet* impactDataSet; // 1F8 + TESObjectSTAT* firstPersonModelObject; // 200 - WNAM + TESObjectWEAP* templateWeapon; // 208 - CNAM + BSFixedString embeddedNode; // 210 + REX::EnumSet soundLevel; // 218 - VNAM + std::uint32_t pad21C; // 21C }; static_assert(sizeof(TESObjectWEAP) == 0x220); }