Skip to content

Commit

Permalink
Update TESObjectWEAP.h
Browse files Browse the repository at this point in the history
fixed GitHub Desktop shenanigans, hopefully
  • Loading branch information
DavidJCobb committed Oct 16, 2024
1 parent ed6d284 commit 80cfc8a
Showing 1 changed file with 60 additions and 52 deletions.
112 changes: 60 additions & 52 deletions include/RE/T/TESObjectWEAP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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<WEAPONHITBEHAVIOR, std::uint32_t> hitBehavior; // 24
stl::enumeration<ActorValue, std::uint32_t> skill; // 28
stl::enumeration<ActorValue, std::uint32_t> resistance; // 2C
stl::enumeration<Flag2, std::uint16_t> flags2; // 30
std::uint8_t baseVATSToHitChance; // 32
stl::enumeration<AttackAnimation, std::uint8_t> attackAnimation; // 33
stl::enumeration<ActorValue, std::uint8_t> embeddedWeaponAV; // 34 - unused
stl::enumeration<WEAPON_TYPE, std::uint8_t> animationType; // 35
stl::enumeration<Flag, std::uint8_t> 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<WEAPONHITBEHAVIOR, std::uint32_t> hitBehavior; // 24
REX::EnumSet<ActorValue, std::uint32_t> skill; // 28
REX::EnumSet<ActorValue, std::uint32_t> resistance; // 2C
REX::EnumSet<Flag2, std::uint16_t> flags2; // 30
std::uint8_t baseVATSToHitChance; // 32
REX::EnumSet<AttackAnimation, std::uint8_t> attackAnimation; // 33
REX::EnumSet<ActorValue, std::uint8_t> embeddedWeaponAV; // 34 - unused
REX::EnumSet<WEAPON_TYPE, std::uint8_t> animationType; // 35
REX::EnumSet<Flag, std::uint8_t> flags; // 36
std::uint8_t unk37; // 37
};
static_assert(sizeof(Data) == 0x38);

Expand All @@ -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<Flag, std::uint8_t> 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<Flag, std::uint8_t> flags; // 12
std::uint8_t pad13; // 13
std::uint32_t pad14; // 14
};
static_assert(sizeof(CriticalData) == 0x18);

Expand Down Expand Up @@ -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;
Expand All @@ -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<SOUND_LEVEL, std::uint32_t> 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<SOUND_LEVEL, std::uint32_t> soundLevel; // 218 - VNAM
std::uint32_t pad21C; // 21C
};
static_assert(sizeof(TESObjectWEAP) == 0x220);
}

0 comments on commit 80cfc8a

Please sign in to comment.