Skip to content

Commit

Permalink
Add TESNPC::GetUniqueActor
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Oct 18, 2024
1 parent bff1a8d commit 5df90c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/RE/T/TESNPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ namespace RE
TESNPC* GetRootFaceNPC();
[[nodiscard]] const TESNPC* GetRootFaceNPC() const;
[[nodiscard]] SEX GetSex() const;
Actor* GetUniqueActor();
bool HasApplicableKeywordString(std::string_view a_editorID);
bool HasOverlays();
bool IsInFaction(TESFaction* a_faction) const;
Expand Down
7 changes: 7 additions & 0 deletions src/RE/T/TESNPC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,13 @@ namespace RE
return IsFemale() ? SEX::kFemale : SEX::kMale;
}

Actor* TESNPC::GetUniqueActor()
{
using func_t = decltype(&TESNPC::GetUniqueActor);
static REL::Relocation<func_t> func{ RELOCATION_ID(24180, 24684) };
return func(this);
}

BGSHeadPart* TESNPC::GetCurrentHeadPartByType(HeadPartType a_type)
{
return HasOverlays() ? GetHeadPartOverlayByType(a_type) : GetHeadPartByType(a_type);
Expand Down

0 comments on commit 5df90c5

Please sign in to comment.