From 7e812d79d057e862f813ce06c8f71b2c16e7247c Mon Sep 17 00:00:00 2001 From: powerof3 Date: Fri, 4 Oct 2024 04:33:39 +0530 Subject: [PATCH] Add `Actor::IsPowerAttacking` --- include/RE/A/Actor.h | 1 + src/RE/A/Actor.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/include/RE/A/Actor.h b/include/RE/A/Actor.h index 12fb97a30..9dd068653 100644 --- a/include/RE/A/Actor.h +++ b/include/RE/A/Actor.h @@ -604,6 +604,7 @@ namespace RE bool IsOnMount() const; bool IsOverEncumbered() const; bool IsPlayerTeammate() const; + bool IsPowerAttacking() const; bool IsProtected() const; bool IsRunning() const; bool IsSneaking() const; diff --git a/src/RE/A/Actor.cpp b/src/RE/A/Actor.cpp index 54db0c028..ba971d2a9 100644 --- a/src/RE/A/Actor.cpp +++ b/src/RE/A/Actor.cpp @@ -931,6 +931,13 @@ namespace RE return boolBits.all(BOOL_BITS::kPlayerTeammate); } + bool Actor::IsPowerAttacking() const + { + using func_t = decltype(&Actor::IsPowerAttacking); + static REL::Relocation func{ RELOCATION_ID(37639, 38592) }; + return func(this); + } + bool Actor::IsProtected() const { return boolFlags.all(BOOL_FLAGS::kProtected);