diff --git a/include/RE/T/TESObjectREFR.h b/include/RE/T/TESObjectREFR.h index 0365eb422..cad1d4ad8 100644 --- a/include/RE/T/TESObjectREFR.h +++ b/include/RE/T/TESObjectREFR.h @@ -376,6 +376,7 @@ namespace RE const char* GetDisplayFullName(); InventoryDropMap GetDroppedInventory(); InventoryDropMap GetDroppedInventory(std::function a_filter); + BGSEncounterZone* GetEncounterZone() const; BGSLocation* GetEditorLocation() const; bool GetEditorLocation(NiPoint3& a_outPos, NiPoint3& a_outRot, TESForm*& a_outWorldOrCell, TESObjectCELL* a_fallback); std::optional GetEnchantmentCharge() const; diff --git a/src/RE/T/TESObjectREFR.cpp b/src/RE/T/TESObjectREFR.cpp index 219efe936..aac465ae5 100644 --- a/src/RE/T/TESObjectREFR.cpp +++ b/src/RE/T/TESObjectREFR.cpp @@ -251,6 +251,13 @@ namespace RE return results; } + BGSEncounterZone* TESObjectREFR::GetEncounterZone() const + { + using func_t = decltype(&TESObjectREFR::GetEncounterZone); + REL::Relocation func{ RELOCATION_ID(19797, 20202) }; + return func(this); + } + BGSLocation* TESObjectREFR::GetEditorLocation() const { return GetEditorLocation1();