CommonLibSSE (Parapets fork)
TESObjectREFR.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
5 #include "RE/B/BSPointerHandle.h"
6 #include "RE/B/BSTArray.h"
7 #include "RE/B/BSTEvent.h"
8 #include "RE/B/BSTList.h"
9 #include "RE/B/BSTSmartPointer.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 
18 namespace 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 
55  enum class ITEM_REMOVE_REASON
56  {
57  kRemove,
58  kSteal,
59  kSelling,
60  kDropping,
63  };
64 
65  struct OBJ_REFR
66  {
67  public:
68  // members
70  NiPoint3 angle; // 08
72  };
73  static_assert(sizeof(OBJ_REFR) == 0x20);
74 
76  {
77  public:
78  // members
79  BSTSmallArray<void*> unk00; // 00 - handleList?
81  float relevantWaterHeight; // 20
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
104  public IAnimationGraphManagerHolder // 38
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 
126  struct ChangeFlags
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,
135  kOwnershipExtra = 1 << 6,
136  kBaseObject = 1 << 7,
137  kItemExtraData = 1 << 10,
138  kAmmoExtra = 1 << 11,
139  kLockExtra = 1 << 12,
140  kEmpty = 1 << 21,
141  kOpenDefaultState = 1 << 22,
142  kOpenState = 1 << 23,
143  kPromoted = 1 << 25,
145  kLeveledInventory = 1 << 27,
146  kAnimation = 1 << 28,
147  kEncZoneExtra = 1 << 29,
148  kCreatedOnlyExtra = 1 << 30,
149  kGameOnlyExtra = (std::uint32_t)1 << 31
150  };
151  };
152 
153  struct RecordFlags
154  {
155  enum RecordFlag : std::uint32_t
156  {
157  kIsGroundPiece = 1 << 4,
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 
188  kDontHavokSettle = 1 << 29,
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 #ifdef SKYRIMVR
314  virtual void AttachWeapon(RE::TESObjectWEAP* a_weapon, bool a_leftHand); // 82
315 #endif
316  virtual void Unk_82(void); // 82 - { return; }
317  virtual void Unk_83(void); // 83 - { return; }
318  virtual void SetObjectReference(TESBoundObject* a_object); // 84 - sets flag 24 if the object has destructibles
319  virtual void MoveHavok(bool a_forceRec); // 85
320  virtual void GetLinearVelocity(NiPoint3& a_velocity) const; // 86
321  virtual void SetActionComplete(bool a_set); // 87 - { return; }
322  virtual void SetMovementComplete(bool a_set); // 88 - { return; }
323  virtual void Disable(); // 89
324  virtual void ResetInventory(bool a_leveledOnly); // 8A
325  virtual void Unk_8B(void); // 8B - { return 0; }
326  virtual void Unk_8C(void); // 8C - { return; }
327  virtual NiAVObject* GetCurrent3D() const; // 8D - { return Get3D2(); }
328  virtual Explosion* AsExplosion(); // 8E - { return 0; }
329  virtual Projectile* AsProjectile(); // 8F - { return 0; }
330  virtual bool OnAddCellPerformQueueReference(TESObjectCELL& a_cell) const; // 90 - { return true; }
331  virtual void DoMoveToHigh(); // 91 - { return; }
332  virtual void TryMoveToMiddleLow(); // 92 - { return; }
333  virtual bool TryChangeSkyCellActorsProcessLevel(); // 93 - { return false; }
334  virtual void Unk_94(void); // 94 - { return; }
335  virtual void Unk_95(void); // 95 - { return; }
336  virtual void Unk_96(void); // 96 - related to lockpicking
337  virtual TESObjectCELL* GetSaveParentCell() const; // 97
338  virtual void SetParentCell(TESObjectCELL* a_cell); // 98
339  virtual bool IsDead(bool a_notEssential = true) const; // 99
340  virtual BSAnimNoteReceiver* CreateAnimNoteReceiver(); // 9A
341  virtual BSAnimNoteReceiver* GetAnimNoteReceiver(); // 9B
342  virtual void Unk_9C(void); // 9C
343  virtual void Unk_9D(void); // 9D - { return 0; }
344  virtual TESAmmo* GetCurrentAmmo() const; // 9E - { return 0; }
345  virtual BGSDecalGroup* GetDecalGroup() const; // 9F
346  virtual void Unk_A0(void); // A0
347  virtual void UnequipItem(std::uint64_t a_arg1, TESBoundObject* a_object); // A1 - { return; }
348 
350  static bool LookupByHandle(RefHandle a_refHandle, NiPointer<TESObjectREFR>& a_refrOut);
352 
353  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);
354  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);
356  void DoTrap(TrapData& a_data);
357  void DoTrap(TrapEntry* a_trap, TargetEntry* a_target);
358  NiAVObject* Get3D() const;
359  NiAVObject* Get3D(bool a_firstPerson) const;
362  float GetAngleX() const;
363  float GetAngleY() const;
364  float GetAngleZ() const;
365  float GetBaseHeight() const;
369  const BSTSmartPointer<BipedAnim>& GetBiped(bool a_firstPerson) const;
372  const char* GetDisplayFullName();
374  InventoryDropMap GetDroppedInventory(std::function<bool(TESBoundObject&)> a_filter);
376  bool GetEditorLocation(NiPoint3& a_outPos, NiPoint3& a_outRot, TESForm*& a_outWorldOrCell, TESObjectCELL* a_fallback);
377  std::optional<double> GetEnchantmentCharge() const;
381  InventoryItemMap GetInventory(std::function<bool(TESBoundObject&)> a_filter);
382  std::int32_t GetInventoryCount();
384  InventoryCountMap GetInventoryCounts(std::function<bool(TESBoundObject&)> a_filter);
386  [[nodiscard]] RE::InventoryEntryData* GetInventoryItemAt(std::int32_t a_index, bool a_isViewingContainer = false) const;
387  [[nodiscard]] std::int32_t GetInventoryItemCount(bool a_isViewingContainer = false, bool a_playable = true) const;
389  REFR_LOCK* GetLock() const;
391  const char* GetName() const;
393  [[nodiscard]] constexpr TESBoundObject* GetObjectReference() const noexcept { return data.objectReference; }
394  TESForm* GetOwner() const;
395  [[nodiscard]] constexpr TESObjectCELL* GetParentCell() const noexcept { return parentCell; }
396  [[nodiscard]] constexpr NiPoint3 GetPosition() const noexcept { return data.location; }
397  [[nodiscard]] constexpr float GetPositionX() const noexcept { return data.location.x; }
398  [[nodiscard]] constexpr float GetPositionY() const noexcept { return data.location.y; }
399  [[nodiscard]] constexpr float GetPositionZ() const noexcept { return data.location.z; }
401  std::uint32_t GetStealValue(const InventoryEntryData* a_entryData, std::uint32_t a_numItems, bool a_useMult) const;
402  float GetWeight() const;
405  bool HasCollision() const;
406  bool HasContainer() const;
407  bool HasKeyword(const BGSKeyword* a_keyword) const;
408  bool HasQuestObject() const;
409  void InitChildActivates(TESObjectREFR* a_actionRef);
410  bool InitInventoryIfRequired(bool a_ignoreContainerExtraData = false);
411  bool Is3DLoaded() const;
412  bool IsActivationBlocked() const;
413  bool IsAnOwner(const Actor* a_testOwner, bool a_useFaction, bool a_requiresOwner) const;
415  bool IsDisabled() const;
416  bool IsEnchanted() const;
417  bool IsHorse() const;
418  bool IsInitiallyDisabled() const;
419  bool IsLocked() const;
420  bool IsMarkedForDeletion() const;
421  bool IsOffLimits();
422  bool MoveToNode(TESObjectREFR* a_target, const BSFixedString& a_nodeName);
423  bool MoveToNode(TESObjectREFR* a_target, NiAVObject* a_node);
426  void SetActivationBlocked(bool a_blocked);
427  void SetCollision(bool a_enable);
428  bool SetDisplayName(const BSFixedString& a_name, bool a_force);
429  bool SetMotionType(MotionType a_motionType, bool a_allowActivate = true);
430  void SetPosition(float a_x, float a_y, float a_z);
431  void SetPosition(NiPoint3 a_pos);
432 
433  // members
434  OBJ_REFR data; // 40
438  std::uint64_t unk88; // 88
439  std::uint16_t refScale; // 90
440  std::int8_t modelState; // 92
441  bool preDestroyed; // 93
442  std::uint32_t pad94; // 94
443 
444  private:
445  InventoryChanges* ForceInitInventoryChanges();
446  InventoryChanges* MakeInventoryChanges();
447  void MoveTo_Impl(const ObjectRefHandle& a_targetHandle, TESObjectCELL* a_targetCell, TESWorldSpace* a_selfWorldSpace, const NiPoint3& a_position, const NiPoint3& a_rotation);
448  void PlayAnimation_Impl(NiControllerManager* a_manager, NiControllerSequence* a_toSeq, NiControllerSequence* a_fromSeq, bool a_arg4 = false);
449  };
450 #if !defined(SKYRIMVR) && !defined(SKYRIMSE_PRE_1_6_629)
451  static_assert(sizeof(TESObjectREFR) == 0xA0);
452 #else
453  static_assert(sizeof(TESObjectREFR) == 0x98);
454 #endif
455 };
Definition: ActorCause.h:9
Definition: Actor.h:134
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: BSTSmartPointer.h:37
Definition: DialogueItem.h:21
Definition: ExtraDataList.h:50
Definition: IAnimationGraphManagerHolder.h:14
Definition: InventoryChanges.h:17
Definition: InventoryEntryData.h:14
Definition: MagicCaster.h:14
Definition: MagicTarget.h:22
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:23
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
MotionType
Definition: TESObjectREFR.h:116
LOADED_REF_DATA * loadedData
Definition: TESObjectREFR.h:436
void ClearData() override
virtual bool GetAllowPromoteToPersistent() const
virtual void InitHavok()
virtual BSFaceGenNiNode * GetFaceNode()
bool HasContainer() const
virtual bool IsDead(bool a_notEssential=true) const
const TESBoundObject * GetBaseObject() const
float GetWeight() const
std::uint16_t refScale
Definition: TESObjectREFR.h:439
constexpr float GetPositionX() const noexcept
Definition: TESObjectREFR.h:397
NiPoint3 GetAngle() const
virtual void Unk_9D(void)
virtual void Unk_69(void)
virtual void Update3DPosition(bool a_warp)
virtual BSAnimNoteReceiver * CreateAnimNoteReceiver()
void DoTrap(TrapEntry *a_trap, TargetEntry *a_target)
virtual bool SetDialogueWithPlayer(bool a_flag, bool a_forceGreet, TESTopicInfo *a_topic)
TESForm * CreateDuplicateForm(bool a_createEditorID, void *a_arg2) override
virtual BGSScene * GetCurrentScene() const
TESObjectCELL * parentCell
Definition: TESObjectREFR.h:435
bool IsEnchanted() const
void LoadGame(BGSLoadFormBuffer *a_buf) override
FormType GetSavedFormType() const override
BGSLocation * GetCurrentLocation() const
virtual void PauseCurrentDialogue()
virtual bool CheckAndFixSkinAndBoneOrder(NiNode &a_nodeToTest)
virtual void Predestroy()
void SetOnLocalMap(bool a_set) override
virtual ActorCause * GetActorCause() const
virtual void Unk_78(void)
bool HasKeyword(const BGSKeyword *a_keyword) const
virtual void Unk_9C(void)
bool CheckSaveGame(BGSSaveFormBuffer *a_buf) override
TESWorldSpace * GetWorldspace() const
BGSLocation * GetEditorLocation() const
std::map< TESBoundObject *, Count > InventoryCountMap
Definition: TESObjectREFR.h:111
constexpr float GetPositionY() const noexcept
Definition: TESObjectREFR.h:398
virtual void Unk_A0(void)
virtual bool HasKeywordHelper(const BGSKeyword *a_keyword) const
virtual void Unk_75(void)
virtual Projectile * AsProjectile()
virtual void SetActorCause(ActorCause *a_cause)
float GetAngleZ() const
bool BelongsInGroup(FORM *a_form, bool a_allowParentGroups, bool a_currentOnly) override
virtual void UpdateSoundCallBack(bool a_endSceneAction)
virtual bool ClampToGround()
RE::InventoryEntryData * GetInventoryItemAt(std::int32_t a_index, bool a_isViewingContainer=false) const
virtual void DoTrap2(TrapEntry *a_trap, TargetEntry *a_target)
virtual const BSTSmartPointer< BipedAnim > & GetBiped1(bool a_firstPerson) const
virtual void Unk_8B(void)
REFR_LOCK * GetLock() const
TESContainer * GetContainer() const
bool MoveToNode(TESObjectREFR *a_target, NiAVObject *a_node)
virtual void SetCurrentScene(BGSScene *a_scene)
const char * GetFormEditorID() const override
OBJ_REFR data
Definition: TESObjectREFR.h:434
bool preDestroyed
Definition: TESObjectREFR.h:441
virtual bool IsChild() const
virtual Explosion * AsExplosion()
virtual bool GetFullLODRef() const
bool GetRandomAnim() const override
virtual BSFaceGenNiNode * GetFaceNodeSkinned()
InventoryDropMap GetDroppedInventory()
TESObjectREFR * AsReference1() override
virtual void UnequipItem(std::uint64_t a_arg1, TESBoundObject *a_object)
std::int8_t modelState
Definition: TESObjectREFR.h:440
bool GetAnimationGraphManagerImpl(BSTSmartPointer< BSAnimationGraphManager > &a_out) const override
static TESObjectREFR * FindReferenceFor3D(NiAVObject *a_object3D)
InventoryItemMap GetInventory(std::function< bool(TESBoundObject &)> a_filter)
virtual void SetFullLODRef(bool a_set)
virtual bool ShouldPerformRevert() const
InventoryItemMap GetInventory()
bool IsHeadingMarker() const override
virtual MagicCaster * GetMagicCaster(MagicSystem::CastingSource a_source)
TESBoundObject * GetBaseObject()
virtual void SetBiped(const BSTSmartPointer< BipedAnim > &a_biped)
virtual BGSDialogueBranch * GetExclusiveBranch() const
virtual void UpdateRefLight()
InventoryDropMap GetDroppedInventory(std::function< bool(TESBoundObject &)> a_filter)
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 TESObjectCELL * GetSaveParentCell() const
virtual void DoTrap1(TrapData &a_data)
std::int32_t Count
Definition: TESObjectREFR.h:110
virtual void AddObjectToContainer(TESBoundObject *a_object, ExtraDataList *a_extraList, std::int32_t a_count, TESObjectREFR *a_fromRefr)
bool IsHorse() const
NiAVObject * Get3D(bool a_firstPerson) const
bool IsWater() const override
bool SetupAnimEventSinks(const BSTSmartPointer< BShkbAnimationGraph > &a_animGraph) override
virtual NiPoint3 GetStartingAngle() const
InventoryCountMap GetInventoryCounts()
TESObjectREFR * GetLinkedRef(BGSKeyword *a_keyword)
void SaveGame(BGSSaveFormBuffer *a_buf) override
bool GetMustUpdate() const override
float GetAngleX() const
std::int32_t GetInventoryItemCount(bool a_isViewingContainer=false, bool a_playable=true) const
virtual void UpdateAnimation(float a_delta)
void Revert(BGSLoadFormBuffer *a_buf) override
bool IsCrimeToActivate()
virtual NiAVObject * Get3D1(bool a_firstPerson) const
virtual MagicTarget * GetMagicTarget()
const TESObjectREFR * AsReference2() const override
virtual NiAVObject * Load3D(bool a_backgroundLoading)
void SetActivationBlocked(bool a_blocked)
virtual bool QCanUpdateSync() const
std::uint64_t unk88
Definition: TESObjectREFR.h:438
void InitItemImpl() override
virtual bool GetEditorLocation2(NiPoint3 &a_outPos, NiPoint3 &a_outRot, TESForm *&a_outWorldOrCell, TESObjectCELL *a_fallback)
virtual void Set3D(NiAVObject *a_object, bool a_queue3DTasks=true)
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
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 BSAnimNoteReceiver * GetAnimNoteReceiver()
virtual void Unk_6E(void)
std::map< TESBoundObject *, std::pair< Count, std::unique_ptr< InventoryEntryData > >> InventoryItemMap
Definition: TESObjectREFR.h:112
virtual TESActorBase * GetTemplateActorBase()
std::int32_t GetInventoryCount()
LOCK_LEVEL GetLockLevel() const
virtual void SetStartingPosition(const NiPoint3 &a_pos)
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
virtual BGSDecalGroup * GetDecalGroup() const
void SetDelete(bool a_set) override
virtual void SetExclusiveBranch(BGSDialogueBranch *a_branch)
virtual NiAVObject * Get3D2() const
virtual bool OnAddCellPerformQueueReference(TESObjectCELL &a_cell) const
virtual void ModifyAnimationUpdateData(BSAnimationUpdateData &a_data)
ObjectRefHandle CreateRefHandle()
virtual void Unk_95(void)
virtual void Unk_94(void)
bool HasCollision() const
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)
static NiPointer< TESObjectREFR > LookupByHandle(RefHandle a_refHandle)
bool GetObstacle() const override
virtual void SetParentCell(TESObjectCELL *a_cell)
virtual void Unk_8C(void)
virtual NiPoint3 GetBoundMax() const
virtual void SetObjectReference(TESBoundObject *a_object)
std::uint32_t pad94
Definition: TESObjectREFR.h:442
virtual bool Is3rdPersonVisible() const
float GetBaseHeight() const
virtual NiPoint3 GetStartingLocation() const
void InitializeData() override
NiControllerSequence * GetSequence(stl::zstring a_name) const
virtual NiAVObject * GetCurrent3D() const
const BSTSmartPointer< BipedAnim > & GetBiped() 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 BSFaceGenAnimationData * GetFaceGenAnimationData()
virtual void Unk_82(void)
ObjectRefHandle GetHandle()
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)
bool InitInventoryIfRequired(bool a_ignoreContainerExtraData=false)
constexpr TESObjectCELL * GetParentCell() const noexcept
Definition: TESObjectREFR.h:395
bool IsMarkedForDeletion() const
virtual const BSTSmartPointer< BipedAnim > & GetBiped2() const
bool ConstructAnimationGraph(BSTSmartPointer< BShkbAnimationGraph > &a_out) override
virtual void TryMoveToMiddleLow()
TESForm * GetOwner() const
bool Is3DLoaded() const
virtual bool TryChangeSkyCellActorsProcessLevel()
virtual bool InitNonNPCAnimation(NiNode &a_nodeForAnim)
void SetPosition(NiPoint3 a_pos)
bool IsAnOwner(const Actor *a_testOwner, bool a_useFaction, bool a_requiresOwner) const
virtual TESPackage * CheckForCurrentAliasPackage()
void GetFormDetailedString(char *a_buf, std::uint32_t a_bufLen) override
const char * GetName() const
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
virtual bool ShouldBackgroundClone() const
virtual void Unk_42(void)
constexpr float GetPositionZ() const noexcept
Definition: TESObjectREFR.h:399
static constexpr auto FORMTYPE
Definition: TESObjectREFR.h:108
void CreateGroupData(FORM *a_form, FORM_GROUP *a_group) override
void DoTrap(TrapData &a_data)
InventoryChanges * GetInventoryChanges()
~TESObjectREFR() override
TESNPC * GetActorOwner()
std::optional< double > GetEnchantmentCharge() const
virtual NiPoint3 GetLookingAtLocation() const
virtual BGSAnimationSequencer * GetSequencer() const
virtual const BSTSmartPointer< BipedAnim > & GetCurrentBiped() const
virtual bool ShouldSaveAnimationOnUnloading() const
float GetWeightInContainer()
virtual void Disable()
bool IsActivationBlocked() const
constexpr NiPoint3 GetPosition() const noexcept
Definition: TESObjectREFR.h:396
virtual bool AddWornItem(TESBoundObject *a_item, std::int32_t a_count, bool a_forceEquip, std::uint32_t a_arg4, std::uint32_t a_arg5)
NiAVObject * GetNodeByName(const BSFixedString &a_nodeName)
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)
virtual BGSLocation * GetEditorLocation1() const
bool IsLocked() const
const char * GetDisplayFullName()
bool IsDisabled() const
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
constexpr TESBoundObject * GetObjectReference() const noexcept
Definition: TESObjectREFR.h:393
bool PopulateGraphNodesToTarget(BSScrapArray< NiAVObject * > &a_nodes) override
virtual TESAmmo * GetCurrentAmmo() const
ExtraDataList extraList
Definition: TESObjectREFR.h:437
NiAVObject * Get3D() const
virtual void SetTemplateActorBase(TESActorBase *a_template)
virtual void DoMoveToHigh()
void InitChildActivates(TESObjectREFR *a_actionRef)
void SetPosition(float a_x, float a_y, float a_z)
TESFaction * GetFactionOwner()
const BSTSmartPointer< BipedAnim > & GetBiped(bool a_firstPerson) const
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: TESObjectWEAP.h:73
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
NiSmartPointer(Actor)
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