Skip to content

Commit

Permalink
chore: move WornHasKeyword
Browse files Browse the repository at this point in the history
  • Loading branch information
qudix committed Oct 10, 2024
1 parent b6c6a28 commit 4aec77d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
8 changes: 0 additions & 8 deletions include/RE/A/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
namespace RE
{
class AIProcess;
class BGSKeyword;
class BGSPerk;
class CombatController;
class CombatGroup;
Expand Down Expand Up @@ -360,13 +359,6 @@ namespace RE
func(this);
}

[[nodiscard]] bool WornHasKeyword(BGSKeyword* a_keyword)
{
using func_t = decltype(&Actor::WornHasKeyword);
static REL::Relocation<func_t> func{ ID::Actor::WornHasKeyword };
return func(this, a_keyword);
}

// members
REX::EnumSet<BOOL_BITS, std::uint32_t> boolBits; // 200
float unk204; // 204
Expand Down
2 changes: 1 addition & 1 deletion include/RE/IDs.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace RE::ID
inline constexpr REL::ID SetSkinTone{ 146270 };
inline constexpr REL::ID UpdateAppearance{ 151216 };
inline constexpr REL::ID UpdateChargenAppearance{ 146273 };
inline constexpr REL::ID WornHasKeyword{ 106992 };
}

namespace ActorUtils
Expand Down Expand Up @@ -484,6 +483,7 @@ namespace RE::ID
inline constexpr REL::ID IsObjectEquipped{ 106991 };
inline constexpr REL::ID IsSpaceshipDocked{ 174146 };
inline constexpr REL::ID IsSpaceshipLanded{ 173880 };
inline constexpr REL::ID WornHasKeyword{ 106992 };
}

namespace TESQuest
Expand Down
2 changes: 2 additions & 0 deletions include/RE/T/TESObjectREFR.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace RE
class Actor;
class ActorCause;
class BGSEquipSlot;
class BGSKeyword;
class BGSLocation;
class BGSObjectInstance;
class BGSScene;
Expand Down Expand Up @@ -392,6 +393,7 @@ namespace RE
[[nodiscard]] bool IsSpaceshipLanded();
void Lock();
void Unlock();
[[nodiscard]] bool WornHasKeyword(BGSKeyword* a_keyword);

// members
OBJ_REFR data; // 78
Expand Down
7 changes: 7 additions & 0 deletions src/RE/T/TESObjectREFR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ namespace RE
return func(this);
}

bool TESObjectREFR::WornHasKeyword(BGSKeyword* a_keyword)
{
using func_t = decltype(&TESObjectREFR::WornHasKeyword);
static REL::Relocation<func_t> func{ ID::TESObjectREFR::WornHasKeyword };
return func(this, a_keyword);
}

void TESObjectREFR::Lock()
{
if (const auto lock = GetLock()) {
Expand Down

0 comments on commit 4aec77d

Please sign in to comment.