CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
TESObjectREFR.h
Go to the documentation of this file.
1#pragma once
2
6#include "RE/B/BSTArray.h"
7#include "RE/B/BSTEvent.h"
8#include "RE/B/BSTList.h"
10#include "RE/E/ExtraDataList.h"
11#include "RE/F/FormTypes.h"
13#include "RE/M/MagicSystem.h"
14#include "RE/N/NiPoint3.h"
15#include "RE/N/NiSmartPointer.h"
16#include "RE/T/TESForm.h"
17
18namespace RE
19{
20 enum class LOCK_LEVEL;
21 class Actor;
22 class ActorCause;
23 class BGSAnimationSequencer;
24 class BGSDialogueBranch;
25 class BipedAnim;
26 class BSAnimNoteReceiver;
27 class BSFaceGenAnimationData;
28 class BSFaceGenNiNode;
29 class BSFlattenedBoneTree;
30 class DialogueResponse;
31 class Explosion;
32 class InventoryChanges;
33 class InventoryEntryData;
34 class MagicCaster;
35 class MagicTarget;
36 class ModelReferenceEffect;
37 class NiAVObject;
38 class NiControllerManager;
39 class NiControllerSequence;
40 class NiNode;
41 class NiObject;
42 class Projectile;
43 class ShaderReferenceEffect;
44 class TargetEntry;
45 class TESActorBase;
46 class TESBoundObject;
47 class TESContainer;
48 class TrapData;
49 class TrapEntry;
50 struct BGSDecalGroup;
51 struct BSAnimationGraphEvent;
52 struct BSAnimationUpdateData;
53 struct REFR_LOCK;
54
56 {
57 kRemove,
58 kSteal,
63 };
64
65 struct OBJ_REFR
66 {
67 public:
68 // members
72 };
73 static_assert(sizeof(OBJ_REFR) == 0x20);
74
76 {
77 public:
78 // members
79 BSTSmallArray<void*> unk00; // 00 - handleList?
82 float cachedRadius; // 24
83 std::uint16_t flags; // 28
84 std::int16_t underwaterCount; // 2A
85 std::uint32_t pad2C; // 2C
86 std::uint64_t unk30; // 30 - AIProcess::Data0B8
87 std::uint64_t unk38; // 38
88 std::uint64_t unk40; // 40
89 std::uint64_t unk48; // 48
90 std::uint64_t unk50; // 50
91 std::uint64_t unk58; // 58
92 std::uint64_t unk60; // 60
94 void* unk70; // 70 - smart ptr
95 };
96 static_assert(sizeof(LOADED_REF_DATA) == 0x78);
97
99
101 public TESForm, // 00
102 public BSHandleRefObject, // 20
103 public BSTEventSink<BSAnimationGraphEvent>, // 30
105 {
106 public:
107 inline static constexpr auto RTTI = RTTI_TESObjectREFR;
108 inline static constexpr auto FORMTYPE = FormType::Reference;
109
110 using Count = std::int32_t;
111 using InventoryCountMap = std::map<TESBoundObject*, Count>;
112 using InventoryItemMap = std::map<TESBoundObject*, std::pair<Count, std::unique_ptr<InventoryEntryData>>>;
113 using InventoryDropMap = std::map<TESBoundObject*, std::pair<Count, std::vector<ObjectRefHandle>>>;
114
115 enum class MotionType // hkpMotion::MotionType
116 {
117 kDynamic = 1,
118 kSphereInertia = 2,
119 kBoxInertia = 3,
120 kKeyframed = 4,
121 kFixed = 5,
122 kThinBoxInertia = 6,
123 kCharacter = 7
124 };
125
127 {
128 enum ChangeFlag : std::uint32_t
129 {
130 kMoved = 1 << 1,
131 kHavokMoved = 1 << 2,
132 kCellChanged = 1 << 3,
133 kScale = 1 << 4,
134 kInventory = 1 << 5,
136 kBaseObject = 1 << 7,
137 kItemExtraData = 1 << 10,
138 kAmmoExtra = 1 << 11,
139 kLockExtra = 1 << 12,
140 kEmpty = 1 << 21,
142 kOpenState = 1 << 23,
143 kPromoted = 1 << 25,
146 kAnimation = 1 << 28,
147 kEncZoneExtra = 1 << 29,
149 kGameOnlyExtra = (std::uint32_t)1 << 31
150 };
151 };
152
154 {
155 enum RecordFlag : std::uint32_t
156 {
158 kCollisionsDisabled = 1 << 4, // ?
159
160 kDeleted = 1 << 5,
161 kHiddenFromLocalMap = 1 << 6, // TESObjectSTAT
162 kTurnOffFire = 1 << 7,
163
164 kInaccessible = 1 << 8, // TESObjectDOOR
165 kLODRespectsEnableState = 1 << 8, // TESObjectSTAT
166 kStartsDead = 1 << 8, // TESNPC
168
169 kMotionBlur = 1 << 9, // TESObjectSTAT
170 kPersistent = 1 << 10,
172 kIgnored = 1 << 12,
173
174 kStartUnconscious = 1 << 13, // TESNPC
175 kSkyMarker = 1 << 13,
176 kHarvested = 1 << 13, // TESObjectTREE
177
178 kIsFullLOD = 1 << 16, // Actor
179 kNeverFades = 1 << 16, // TESObjectLIGH
180
182
183 kNoAIAcquire = 1 << 25,
187
189
190 kGround = 1 << 30,
191 kRespawns = 1 << 30,
192
193 kMultibound = (std::uint32_t)1 << 31
194 };
195 };
196
197 ~TESObjectREFR() override; // 00
198
199 // override (TESForm)
200 void InitializeData() override; // 04
201 void ClearData() override; // 05
202 bool Load(TESFile* a_mod) override; // 06
203 TESForm* CreateDuplicateForm(bool a_createEditorID, void* a_arg2) override; // 09
204 bool CheckSaveGame(BGSSaveFormBuffer* a_buf) override; // 0D
205 void SaveGame(BGSSaveFormBuffer* a_buf) override; // 0E
206 void LoadGame(BGSLoadFormBuffer* a_buf) override; // 0F
207 void InitLoadGame(BGSLoadFormBuffer* a_buf) override; // 10
208 void FinishLoadGame(BGSLoadFormBuffer* a_buf) override; // 11
209 void Revert(BGSLoadFormBuffer* a_buf) override; // 12
210 void InitItemImpl() override; // 13
211 FormType GetSavedFormType() const override; // 15
212 void GetFormDetailedString(char* a_buf, std::uint32_t a_bufLen) override; // 16
213 bool GetRandomAnim() const override; // 18 - { return data.objectReference->GetRandomAnim(); }
214 bool IsHeadingMarker() const override; // 1A - { return data.objectReference->formType == FormType::Light ? (flags & RecordFlags::kNeverFades) != 0 : false; }
215 bool GetDangerous() const override; // 1B - { return data.objectReference->GetDangerous(); }
216 bool GetObstacle() const override; // 1D - { return data.objectReference ? data.objectReference->GetObstacle() : false; }
217 bool GetOnLocalMap() const override; // 1F - { return (flags >> 9) & 1 && data.objectReference->GetOnLocalMap(); }
218 bool GetMustUpdate() const override; // 20 - { return data.objectReference->GetMustUpdate(); }
219 void SetOnLocalMap(bool a_set) override; // 21
220 bool GetIgnoredBySandbox() const override; // 22
221 void SetDelete(bool a_set) override; // 23
222 void SetAltered(bool a_set) override; // 24
223 bool IsWater() const override; // 2A - { return data.objectReference ? data.objectReference->IsWater() : false; }
224 TESObjectREFR* AsReference1() override; // 2B - { return this; }
225 const TESObjectREFR* AsReference2() const override; // 2C - { return this; }
226 bool BelongsInGroup(FORM* a_form, bool a_allowParentGroups, bool a_currentOnly) override; // 30
227 void CreateGroupData(FORM* a_form, FORM_GROUP* a_group) override; // 31
228 const char* GetFormEditorID() const override; // 32
229
230 // override (BSTEventSink<BSAnimationGraphEvent>)
232
233 // override (IAnimationGraphManagerHolder)
238 bool SetupAnimEventSinks(const BSTSmartPointer<BShkbAnimationGraph>& a_animGraph) override; // 08
240
241 // add
242 virtual void Predestroy(); // 3B
243 virtual BGSLocation* GetEditorLocation1() const; // 3C
244 virtual bool GetEditorLocation2(NiPoint3& a_outPos, NiPoint3& a_outRot, TESForm*& a_outWorldOrCell, TESObjectCELL* a_fallback); // 3D
245 virtual void ForceEditorLocation(BGSLocation* a_location); // 3E
246 virtual void Update3DPosition(bool a_warp); // 3F
247 virtual void UpdateSoundCallBack(bool a_endSceneAction); // 40
248 virtual bool SetDialogueWithPlayer(bool a_flag, bool a_forceGreet, TESTopicInfo* a_topic); // 41
249 virtual void Unk_42(void); // 42
250 virtual bool GetFullLODRef() const; // 43
251 virtual void SetFullLODRef(bool a_set); // 44
252 virtual BGSAnimationSequencer* GetSequencer() const; // 45
253 virtual bool QCanUpdateSync() const; // 46 - { return true; }
254 virtual bool GetAllowPromoteToPersistent() const; // 47 - { return true; }
255 virtual bool HasKeywordHelper(const BGSKeyword* a_keyword) const; // 48
256 virtual TESPackage* CheckForCurrentAliasPackage(); // 49 - { return 0; }
257 virtual BGSScene* GetCurrentScene() const; // 4A
258 virtual void SetCurrentScene(BGSScene* a_scene); // 4B
259 virtual bool UpdateInDialogue(DialogueResponse* a_response, bool a_unused); // 4C
260 virtual BGSDialogueBranch* GetExclusiveBranch() const; // 4D
261 virtual void SetExclusiveBranch(BGSDialogueBranch* a_branch); // 4E
262 virtual void PauseCurrentDialogue(); // 4F
263 virtual void SetActorCause(ActorCause* a_cause); // 50
264 virtual ActorCause* GetActorCause() const; // 51
265 virtual NiPoint3 GetStartingAngle() const; // 52
266 virtual NiPoint3 GetStartingLocation() const; // 53
267 virtual void SetStartingPosition(const NiPoint3& a_pos); // 54
268 virtual void UpdateRefLight(); // 55
269 virtual ObjectRefHandle RemoveItem(TESBoundObject* a_item, std::int32_t a_count, ITEM_REMOVE_REASON a_reason, ExtraDataList* a_extraList, TESObjectREFR* a_moveToRef, const NiPoint3* a_dropLoc = 0, const NiPoint3* a_rotate = 0); // 56
270 virtual bool AddWornItem(TESBoundObject* a_item, std::int32_t a_count, bool a_forceEquip, std::uint32_t a_arg4, std::uint32_t a_arg5); // 57
271 virtual void DoTrap1(TrapData& a_data); // 58 - { return; }
272 virtual void DoTrap2(TrapEntry* a_trap, TargetEntry* a_target); // 59 - { return; }
273 virtual void AddObjectToContainer(TESBoundObject* a_object, ExtraDataList* a_extraList, std::int32_t a_count, TESObjectREFR* a_fromRefr); // 5A
274 virtual NiPoint3 GetLookingAtLocation() const; // 5B
276 virtual MagicTarget* GetMagicTarget(); // 5D
277 virtual bool IsChild() const; // 5E - { return false; }
278 virtual TESActorBase* GetTemplateActorBase(); // 5F - { return 0; }
279 virtual void SetTemplateActorBase(TESActorBase* a_template); // 60 - { return; }
280 virtual BSFaceGenNiNode* GetFaceNodeSkinned(); // 61 - { return 0; }
281 virtual BSFaceGenNiNode* GetFaceNode(); // 62 - { return GetFaceNodeSkinned(); }
282 virtual BSFaceGenAnimationData* GetFaceGenAnimationData(); // 63 - { return 0; }
283 virtual bool ClampToGround(); // 64
284 virtual bool DetachHavok(NiAVObject* a_obj3D); // 65
285 virtual void InitHavok(); // 66
286 virtual void Unk_67(void); // 67 - { return; }
287 virtual void Unk_68(void); // 68 - { return; }
288 virtual void Unk_69(void); // 69 - { return; }
289 virtual NiAVObject* Load3D(bool a_backgroundLoading); // 6A
290 virtual void Release3DRelatedData(); // 6B
291 virtual void Set3D(NiAVObject* a_object, bool a_queue3DTasks = true); // 6C
292 virtual bool ShouldBackgroundClone() const; // 6D
293 virtual void Unk_6E(void); // 6E - { return; }
294 virtual NiAVObject* Get3D1(bool a_firstPerson) const; // 6F - { return Get3D2(); }
295 virtual NiAVObject* Get3D2() const; // 70
296 virtual bool Is3rdPersonVisible() const; // 71 - { return true; }
297 virtual bool PopulateGraphProjectsToLoad(void) const; // 72
298 virtual NiPoint3 GetBoundMin() const; // 73
299 virtual NiPoint3 GetBoundMax() const; // 74
300 virtual void Unk_75(void); // 75 - { return 0; }
301 virtual bool InitNonNPCAnimation(NiNode& a_nodeForAnim); // 76
302 virtual bool CheckAndFixSkinAndBoneOrder(NiNode& a_nodeToTest); // 77
303 virtual void Unk_78(void); // 78
304 virtual void ModifyAnimationUpdateData(BSAnimationUpdateData& a_data); // 79 - { return; }
305 virtual bool ShouldSaveAnimationOnUnloading() const; // 7A
306 virtual bool ShouldSaveAnimationOnSaving() const; // 7B
307 virtual bool ShouldPerformRevert() const; // 7C - { return true; }
308 virtual void UpdateAnimation(float a_delta); // 7D
309 virtual const BSTSmartPointer<BipedAnim>& GetBiped1(bool a_firstPerson) const; // 7E - { return GetBiped2(); }
310 virtual const BSTSmartPointer<BipedAnim>& GetBiped2() const; // 7F
311 virtual const BSTSmartPointer<BipedAnim>& GetCurrentBiped() const; // 80 - { return GetBiped2(); }
312 virtual void SetBiped(const BSTSmartPointer<BipedAnim>& a_biped); // 81 - { return; }
313 virtual void Unk_82(void); // 82 - { return; }
314 virtual void Unk_83(void); // 83 - { return; }
315 virtual void SetObjectReference(TESBoundObject* a_object); // 84 - sets flag 24 if the object has destructibles
316 virtual void MoveHavok(bool a_forceRec); // 85
317 virtual void GetLinearVelocity(NiPoint3& a_velocity) const; // 86
318 virtual void SetActionComplete(bool a_set); // 87 - { return; }
319 virtual void SetMovementComplete(bool a_set); // 88 - { return; }
320 virtual void Disable(); // 89
321 virtual void ResetInventory(bool a_leveledOnly); // 8A
322 virtual void Unk_8B(void); // 8B - { return 0; }
323 virtual void Unk_8C(void); // 8C - { return; }
324 virtual NiAVObject* GetCurrent3D() const; // 8D - { return Get3D2(); }
325 virtual Explosion* AsExplosion(); // 8E - { return 0; }
326 virtual Projectile* AsProjectile(); // 8F - { return 0; }
327 virtual bool OnAddCellPerformQueueReference(TESObjectCELL& a_cell) const; // 90 - { return true; }
328 virtual void DoMoveToHigh(); // 91 - { return; }
329 virtual void TryMoveToMiddleLow(); // 92 - { return; }
330 virtual bool TryChangeSkyCellActorsProcessLevel(); // 93 - { return false; }
331 virtual void Unk_94(void); // 94 - { return; }
332 virtual void Unk_95(void); // 95 - { return; }
333 virtual void Unk_96(void); // 96 - related to lockpicking
334 virtual TESObjectCELL* GetSaveParentCell() const; // 97
335 virtual void SetParentCell(TESObjectCELL* a_cell); // 98
336 virtual bool IsDead(bool a_notEssential = true) const; // 99
337 virtual BSAnimNoteReceiver* CreateAnimNoteReceiver(); // 9A
338 virtual BSAnimNoteReceiver* GetAnimNoteReceiver(); // 9B
339 virtual void Unk_9C(void); // 9C
340 virtual void Unk_9D(void); // 9D - { return 0; }
341 virtual TESAmmo* GetCurrentAmmo() const; // 9E - { return 0; }
342 virtual BGSDecalGroup* GetDecalGroup() const; // 9F
343 virtual void Unk_A0(void); // A0
344 virtual void UnequipItem(std::uint64_t a_arg1, TESBoundObject* a_object); // A1 - { return; }
345
347 static bool LookupByHandle(RefHandle a_refHandle, NiPointer<TESObjectREFR>& a_refrOut);
349
350 ModelReferenceEffect* ApplyArtObject(BGSArtObject* a_artObject, float a_duration = -1.0f, TESObjectREFR* a_facingRef = nullptr, bool a_faceTarget = false, bool a_attachToCamera = false, NiAVObject* a_attachNode = nullptr, bool a_interfaceEffect = false);
351 ShaderReferenceEffect* ApplyEffectShader(TESEffectShader* a_effectShader, float a_duration = -1.0f, TESObjectREFR* a_facingRef = nullptr, bool a_faceTarget = false, bool a_attachToCamera = false, NiAVObject* a_attachNode = nullptr, bool a_interfaceEffect = false);
353 void DoTrap(TrapData& a_data);
354 void DoTrap(TrapEntry* a_trap, TargetEntry* a_target);
356 NiAVObject* Get3D(bool a_firstPerson) const;
359 float GetAngleX() const;
360 float GetAngleY() const;
361 float GetAngleZ() const;
362 float GetBaseHeight() const;
366 const BSTSmartPointer<BipedAnim>& GetBiped(bool a_firstPerson) const;
369 const char* GetDisplayFullName();
371 InventoryDropMap GetDroppedInventory(std::function<bool(TESBoundObject&)> a_filter);
373 bool GetEditorLocation(NiPoint3& a_outPos, NiPoint3& a_outRot, TESForm*& a_outWorldOrCell, TESObjectCELL* a_fallback);
374 std::optional<double> GetEnchantmentCharge() const;
378 InventoryItemMap GetInventory(std::function<bool(TESBoundObject&)> a_filter);
379 std::int32_t GetInventoryCount();
381 InventoryCountMap GetInventoryCounts(std::function<bool(TESBoundObject&)> a_filter);
386 const char* GetName() const;
388 [[nodiscard]] constexpr TESBoundObject* GetObjectReference() const noexcept { return data.objectReference; }
390 [[nodiscard]] constexpr TESObjectCELL* GetParentCell() const noexcept { return parentCell; }
391 [[nodiscard]] constexpr NiPoint3 GetPosition() const noexcept { return data.location; }
392 [[nodiscard]] constexpr float GetPositionX() const noexcept { return data.location.x; }
393 [[nodiscard]] constexpr float GetPositionY() const noexcept { return data.location.y; }
394 [[nodiscard]] constexpr float GetPositionZ() const noexcept { return data.location.z; }
396 std::uint32_t GetStealValue(const InventoryEntryData* a_entryData, std::uint32_t a_numItems, bool a_useMult) const;
397 float GetWeight() const;
400 bool HasCollision() const;
401 bool HasContainer() const;
402 bool HasKeyword(const BGSKeyword* a_keyword) const;
403 bool HasQuestObject() const;
405 bool InitInventoryIfRequired(bool a_ignoreContainerExtraData = false);
406 bool Is3DLoaded() const;
408 bool IsAnOwner(const Actor* a_testOwner, bool a_useFaction, bool a_requiresOwner) const;
410 bool IsDisabled() const;
411 bool IsEnchanted() const;
412 bool IsHorse() const;
414 bool IsLocked() const;
417 bool MoveToNode(TESObjectREFR* a_target, const BSFixedString& a_nodeName);
418 bool MoveToNode(TESObjectREFR* a_target, NiAVObject* a_node);
421 void SetActivationBlocked(bool a_blocked);
422 void SetCollision(bool a_enable);
423 bool SetDisplayName(const BSFixedString& a_name, bool a_force);
424 bool SetMotionType(MotionType a_motionType, bool a_allowActivate = true);
425 void SetPosition(float a_x, float a_y, float a_z);
427
428 // members
433 std::uint64_t unk88; // 88
434 std::uint16_t refScale; // 90
435 std::int8_t modelState; // 92
436 bool preDestroyed; // 93
437 std::uint32_t pad94; // 94
438
439 private:
440 InventoryChanges* ForceInitInventoryChanges();
441 InventoryChanges* MakeInventoryChanges();
442 void MoveTo_Impl(const ObjectRefHandle& a_targetHandle, TESObjectCELL* a_targetCell, TESWorldSpace* a_selfWorldSpace, const NiPoint3& a_position, const NiPoint3& a_rotation);
443 void PlayAnimation_Impl(NiControllerManager* a_manager, NiControllerSequence* a_toSeq, NiControllerSequence* a_fromSeq, bool a_arg4 = false);
444 };
445#if !defined(SKYRIMVR) && !defined(SKYRIMSE_PRE_1_6_629)
446 static_assert(sizeof(TESObjectREFR) == 0xA0);
447#else
448 static_assert(sizeof(TESObjectREFR) == 0x98);
449#endif
450};
#define NiSmartPointer(className)
Definition: NiSmartPointer.h:251
Definition: ActorCause.h:9
Definition: Actor.h:125
Definition: BGSAnimationSequencer.h:11
Definition: BGSArtObject.h:12
Definition: BGSDialogueBranch.h:10
Definition: BGSKeyword.h:10
Definition: BGSLocation.h:68
Definition: BGSScene.h:32
Definition: BSFaceGenAnimationData.h:11
Definition: BSFaceGenNiNode.h:14
Definition: BSHandleRefObject.h:8
Definition: BSTArray.h:377
Definition: BSTEvent.h:146
Definition: BSTEvent.h:28
Definition: BSTSmartPointer.h:37
Definition: DialogueItem.h:21
Definition: ExtraDataList.h:46
Definition: IAnimationGraphManagerHolder.h:14
Definition: InventoryChanges.h:13
Definition: InventoryEntryData.h:14
Definition: MagicCaster.h:11
Definition: MagicTarget.h:19
Definition: ModelReferenceEffect.h:20
Definition: NiAVObject.h:45
Definition: NiControllerManager.h:17
Definition: NiControllerSequence.h:23
Definition: NiNode.h:12
Definition: NiPoint3.h:6
float z
Definition: NiPoint3.h:43
float x
Definition: NiPoint3.h:41
float y
Definition: NiPoint3.h:42
Definition: NiSmartPointer.h:9
Definition: Projectile.h:19
Definition: ShaderReferenceEffect.h:16
Definition: TESActorBase.h:32
Definition: TESAmmo.h:50
Definition: TESBoundObject.h:24
Definition: TESContainer.h:22
Definition: TESEffectShader.h:171
Definition: TESFaction.h:120
Definition: TESFile.h:14
Definition: TESForm.h:34
Definition: TESNPC.h:36
Definition: TESObjectCELL.h:102
Definition: TESObjectREFR.h:105
const char * GetDisplayFullName()
MotionType
Definition: TESObjectREFR.h:116
LOADED_REF_DATA * loadedData
Definition: TESObjectREFR.h:431
void ClearData() override
virtual bool GetAllowPromoteToPersistent() const
virtual void InitHavok()
bool HasContainer() const
virtual bool IsDead(bool a_notEssential=true) const
virtual BGSDecalGroup * GetDecalGroup() const
float GetWeight() const
std::uint16_t refScale
Definition: TESObjectREFR.h:434
constexpr float GetPositionX() const noexcept
Definition: TESObjectREFR.h:392
NiPoint3 GetAngle() const
virtual void Unk_9D(void)
virtual void Unk_69(void)
virtual void Update3DPosition(bool a_warp)
void DoTrap(TrapEntry *a_trap, TargetEntry *a_target)
virtual bool SetDialogueWithPlayer(bool a_flag, bool a_forceGreet, TESTopicInfo *a_topic)
virtual TESObjectCELL * GetSaveParentCell() const
TESObjectCELL * parentCell
Definition: TESObjectREFR.h:430
bool IsEnchanted() const
void LoadGame(BGSLoadFormBuffer *a_buf) override
FormType GetSavedFormType() const override
NiControllerSequence * GetSequence(stl::zstring a_name) const
TESBoundObject * GetBaseObject()
virtual void PauseCurrentDialogue()
virtual bool CheckAndFixSkinAndBoneOrder(NiNode &a_nodeToTest)
virtual void Predestroy()
void SetOnLocalMap(bool a_set) override
virtual void Unk_78(void)
bool HasKeyword(const BGSKeyword *a_keyword) const
virtual void Unk_9C(void)
bool CheckSaveGame(BGSSaveFormBuffer *a_buf) override
virtual BSFaceGenAnimationData * GetFaceGenAnimationData()
NiAVObject * Get3D(bool a_firstPerson) const
std::map< TESBoundObject *, Count > InventoryCountMap
Definition: TESObjectREFR.h:111
constexpr float GetPositionY() const noexcept
Definition: TESObjectREFR.h:393
TESForm * CreateDuplicateForm(bool a_createEditorID, void *a_arg2) override
virtual void Unk_A0(void)
virtual bool HasKeywordHelper(const BGSKeyword *a_keyword) const
virtual void Unk_75(void)
TESObjectREFR * AsReference1() override
virtual void SetActorCause(ActorCause *a_cause)
float GetAngleZ() const
bool BelongsInGroup(FORM *a_form, bool a_allowParentGroups, bool a_currentOnly) override
virtual BSFaceGenNiNode * GetFaceNodeSkinned()
virtual void UpdateSoundCallBack(bool a_endSceneAction)
virtual bool ClampToGround()
virtual void DoTrap2(TrapEntry *a_trap, TargetEntry *a_target)
virtual void Unk_8B(void)
virtual Explosion * AsExplosion()
virtual TESActorBase * GetTemplateActorBase()
bool MoveToNode(TESObjectREFR *a_target, NiAVObject *a_node)
virtual void SetCurrentScene(BGSScene *a_scene)
OBJ_REFR data
Definition: TESObjectREFR.h:429
const BSTSmartPointer< BipedAnim > & GetBiped() const
bool preDestroyed
Definition: TESObjectREFR.h:436
virtual bool IsChild() const
virtual NiAVObject * Get3D1(bool a_firstPerson) const
virtual bool GetFullLODRef() const
virtual BSFaceGenNiNode * GetFaceNode()
bool GetRandomAnim() const override
InventoryDropMap GetDroppedInventory()
virtual void UnequipItem(std::uint64_t a_arg1, TESBoundObject *a_object)
std::int8_t modelState
Definition: TESObjectREFR.h:435
bool GetAnimationGraphManagerImpl(BSTSmartPointer< BSAnimationGraphManager > &a_out) const override
virtual BGSLocation * GetEditorLocation1() const
InventoryItemMap GetInventory(std::function< bool(TESBoundObject &)> a_filter)
virtual void SetFullLODRef(bool a_set)
virtual BSAnimNoteReceiver * CreateAnimNoteReceiver()
virtual bool ShouldPerformRevert() const
InventoryItemMap GetInventory()
bool IsHeadingMarker() const override
virtual void SetBiped(const BSTSmartPointer< BipedAnim > &a_biped)
virtual ActorCause * GetActorCause() const
virtual void UpdateRefLight()
virtual const BSTSmartPointer< BipedAnim > & GetBiped2() const
InventoryDropMap GetDroppedInventory(std::function< bool(TESBoundObject &)> a_filter)
static NiPointer< TESObjectREFR > LookupByHandle(RefHandle a_refHandle)
virtual void Unk_68(void)
std::uint32_t GetStealValue(const InventoryEntryData *a_entryData, std::uint32_t a_numItems, bool a_useMult) const
float GetAngleY() const
std::map< TESBoundObject *, std::pair< Count, std::vector< ObjectRefHandle > > > InventoryDropMap
Definition: TESObjectREFR.h:113
InventoryCountMap GetInventoryCounts(std::function< bool(TESBoundObject &)> a_filter)
virtual void GetLinearVelocity(NiPoint3 &a_velocity) const
virtual void DoTrap1(TrapData &a_data)
const TESObjectREFR * AsReference2() const override
TESNPC * GetActorOwner()
std::int32_t Count
Definition: TESObjectREFR.h:110
TESWorldSpace * GetWorldspace() const
virtual void AddObjectToContainer(TESBoundObject *a_object, ExtraDataList *a_extraList, std::int32_t a_count, TESObjectREFR *a_fromRefr)
bool IsHorse() const
bool IsWater() const override
bool SetupAnimEventSinks(const BSTSmartPointer< BShkbAnimationGraph > &a_animGraph) override
virtual NiPoint3 GetStartingAngle() const
InventoryCountMap GetInventoryCounts()
void SaveGame(BGSSaveFormBuffer *a_buf) override
bool GetMustUpdate() const override
virtual const BSTSmartPointer< BipedAnim > & GetBiped1(bool a_firstPerson) const
float GetAngleX() const
static TESObjectREFR * FindReferenceFor3D(NiAVObject *a_object3D)
virtual void UpdateAnimation(float a_delta)
virtual TESAmmo * GetCurrentAmmo() const
void Revert(BGSLoadFormBuffer *a_buf) override
bool IsCrimeToActivate()
TESObjectREFR * GetLinkedRef(BGSKeyword *a_keyword)
void SetActivationBlocked(bool a_blocked)
virtual bool QCanUpdateSync() const
std::uint64_t unk88
Definition: TESObjectREFR.h:433
void InitItemImpl() override
virtual bool GetEditorLocation2(NiPoint3 &a_outPos, NiPoint3 &a_outRot, TESForm *&a_outWorldOrCell, TESObjectCELL *a_fallback)
ShaderReferenceEffect * ApplyEffectShader(TESEffectShader *a_effectShader, float a_duration=-1.0f, TESObjectREFR *a_facingRef=nullptr, bool a_faceTarget=false, bool a_attachToCamera=false, NiAVObject *a_attachNode=nullptr, bool a_interfaceEffect=false)
virtual void Set3D(NiAVObject *a_object, bool a_queue3DTasks=true)
virtual NiAVObject * Load3D(bool a_backgroundLoading)
void FinishLoadGame(BGSLoadFormBuffer *a_buf) override
virtual void Unk_96(void)
bool Load(TESFile *a_mod) override
virtual void SetActionComplete(bool a_set)
virtual void Release3DRelatedData()
bool IsInitiallyDisabled() const
virtual Projectile * AsProjectile()
void PlayAnimation(NiControllerManager *a_manager, NiControllerSequence *a_toSeq, NiControllerSequence *a_fromSeq)
bool GetEditorLocation(NiPoint3 &a_outPos, NiPoint3 &a_outRot, TESForm *&a_outWorldOrCell, TESObjectCELL *a_fallback)
virtual void Unk_6E(void)
virtual NiAVObject * GetCurrent3D() const
const BSTSmartPointer< BipedAnim > & GetBiped(bool a_firstPerson) const
const char * GetName() const
std::map< TESBoundObject *, std::pair< Count, std::unique_ptr< InventoryEntryData > > > InventoryItemMap
Definition: TESObjectREFR.h:112
virtual NiAVObject * Get3D2() const
NiAVObject * GetNodeByName(const BSFixedString &a_nodeName)
virtual BGSAnimationSequencer * GetSequencer() const
std::int32_t GetInventoryCount()
virtual MagicCaster * GetMagicCaster(MagicSystem::CastingSource a_source)
LOCK_LEVEL GetLockLevel() const
virtual void SetStartingPosition(const NiPoint3 &a_pos)
virtual BGSScene * GetCurrentScene() const
virtual void Unk_67(void)
void PlayAnimation(stl::zstring a_from, stl::zstring a_to)
void SetCollision(bool a_enable)
void InitLoadGame(BGSLoadFormBuffer *a_buf) override
void SetDelete(bool a_set) override
virtual void SetExclusiveBranch(BGSDialogueBranch *a_branch)
virtual bool OnAddCellPerformQueueReference(TESObjectCELL &a_cell) const
virtual TESPackage * CheckForCurrentAliasPackage()
virtual void ModifyAnimationUpdateData(BSAnimationUpdateData &a_data)
BGSLocation * GetEditorLocation() const
ObjectRefHandle CreateRefHandle()
virtual void Unk_95(void)
virtual void Unk_94(void)
bool HasCollision() const
bool GetObstacle() const override
virtual void SetParentCell(TESObjectCELL *a_cell)
virtual void Unk_8C(void)
virtual BSAnimNoteReceiver * GetAnimNoteReceiver()
NiAVObject * Get3D() const
virtual NiPoint3 GetBoundMax() const
virtual void SetObjectReference(TESBoundObject *a_object)
std::uint32_t pad94
Definition: TESObjectREFR.h:437
virtual bool Is3rdPersonVisible() const
float GetBaseHeight() const
virtual NiPoint3 GetStartingLocation() const
void InitializeData() override
virtual BGSDialogueBranch * GetExclusiveBranch() const
virtual NiPoint3 GetBoundMin() const
bool GetOnLocalMap() const override
virtual bool UpdateInDialogue(DialogueResponse *a_response, bool a_unused)
bool SetAnimationGraphManagerImpl(BSTSmartPointer< BSAnimationGraphManager > &a_in) override
virtual void Unk_82(void)
constexpr TESBoundObject * GetObjectReference() const noexcept
Definition: TESObjectREFR.h:388
ObjectRefHandle GetHandle()
bool InitInventoryIfRequired(bool a_ignoreContainerExtraData=false)
TESForm * GetOwner() const
bool IsMarkedForDeletion() const
bool ConstructAnimationGraph(BSTSmartPointer< BShkbAnimationGraph > &a_out) override
std::optional< double > GetEnchantmentCharge() const
virtual void TryMoveToMiddleLow()
TESContainer * GetContainer() const
bool Is3DLoaded() const
const TESBoundObject * GetBaseObject() const
virtual bool TryChangeSkyCellActorsProcessLevel()
virtual bool InitNonNPCAnimation(NiNode &a_nodeForAnim)
REFR_LOCK * GetLock() const
void SetPosition(NiPoint3 a_pos)
bool IsAnOwner(const Actor *a_testOwner, bool a_useFaction, bool a_requiresOwner) const
void GetFormDetailedString(char *a_buf, std::uint32_t a_bufLen) override
InventoryChanges * GetInventoryChanges()
constexpr TESObjectCELL * GetParentCell() const noexcept
Definition: TESObjectREFR.h:390
virtual bool PopulateGraphProjectsToLoad(void) const
virtual ObjectRefHandle RemoveItem(TESBoundObject *a_item, std::int32_t a_count, ITEM_REMOVE_REASON a_reason, ExtraDataList *a_extraList, TESObjectREFR *a_moveToRef, const NiPoint3 *a_dropLoc=0, const NiPoint3 *a_rotate=0)
bool GetIgnoredBySandbox() const override
virtual void SetMovementComplete(bool a_set)
virtual void Unk_83(void)
virtual bool ShouldSaveAnimationOnSaving() const
const char * GetFormEditorID() const override
virtual bool ShouldBackgroundClone() const
virtual void Unk_42(void)
constexpr float GetPositionZ() const noexcept
Definition: TESObjectREFR.h:394
static constexpr auto FORMTYPE
Definition: TESObjectREFR.h:108
void CreateGroupData(FORM *a_form, FORM_GROUP *a_group) override
void DoTrap(TrapData &a_data)
~TESObjectREFR() override
virtual NiPoint3 GetLookingAtLocation() const
TESFaction * GetFactionOwner()
virtual bool ShouldSaveAnimationOnUnloading() const
float GetWeightInContainer()
virtual const BSTSmartPointer< BipedAnim > & GetCurrentBiped() const
virtual void Disable()
bool IsActivationBlocked() const
constexpr NiPoint3 GetPosition() const noexcept
Definition: TESObjectREFR.h:391
virtual bool AddWornItem(TESBoundObject *a_item, std::int32_t a_count, bool a_forceEquip, std::uint32_t a_arg4, std::uint32_t a_arg5)
bool HasQuestObject() const
virtual void ResetInventory(bool a_leveledOnly)
virtual bool DetachHavok(NiAVObject *a_obj3D)
static constexpr auto RTTI
Definition: TESObjectREFR.h:107
bool GetDangerous() const override
virtual void MoveHavok(bool a_forceRec)
bool SetDisplayName(const BSFixedString &a_name, bool a_force)
bool IsLocked() const
bool IsDisabled() const
virtual MagicTarget * GetMagicTarget()
virtual void ForceEditorLocation(BGSLocation *a_location)
void PostChangeAnimationManager(const BSTSmartPointer< BShkbAnimationGraph > &a_arg1, const BSTSmartPointer< BShkbAnimationGraph > &a_arg2) override
static bool LookupByHandle(RefHandle a_refHandle, NiPointer< TESObjectREFR > &a_refrOut)
void SetAltered(bool a_set) override
bool PopulateGraphNodesToTarget(BSScrapArray< NiAVObject * > &a_nodes) override
ExtraDataList extraList
Definition: TESObjectREFR.h:432
ModelReferenceEffect * ApplyArtObject(BGSArtObject *a_artObject, float a_duration=-1.0f, TESObjectREFR *a_facingRef=nullptr, bool a_faceTarget=false, bool a_attachToCamera=false, NiAVObject *a_attachNode=nullptr, bool a_interfaceEffect=false)
virtual void SetTemplateActorBase(TESActorBase *a_template)
BGSLocation * GetCurrentLocation() const
virtual void DoMoveToHigh()
void InitChildActivates(TESObjectREFR *a_actionRef)
void SetPosition(float a_x, float a_y, float a_z)
bool SetMotionType(MotionType a_motionType, bool a_allowActivate=true)
bool MoveToNode(TESObjectREFR *a_target, const BSFixedString &a_nodeName)
BSEventNotifyControl ProcessEvent(const BSAnimationGraphEvent *a_event, BSTEventSource< BSAnimationGraphEvent > *a_dispatcher) override
Definition: TESPackage.h:248
Definition: TESTopicInfo.h:42
Definition: TESWaterForm.h:83
Definition: TESWorldSpace.h:116
CastingSource
Definition: MagicSystem.h:21
Definition: AbsorbEffect.h:6
LOCK_LEVEL
Definition: ExtraLock.h:10
FormType
Definition: FormTypes.h:139
constexpr REL::ID RTTI_TESObjectREFR
Definition: Offsets_RTTI.h:6039
ITEM_REMOVE_REASON
Definition: TESObjectREFR.h:56
std::uint32_t RefHandle
Definition: BSCoreTypes.h:6
BSEventNotifyControl
Definition: BSTEvent.h:12
basic_zstring< char > zstring
Definition: PCH.h:77
Definition: BGSDecalGroup.h:61
Definition: BSAnimationGraphEvent.h:10
Definition: FORM.h:20
Definition: FORM.h:6
Definition: TESObjectREFR.h:76
std::uint64_t unk40
Definition: TESObjectREFR.h:88
BSTSmallArray< void * > unk00
Definition: TESObjectREFR.h:79
std::uint16_t flags
Definition: TESObjectREFR.h:83
std::uint64_t unk38
Definition: TESObjectREFR.h:87
std::uint64_t unk30
Definition: TESObjectREFR.h:86
std::uint64_t unk60
Definition: TESObjectREFR.h:92
float cachedRadius
Definition: TESObjectREFR.h:82
std::uint32_t pad2C
Definition: TESObjectREFR.h:85
NiPointer< NiAVObject > data3D
Definition: TESObjectREFR.h:93
TESWaterForm * currentWaterType
Definition: TESObjectREFR.h:80
float relevantWaterHeight
Definition: TESObjectREFR.h:81
std::uint64_t unk50
Definition: TESObjectREFR.h:90
std::int16_t underwaterCount
Definition: TESObjectREFR.h:84
void * unk70
Definition: TESObjectREFR.h:94
std::uint64_t unk48
Definition: TESObjectREFR.h:89
std::uint64_t unk58
Definition: TESObjectREFR.h:91
Definition: TESObjectREFR.h:66
TESBoundObject * objectReference
Definition: TESObjectREFR.h:69
NiPoint3 angle
Definition: TESObjectREFR.h:70
NiPoint3 location
Definition: TESObjectREFR.h:71
Definition: ExtraLock.h:21
Definition: TESObjectREFR.h:127
ChangeFlag
Definition: TESObjectREFR.h:129
@ kCellChanged
Definition: TESObjectREFR.h:132
@ kOwnershipExtra
Definition: TESObjectREFR.h:135
@ kBaseObject
Definition: TESObjectREFR.h:136
@ kLockExtra
Definition: TESObjectREFR.h:139
@ kHavokMoved
Definition: TESObjectREFR.h:131
@ kLeveledInventory
Definition: TESObjectREFR.h:145
@ kOpenDefaultState
Definition: TESObjectREFR.h:141
@ kEncZoneExtra
Definition: TESObjectREFR.h:147
@ kInventory
Definition: TESObjectREFR.h:134
@ kAmmoExtra
Definition: TESObjectREFR.h:138
@ kActivatingChildren
Definition: TESObjectREFR.h:144
@ kPromoted
Definition: TESObjectREFR.h:143
@ kEmpty
Definition: TESObjectREFR.h:140
@ kScale
Definition: TESObjectREFR.h:133
@ kItemExtraData
Definition: TESObjectREFR.h:137
@ kAnimation
Definition: TESObjectREFR.h:146
@ kOpenState
Definition: TESObjectREFR.h:142
@ kMoved
Definition: TESObjectREFR.h:130
@ kCreatedOnlyExtra
Definition: TESObjectREFR.h:148
@ kGameOnlyExtra
Definition: TESObjectREFR.h:149
Definition: TESObjectREFR.h:154
RecordFlag
Definition: TESObjectREFR.h:156
@ kInitiallyDisabled
Definition: TESObjectREFR.h:171
@ kLODRespectsEnableState
Definition: TESObjectREFR.h:165
@ kGround
Definition: TESObjectREFR.h:190
@ kReflectedByAutoWater
Definition: TESObjectREFR.h:186
@ kTurnOffFire
Definition: TESObjectREFR.h:162
@ kCollisionGeometry_BoundingBox
Definition: TESObjectREFR.h:185
@ kPersistent
Definition: TESObjectREFR.h:170
@ kNoAIAcquire
Definition: TESObjectREFR.h:183
@ kStartUnconscious
Definition: TESObjectREFR.h:174
@ kStartsDead
Definition: TESObjectREFR.h:166
@ kMotionBlur
Definition: TESObjectREFR.h:169
@ kHiddenFromLocalMap
Definition: TESObjectREFR.h:161
@ kIgnored
Definition: TESObjectREFR.h:172
@ kIsFullLOD
Definition: TESObjectREFR.h:178
@ kInaccessible
Definition: TESObjectREFR.h:164
@ kCollisionsDisabled
Definition: TESObjectREFR.h:158
@ kDeleted
Definition: TESObjectREFR.h:160
@ kDontHavokSettle
Definition: TESObjectREFR.h:188
@ kIsGroundPiece
Definition: TESObjectREFR.h:157
@ kNeverFades
Definition: TESObjectREFR.h:179
@ kSkyMarker
Definition: TESObjectREFR.h:175
@ kDoesntLightLandscape
Definition: TESObjectREFR.h:181
@ kRespawns
Definition: TESObjectREFR.h:191
@ kMultibound
Definition: TESObjectREFR.h:193
@ kCollisionGeometry_Filter
Definition: TESObjectREFR.h:184
@ kHarvested
Definition: TESObjectREFR.h:176
@ kDoesntLightWater
Definition: TESObjectREFR.h:167