Skip to content

Commit

Permalink
UnbindObject, return bool from DispatchMethodCall
Browse files Browse the repository at this point in the history
  • Loading branch information
shad0wshayd3 committed Aug 9, 2023
1 parent 0fb8772 commit 0018889
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CommonLibF4/include/RE/Bethesda/BSScript/IVirtualMachine.h
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ namespace RE
bool a_isLatent = false);

template <class... Args>
void DispatchMethodCall(
bool DispatchMethodCall(
std::uint64_t a_objHandle,
const BSFixedString& a_objName,
const BSFixedString& a_funcName,
Expand Down
7 changes: 7 additions & 0 deletions CommonLibF4/include/RE/Bethesda/BSScript/ObjectBindPolicy.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ namespace RE
return func(this, a_obj, a_objHandle);
}

void UnbindObject(const BSTSmartPointer<Object>& a_obj)
{
using func_t = decltype(&ObjectBindPolicy::UnbindObject);
REL::Relocation<func_t> func{ REL::ID(522763) };
return func(this, a_obj);
}

// members
IVirtualMachine* vm; // 10
IVMObjectBindInterface* bindInterface; // 18
Expand Down
4 changes: 2 additions & 2 deletions CommonLibF4/include/RE/Bethesda/BSScriptUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -1300,15 +1300,15 @@ namespace RE::BSScript
}

template <class... Args>
void IVirtualMachine::DispatchMethodCall(
bool IVirtualMachine::DispatchMethodCall(
std::uint64_t a_objHandle,
const BSFixedString& a_objName,
const BSFixedString& a_funcName,
const BSTSmartPointer<IStackCallbackFunctor>& a_callback,
Args... a_args)
{
auto args = detail::FunctionArgs{ this, a_args... };
DispatchMethodCall(
return DispatchMethodCall(
a_objHandle,
a_objName,
a_funcName,
Expand Down

0 comments on commit 0018889

Please sign in to comment.