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