Skip to content

Commit

Permalink
Add TESObjectREFR::OpenContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
qudix committed Mar 4, 2024
1 parent 475c51d commit bbdfa49
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 @@ -450,6 +450,7 @@ namespace RE
bool MoveToNode(TESObjectREFR* a_target, const BSFixedString& a_nodeName);
bool MoveToNode(TESObjectREFR* a_target, NiAVObject* a_node);
bool NameIncludes(std::string a_word);
void OpenContainer(std::int32_t a_openType) const;
NiPointer<TESObjectREFR> PlaceObjectAtMe(TESBoundObject* a_baseToPlace, bool a_forcePersist) const;
void PlayAnimation(stl::zstring a_from, stl::zstring a_to);
void PlayAnimation(NiControllerManager* a_manager, NiControllerSequence* a_toSeq, NiControllerSequence* a_fromSeq);
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 @@ -790,6 +790,13 @@ namespace RE
return name.find(a_word) != std::string::npos;
}

void TESObjectREFR::OpenContainer(std::int32_t a_openType) const
{
using func_t = decltype(&TESObjectREFR::OpenContainer);
REL::Relocation<func_t> func{ RELOCATION_ID(50211, 51140) };
func(this, a_openType);
}

NiPointer<TESObjectREFR> TESObjectREFR::PlaceObjectAtMe(TESBoundObject* a_baseToPlace, bool a_forcePersist) const
{
const auto handle = TESDataHandler::GetSingleton()->CreateReferenceAtLocation(a_baseToPlace, GetPosition(), GetAngle(), GetParentCell(), GetWorldspace(), nullptr, nullptr, ObjectRefHandle(), a_forcePersist, true);
Expand Down

0 comments on commit bbdfa49

Please sign in to comment.