"Cast Spell" function?
max-su-2019 opened this issue · comments
Just to make sure is the real member function that registery in the VM's "Spell Script"
Function Cast(ObjectReference akSource, ObjectReference akTarget = None) native
current contains in the library?
https://www.creationkit.com/index.php?title=Cast_-_Spell
I already dig out the offset of this function in VM, you can call it as below:
void CastSpell(RE::BSScript::IVirtualMachine* a_vm, RE::SpellItem* thisSpell, RE::TESObjectREFR* Caster, RE::TESObjectREFR* Target)
{
using func_t = void(*)(RE::BSScript::IVirtualMachine* a_vm, std::uint32_t stackId, RE::SpellItem* thisSpell, RE::TESObjectREFR* Caster, RE::TESObjectREFR* Target);
REL::Relocation<func_t> func{ REL::ID(55149) };
return func(a_vm, 0, thisSpell, Caster, Target);
}
Just want to know if that real member function already dig out now?