From 106583e37f0d57e88c68f3cc3e668018d7bc160e Mon Sep 17 00:00:00 2001 From: Bobbyclue Date: Thu, 24 Aug 2023 12:33:14 -0400 Subject: [PATCH] Added remove from faction function --- 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 9691ea882..2253dd2b4 100644 --- a/include/RE/A/Actor.h +++ b/include/RE/A/Actor.h @@ -595,6 +595,7 @@ namespace RE void RemoveAnimationGraphEventSink(BSTEventSink* a_sink) const; void RemoveCastScroll(SpellItem* a_spell, MagicSystem::CastingSource a_source); void RemoveExtraArrows3D(); + void RemoveFromFaction(TESFaction* a_faction); void RemoveOutfitItems(BGSOutfit* a_outfit); bool RemoveSpell(SpellItem* a_spell); std::int32_t RequestDetectionLevel(Actor* a_target, DETECTION_PRIORITY a_priority = DETECTION_PRIORITY::kNormal); diff --git a/src/RE/A/Actor.cpp b/src/RE/A/Actor.cpp index 988bec1d0..cc005ffac 100644 --- a/src/RE/A/Actor.cpp +++ b/src/RE/A/Actor.cpp @@ -918,6 +918,13 @@ namespace RE extraList.RemoveByType(ExtraDataType::kAttachedArrows3D); } + void Actor::RemoveFromFaction(RE::TESFaction* a_faction) + { + using func_t = decltype(&Actor::RemoveFromFaction); + REL::Relocation func{ RELOCATION_ID(36680, 37688) }; + return func(this, a_faction); + } + bool Actor::RemoveSpell(SpellItem* a_spell) { using func_t = decltype(&Actor::RemoveSpell);