CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
BGSDynamicPersistenceManager.h
Go to the documentation of this file.
1#pragma once
2
3#include "RE/B/BSAtomic.h"
4#include "RE/B/BSTArray.h"
5#include "RE/B/BSTSingleton.h"
7
8namespace RE
9{
10 class QueuedPromoteReferencesTask;
11
12 class BGSDynamicPersistenceManager : public BSTSingletonExplicit<BGSDynamicPersistenceManager>
13 {
14 public:
16 {
17 static REL::Relocation<BGSDynamicPersistenceManager**> singleton{ RELOCATION_ID(514177, 400326) };
18 return *singleton;
19 }
20
21 bool PromoteReference(TESObjectREFR* a_refr, TESForm* a_owner)
22 {
23 using func_t = decltype(&BGSDynamicPersistenceManager::PromoteReference);
24 static REL::Relocation<func_t> func{ RELOCATION_ID(15157, 15330) };
25 return func(this, a_refr, a_owner);
26 }
27
28 bool DemoteReference(TESObjectREFR* a_refr, TESForm* a_owner, bool a_allowActors = false)
29 {
30 using func_t = decltype(&BGSDynamicPersistenceManager::DemoteReference);
31 static REL::Relocation<func_t> func{ RELOCATION_ID(15158, 15331) };
32 return func(this, a_refr, a_owner, a_allowActors);
33 }
34
35 // members
38 volatile std::int32_t pauseCount; // 20
39 };
40 static_assert(sizeof(BGSDynamicPersistenceManager) == 0x28);
41}
#define RELOCATION_ID(SE, AE)
Definition PCH.h:506
Definition Relocation.h:210
Definition BGSDynamicPersistenceManager.h:13
bool DemoteReference(TESObjectREFR *a_refr, TESForm *a_owner, bool a_allowActors=false)
Definition BGSDynamicPersistenceManager.h:28
BSTArray< NiPointer< QueuedPromoteReferencesTask > > taskArray
Definition BGSDynamicPersistenceManager.h:36
volatile std::int32_t pauseCount
Definition BGSDynamicPersistenceManager.h:38
BSSpinLock taskArrayLock
Definition BGSDynamicPersistenceManager.h:37
static BGSDynamicPersistenceManager * GetSingleton()
Definition BGSDynamicPersistenceManager.h:15
bool PromoteReference(TESObjectREFR *a_refr, TESForm *a_owner)
Definition BGSDynamicPersistenceManager.h:21
Definition BSAtomic.h:92
Definition BSTArray.h:378
Definition TESForm.h:36
Definition TESObjectREFR.h:114
Definition AbsorbEffect.h:6
Definition BSTSingleton.h:11