Skip to content

Commit

Permalink
Add TESObjectREFR::GetEncounterZone
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Jun 16, 2024
1 parent f65d2d1 commit 7e55b89
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/TESObjectREFR.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ namespace RE
const char* GetDisplayFullName();
InventoryDropMap GetDroppedInventory();
InventoryDropMap GetDroppedInventory(std::function<bool(TESBoundObject&)> a_filter);
BGSEncounterZone* GetEncounterZone() const;
BGSLocation* GetEditorLocation() const;
bool GetEditorLocation(NiPoint3& a_outPos, NiPoint3& a_outRot, TESForm*& a_outWorldOrCell, TESObjectCELL* a_fallback);
std::optional<double> GetEnchantmentCharge() const;
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 @@ -251,6 +251,13 @@ namespace RE
return results;
}

BGSEncounterZone* TESObjectREFR::GetEncounterZone() const
{
using func_t = decltype(&TESObjectREFR::GetEncounterZone);
REL::Relocation<func_t> func{ RELOCATION_ID(19797, 20202) };
return func(this);
}

BGSLocation* TESObjectREFR::GetEditorLocation() const
{
return GetEditorLocation1();
Expand Down

0 comments on commit 7e55b89

Please sign in to comment.