Closed fireundubh closed 2 years ago
Thanks, been very busy this weekend, but I'll check this out after the weekend and update the PR.
This already exists as RE::ActorValueList::LookupActorValueByName
This already exists as
RE::ActorValueList::LookupActorValueByName
How are you supposed to use this? edit: Got it.
if (const auto actor = a_ref->As<RE::Actor>(); actor) {
const auto actorValueList = RE::ActorValueList::GetSingleton();
const auto actorValueId = actorValueList->LookupActorValueByName(a_actorValue.c_str());
const auto actorValue = static_cast<RE::ActorValue>(actorValueId);
return actor->GetPermanentActorValue(actorValue);
}
if (const auto actor = a_ref->As<RE::Actor>(); actor) {
const auto actorValue = RE::ActorValueList::GetSingleton()->LookupActorValueByName(a_actorValue);
return actor->GetPermanentActorValue(actorValue);
}
Thanks, po3. This PR can be closed.
Closing as per the discussion above.
I use this function in LibFire.
Usage example: