CommonLibSSE NG
PlayerCharacter.h
Go to the documentation of this file.
1 #pragma once
2 
4 #include "RE/B/BSPointerHandle.h"
5 #include "RE/B/BSSoundHandle.h"
6 #include "RE/B/BSTArray.h"
7 #include "RE/B/BSTEvent.h"
8 #include "RE/B/BSTHashMap.h"
9 #include "RE/B/BSTList.h"
10 #include "RE/B/BSTSmartPointer.h"
11 #include "RE/B/BSTTuple.h"
12 #include "RE/C/Character.h"
13 #include "RE/C/Crime.h"
14 #include "RE/F/FormTypes.h"
15 #include "RE/H/hkRefPtr.h"
16 #include "RE/N/NiPoint3.h"
17 #include "RE/N/NiSmartPointer.h"
18 #include "RE/N/NiTMap.h"
20 #include "RE/T/TESObjectWEAP.h"
21 #include "RE/T/TESQuest.h"
22 #include "RE/T/TintMask.h"
23 
24 namespace RE
25 {
26  enum class AQUIRE_TYPE;
27 
28  class Actor;
29  class BGSInstancedQuestObjective;
30  class BGSLocation;
31  class bhkMouseSpringAction;
32  class BipedAnim;
33  class BSFadeNode;
34  class BSLight;
35  class BSTriShape;
36  class CombatGroup;
37  class ImageSpaceModifierInstanceDOF;
38  class InventoryEntryData;
39  class MenuModeChangeEvent;
40  class MenuOpenCloseEvent;
41  class NiAVObject;
42  class NiBillboardNode;
43  class NiNode;
44  class ObjectListItem;
45  class TESObject;
46  class TESObjectREFR;
47  class UserEventEnabledEvent;
48  struct BGSActorCellEvent;
49  struct BGSActorDeathEvent;
50  struct PerkRankData;
51  struct PositionPlayerEvent;
52  struct TESQuestStageItem;
53  struct TESTrackedStatsEvent;
54 
55  enum class PLAYER_ACTION
56  {
57  kNone = 0,
60  kShootBow,
62  kJumping,
70  kShout,
72 
73  kTotal,
75  };
76 
77  struct VR_NODE_DATA
78  {
79 #define VR_NODE_DATA_CONTENT \
80  NiPointer<NiNode> PlayerWorldNode; /* 3F0 */ \
81  NiPointer<NiNode> FollowNode; /* 3F8 */ \
82  NiPointer<NiNode> FollowOffset; /* 400 */ \
83  NiPointer<NiNode> HeightOffsetNode; /* 408 */ \
84  NiPointer<NiNode> SnapWalkOffsetNode; /* 410 */ \
85  NiPointer<NiNode> RoomNode; /* 418 */ \
86  NiPointer<NiNode> BlackSphere; /* 420 */ \
87  NiPointer<NiNode> uiNode; /* 428 */ \
88  NiPointer<BSTriShape> InWorldUIQuadGeo; /* 430 */ \
89  NiPointer<NiNode> UIPointerNode; /* 438 */ \
90  NiPointer<BSTriShape> UIPointerGeo; /* 440 */ \
91  NiPointer<NiNode> DialogueUINode; /* 448 */ \
92  NiPointer<NiNode> TeleportDestinationPreview; /* 450 */ \
93  NiPointer<NiNode> TeleportDestinationFail; /* 458 */ \
94  NiPointer<NiNode> TeleportSprintPreview; /* 460 */ \
95  NiPointer<NiNode> SpellOrigin; /* 468 */ \
96  NiPointer<NiNode> SpellDestination; /* 470 */ \
97  NiPointer<NiNode> ArrowOrigin; /* 478 */ \
98  NiPointer<NiNode> ArrowDestination; /* 480 */ \
99  NiPointer<NiNode> QuestMarker; /* 488 */ \
100  NiPointer<NiNode> LeftWandNode; /* 490 */ \
101  NiPointer<NiNode> LeftWandShakeNode; /* 498 */ \
102  NiPointer<NiNode> LeftValveIndexControllerNode; /* 4A0 */ \
103  NiPointer<NiNode> unkNode4A8; /* 4A8 */ \
104  NiPointer<NiNode> LeftWeaponOffsetNode; /* 4B0 */ \
105  NiPointer<NiNode> LeftCrossbowOffsetNode; /* 4B8 */ \
106  NiPointer<NiNode> LeftMeleeWeaponOffsetNode; /* 4C0 */ \
107  NiPointer<NiNode> LeftStaffWeaponOffsetNode; /* 4C8 */ \
108  NiPointer<NiNode> LeftShieldOffsetNode; /* 4D0 */ \
109  NiPointer<NiNode> RightShieldOffsetNode; /* 4D8 */ \
110  NiPointer<NiNode> SecondaryMagicOffsetNode; /* 4E0 */ \
111  NiPointer<NiNode> SecondaryMagicAimNode; /* 4E8 */ \
112  NiPointer<NiNode> SecondaryStaffMagicOffsetNode; /* 4F0 */ \
113  NiPointer<NiNode> RightWandNode; /* 4F8 */ \
114  NiPointer<NiNode> RightWandShakeNode; /* 500 */ \
115  NiPointer<NiNode> RightValveIndexControllerNode; /* 508 */ \
116  NiPointer<NiNode> unkNode510; /* 510 */ \
117  NiPointer<NiNode> RightWeaponOffsetNode; /* 518 */ \
118  NiPointer<NiNode> RightCrossbowOffsetNode; /* 520 */ \
119  NiPointer<NiNode> RightMeleeWeaponOffsetNode; /* 528 */ \
120  NiPointer<NiNode> RightStaffWeaponOffsetNode; /* 530 */ \
121  NiPointer<NiNode> PrimaryMagicOffsetNode; /* 538 */ \
122  NiPointer<NiNode> PrimaryMagicAimNode; /* 540 */ \
123  NiPointer<NiNode> PrimaryStaffMagicOffsetNode; /* 548 */ \
124  std::uint64_t unk550; /* 550 */ \
125  NiPointer<NiBillboardNode> CrosshairParent; /* 558 */ \
126  NiPointer<NiBillboardNode> CrosshairSecondaryParent; /* 560 */ \
127  NiPointer<NiBillboardNode> TargetLockParent; /* 568 */ \
128  NiPointer<NiNode> unkNode570; /* 570 */ \
129  NiPointer<NiNode> LastSyncPos; /* 578 */ \
130  NiPointer<NiNode> UprightHmdNode; /* 580 */ \
131  NiPointer<NiNode> MapMarkers3D; /* 588 */ \
132  NiPointer<NiNode> NPCLHnd; /* 590 */ \
133  NiPointer<NiNode> NPCRHnd; /* 598 */ \
134  NiPointer<NiNode> NPCLClv; /* 5A0 */ \
135  NiPointer<NiNode> NPCRClv; /* 5A8 */ \
136  std::uint32_t unk5B0; /* 5B0 */ \
137  std::uint32_t unk5B4; /* 5B4 */ \
138  std::uint64_t unk5B8; /* 5B8 */ \
139  std::uint64_t unk5C0; /* 5C0 */ \
140  NiPointer<NiNode> BowAimNode; /* 5C8 */ \
141  NiPointer<NiNode> BowRotationNode; /* 5D0 */ \
142  NiPointer<NiNode> ArrowSnapNode; /* 5D8 */ \
143  NiPointer<BSFadeNode> ArrowNode; /* 5E0 */ \
144  NiPointer<BSFadeNode> ArrowFireNode; /* 5E8 */ \
145  std::uint64_t unk5F0; /* 5F0 */ \
146  NiPointer<NiNode> ArrowHoldOffsetNode; /* 5F8 */ \
147  NiPointer<NiNode> ArrowHoldNode; /* 600 */ \
148  std::uint64_t unk608; /* 608 */ \
149  float unkFloat610; /* 610 */ \
150  std::uint32_t unk614; /* 614 */ \
151  std::uint64_t unk618; /* 618 */ \
152  std::uint64_t unk620; /* 620 */ \
153  std::uint64_t unk628; /* 628 */ \
154  std::uint64_t unk630; /* 630 */ \
155  void* QuestMarkerBillBoardsNodeArray; /* 638 TODO - Make into proper data structure */ \
156  void* TeleportNodeArray; /* 640 TODO - Make into proper data structure */ \
157  void* QuestMarkerBillBoardsNodeArray2; /* 648 TODO - Make into proper data structure -> points to same place as QuestMarkerBillBoardsNodeArray */ \
158  std::uint64_t unk650; /* 650 */ \
159  void* TeleportNodeArray2; /* 658 TODO - Make into proper data structure -> points to same place as TeleportNodeArray */ \
160  void* QuestMarkerBillBoardsNodeArray3; /* 660 TODO - Make into proper data structure -> points to same place as QuestMarkerBillBoardsNodeArray */ \
161  std::uint64_t unk668; /* 668 */ \
162  float unkFloat670; /* 670 */ \
163  std::uint32_t unk674; /* 674 */ \
164  void* TeleportNodeArray3; /* 678 TODO - Make into proper data structure */
165 
167  };
168 
170  {
171  public:
172  // members
173  float violentCur; // 00
174  float nonViolentCur; // 04
175  float nonViolentInfamy; // 08
176  float violentInfamy; // 0C
177  };
178  static_assert(sizeof(CrimeGoldStruct) == 0x10);
179 
181  {
182  public:
183  // members
184  std::int32_t unwitnessed; // 0
185  std::int32_t witnessed; // 4
186  };
187  static_assert(sizeof(StolenItemValueStruct) == 0x8);
188 
190  {
191  public:
192  // members
193  std::uint16_t friendCounts[4]; // 0
194  };
195  static_assert(sizeof(FriendshipFactionsStruct) == 0x8);
196 
198  {
199  public:
200  using ArrivalFunc_t = void(std::int64_t);
201 
202  // members
208  std::int64_t arrivalFuncData; // 30
211  bool resetWeather; // 40
212  bool allowAutoSave; // 41
213  bool isValid; // 42
214  std::uint8_t pad43; // 43
215  std::uint32_t pad44; // 44
216  };
217  static_assert(sizeof(PLAYER_TARGET_LOC) == 0x48);
218 
220  {
221  public:
222  // members
223  float timer; // 0
226  };
227  static_assert(sizeof(PlayerActionObject) == 0xC);
228 
230 #ifndef ENABLE_SKYRIM_AE
231  public Character, // 000
232  public BSTEventSource<BGSActorCellEvent>, // 2D0
233  public BSTEventSource<BGSActorDeathEvent>, // 328
234  public BSTEventSource<PositionPlayerEvent>, // 380
235  public BSTEventSink<MenuOpenCloseEvent>, // 2B0
236  public BSTEventSink<MenuModeChangeEvent>, // 2B8
237  public BSTEventSink<UserEventEnabledEvent>, // 2C0
238  public BSTEventSink<TESTrackedStatsEvent> // 2C8
239 #else
240  public Character // 000
241 #endif
242  {
243  public:
244  inline static constexpr auto RTTI = RTTI_PlayerCharacter;
245  inline static constexpr auto VTABLE = VTABLE_PlayerCharacter;
246  inline static constexpr auto FORMTYPE = FormType::ActorCharacter;
247 
248  enum class EventType
249  {
250  kThief = 3,
251  kContainer = 5,
252  kDeadBody = 6
253  };
254 
255  enum class GrabbingType
256  {
257  kNone = 0,
258  kNormal,
259  kTelekinesis,
260  };
261 
262  enum class ByCharGenFlag
263  {
264  kNone = 0,
265  kDisableSaving = 1 << 0,
266  kHandsBound = 1 << 2
267  };
268 
269  struct PlayerFlags
270  {
271  // members
272  bool travelUseDoor: 1; // 0:0 - Guess from FO4 given matching logic for Character::WarpFollowers
273  bool fastTraveling: 1; // 0:1 - Set and cleared in the same fast travel function
274  bool overAutoAimTarget: 1; // 0:2 - Crosshair over hostile actor AND equipped WEAPON_TYPE bow, staff, or crossbow, must have weapon out to be accurate
275  bool showQuestItems: 1; // 0:3 - Not used by game, confirmed with console command `SetShowQuestItems`
276  bool unk0_4: 1; // 0:4 - Unused?
277  bool hasQueuedEquipAnim: 1; // 0:5 - Set true in `OnItemEquipped` if a_playAnim && isPaused, false once out of menu
278  bool escaping: 1; // 0:6 - Is Escaping from jail
279  bool forceQuestTargetRepath: 1; // 0:7 - Updates quest target in compass
280  bool unk1_0: 1; // 1:0
281  bool unk1_1: 1; // 1:1
282  bool sleeping: 1; // 1:2
283  bool unk1_3: 1; // 1:3
284  bool unk1_4: 1; // 1:4
285  bool unk1_5: 1; // 1:5
286  bool greetingPlayer: 1; // 1:6 - NPC greeting player
287  bool unk1_7: 1; // 1:7
288  bool unk2_0: 1; // 2:0
289  bool aiControlledToPos: 1; // 2:1 - Guess from FO4, confirmed aiControlled related
290  bool aiControlledFromPos: 1; // 2:2 - Guess from FO4, confirmed aiControlled related
291  bool aiControlledPackage: 1; // 2:3 - Guess from FO4, confirmed aiControlled related
292  bool returnToLastKnownGoodPosition: 1; // 2:4 - return to lastKnownGoodPosition on next Update
293  bool isBeingChased: 1; // 2:5 - unused along with chaseTimer
294  bool unk2_6: 1; // 2:6
295  bool unk2_7: 1; // 2:7
296  bool isInThirdPersonMode: 1; // 3:0
297  bool unk3_1: 1; // 3:1
298  bool unk3_2: 1; // 3:2
299  bool unk3_3: 1; // 3:3
300  bool target3DDistant: 1; // 3:4 - Distance from object in crosshair > 1000
301  bool isInCombat: 1; // 3:5
302  bool attemptedYieldInCurrentCombat: 1; // 3:6 - Set when yielding to guard for arrest dialogue, prevents multiple arrest dialogues
303  bool unk3_7: 1; // 3:7
304  bool isLoading: 1; // 4:0 - Is player loading a new area
305  bool shouldUpdateCrosshair: 1; // 4:1 - If forced off without letting Skyrim update this, crosshair UI won't update,
306  bool unk4_2: 1; // 4:2
307  bool healthTutorialShown: 1; // 4:3
308  bool magickaTutorialShown: 1; // 4:4
309  bool staminaTutorialShown: 1; // 4:5
310  bool goToJailQueued: 1; // 4:6 - Briefly set
311  bool unk4_7: 1; // 4:7
312  bool isSprinting: 1; // 5:0
313  bool isSungazing: 1; // 5:1 - Is staring at the sun
314  bool dragonRideTargetLocked: 1; // 5:2
315  bool everModded: 1; // 5:3
316  bool servingJailTime: 1; // 5:4 - Briefly set
317  bool pad5_5: 3; // 5:5
318  std::uint16_t pad6; // 6
319  };
320  static_assert(sizeof(PlayerFlags) == 0x8);
321 
323  {
324  public:
325  // members
328  };
329  static_assert(sizeof(QueuedWeapon) == 0x10);
330 
331  struct TeleportPath // TODO: Should not be in Player class. Gets used in Pathing and other non-player areas
332  {
333  public:
334  struct Unk00Data
335  {
336  public:
337  // members
338  bool unk00; // 00 - Determines whether to use worldspace or cell?
339  char pad01[7]; // 01
342  };
343  static_assert(sizeof(Unk00Data) == 0x18);
344 
345  struct Unk18Data
346  {
347  public:
348  // members
350  std::uint64_t unk08; // 08
351  std::uint64_t unk10; // 10
352  };
353  static_assert(sizeof(Unk18Data) == 0x18);
354 
355  // members
358  std::uint64_t unk30; // 30
359  std::uint64_t unk38; // 38
360  std::uint64_t unk40; // 40
361  };
362  static_assert(sizeof(TeleportPath) == 0x48);
363 
365  {
366  public:
367  // members
372  };
373  static_assert(sizeof(PreTransformationData) == 0x40);
374 
375  struct CrimeValue
376  {
377 #define CRIME_VALUE_CONTENT \
378  BSTHashMap<const TESFaction*, CrimeGoldStruct> crimeGoldMap; /* 00 */ \
379  BSTHashMap<const TESFaction*, StolenItemValueStruct> stolenItemValueMap; /* 30 */
380 
382  };
383  static_assert(sizeof(CrimeValue) == 0x60);
384 
385  struct RaceData
386  {
387 #define RACE_DATA_CONTENT \
388  BGSTextureSet* complexion; /* 00 */ \
389  TESRace* charGenRace; /* 08 */ \
390  TESRace* race2; /* 10 */
391 
393  };
394  static_assert(sizeof(RaceData) == 0x18);
395 
397  {
398 #define GAME_STATE_DATA_CONTENT \
399  std::int32_t difficulty; /* 0 */ \
400  ActorHandle assumedIdentity; /* 4 */ \
401  std::int8_t murder; /* 8 */ \
402  std::int8_t perkCount; /* 9 */ \
403  stl::enumeration<ByCharGenFlag, std::uint8_t> byCharGenFlag; /* A */ \
404  std::uint8_t padB; /* B */
405 
407  };
408  static_assert(sizeof(GameStateData) == 0xC);
409 
411  {
412  public:
413  struct Data
414  {
415  public:
416  struct Skills
417  {
418  enum Skill : std::uint32_t
419  {
422  kArchery = 2,
423  kBlock = 3,
429  kSneak = 9,
430  kAlchemy = 10,
431  kSpeech = 11,
435  kIllusion = 15,
438  kTotal
439  };
440  };
442 
443  struct SkillData
444  {
445  public:
446  // members
447  float level; // 0
448  float xp; // 4
449  float levelThreshold; // 8
450  };
451  static_assert(sizeof(SkillData) == 0xC);
452 
453  // members
454  float xp; // 000
455  float levelThreshold; // 004
456  SkillData skills[Skill::kTotal]; // 008
457  std::uint32_t legendaryLevels[Skill::kTotal]; // 0E0
458  };
459  static_assert(sizeof(Data) == 0x128);
460 
461  void AdvanceLevel(bool a_addThreshold);
462 
463  // members
464  Data* data; // 0
465  };
466  static_assert(sizeof(PlayerSkills) == 0x8);
467 
469  {
470 #define INFO_RUNTIME_DATA_CONTENT \
471  float grabDistance; /* 000 */ \
472  float unk004; /* 004 */ \
473  std::uint64_t unk008; /* 008 */ \
474  std::uint32_t unk010; /* 010 */ \
475  std::uint32_t sleepSeconds; /* 014 */ \
476  BSTSmartPointer<BipedAnim> largeBiped; /* 018 */ \
477  NiPointer<NiNode> firstPerson3D; /* 020 */ \
478  float eyeHeight; /* 028 */ \
479  float greetTimer; /* 02C */ \
480  float encumberedTimer; /* 030 */ \
481  float powerAttackTimer; /* 034 */ \
482  std::int32_t hoursToSleep; /* 038 */ \
483  std::int32_t amountStolenSold; /* 03C */ \
484  std::uint32_t valueStolen; /* 040 */ \
485  ActorHandle lastRiddenMount; /* 044 */ \
486  ActorHandle lightTarget; /* 048 */ \
487  float sortActorDistanceTimer; /* 04C */ \
488  float sitHeadingDelta; /* 050 */ \
489  ObjectRefHandle playerMapMarker; /* 054 */ \
490  TeleportPath* playerMarkerPath; /* 058 */ \
491  std::uint32_t skillTrainingsThisLevel; /* 060 */ \
492  std::uint32_t unk064; /* 064 */ \
493  TESClass* defaultClass; /* 068 */ \
494  std::uint64_t unk070; /* 070 */ \
495  std::uint32_t crimeCounts[PackageNS::CRIME_TYPES::kTotal]; /* 078 */ \
496  std::uint32_t unk094; /* 094 */ \
497  AlchemyItem* pendingPoison; /* 098 */ \
498  std::int64_t lastPlayingTimeUpdate; /* 0A0 */ \
499  std::int64_t totalPlayingTime; /* 0A8 */ \
500  std::int32_t characterSeed; /* 0B0 */ \
501  std::uint32_t unk0B4; /* 0B4 */ \
502  TESForm* lastKnownGoodLocation; /* 0B8 */ \
503  std::uint32_t unk0C0; /* 0C0 */ \
504  std::uint32_t unk0C4; /* 0C4 */ \
505  NiPointer<BSLight> firstPersonLight; /* 0C8 */ \
506  NiPointer<BSLight> thirdPersonLight; /* 0D0 */ \
507  float dropAngleMod; /* 0D8 */ \
508  float lastDropAngleMod; /* 0DC */ \
509  PlayerSkills* skills; /* 0E0 */ \
510  ActorHandle autoAimActor; /* 0E8 */ \
511  RefHandle unk0EC; /* 0EC */ \
512  std::uint64_t unk118; /* 0F0 */ \
513  NiPointer<NiAVObject> targeted3D; /* 0F8 */ \
514  CombatGroup* combatGroup; /* 100 */ \
515  BSTArray<ActorHandle> actorsToDisplayOnTheHUDArray; /* 108 */ \
516  TESForm* advanceObject; /* 120 */ \
517  TESBoundObject* lastOneHandItems[2]; /* 128 */ \
518  std::uint32_t teammateCount; /* 138 */ \
519  float combatTimer; /* 13C */ \
520  float yieldTimer; /* 140 */ \
521  float chaseTimer; /* 144 */ \
522  float drawSheatheSafetyTimer; /* 148 */ \
523  std::uint32_t unk14C; /* 14C */
524 
526  };
527  static_assert(sizeof(INFO_RUNTIME_DATA) == 0x150);
528 
529  ~PlayerCharacter() override; // 000
530 
531  // override
532  void RemoveWeapon(BIPED_OBJECT equipIndex) override; // 082
533 
534  // add
535  SKYRIM_REL_VR_VIRTUAL void Unk_12A(void); // 12A
536  [[nodiscard]] SKYRIM_REL_VR_VIRTUAL std::uint32_t GetViolentCrimeGoldValue(const TESFaction* a_faction) const; // 12B
537  [[nodiscard]] SKYRIM_REL_VR_VIRTUAL std::uint32_t GetNonViolentCrimeGoldValue(const TESFaction* a_faction) const; // 12C
539  SKYRIM_REL_VR_VIRTUAL void Unk_12E(void); // 12E - { return 0; }
540 
542  static bool IsGodMode();
543 
545  void AddPlayerAddItemEvent(TESObject* a_object, TESForm* a_owner, TESObjectREFR* a_container, AQUIRE_TYPE a_type);
546  void AddSkillExperience(ActorValue a_skill, float a_experience);
547  bool AttemptPickpocket(TESObjectREFR* a_containerRef, InventoryEntryData* a_entry, std::int32_t a_number, bool a_fromContainer = true);
548  bool CenterOnCell(const char* a_cellName);
550  bool CheckCast(MagicItem* a_spell, Effect* a_effect, MagicSystem::CannotCastReason& a_reason);
552 #ifndef ENABLE_SKYRIM_VR
554 #endif
556  [[nodiscard]] float GetArmorValue(InventoryEntryData* a_form);
557  [[nodiscard]] float GetDamage(InventoryEntryData* a_form);
559  [[nodiscard]] std::int32_t GetItemCount(TESBoundObject* a_object);
560  [[nodiscard]] std::uint32_t GetNumTints(std::uint32_t a_tintType);
561  [[nodiscard]] TintMask* GetOverlayTintMask(TintMask* a_original);
563  [[nodiscard]] TintMask* GetTintMask(std::uint32_t a_tintType, std::uint32_t a_index);
564  [[nodiscard]] bool HasActorDoingCommand() const;
565  [[nodiscard]] bool IsGrabbing() const;
567  void PlayPickupEvent(TESForm* a_item, TESForm* a_containerOwner, TESObjectREFR* a_containerRef, EventType a_eventType);
568  void SetAIDriven(bool a_enable);
569  void SetEscaping(bool a_flag, bool a_escaped);
572 
574  return &REL::RelocateMemberIfNewer<BSTEventSource<BGSActorCellEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2D0, 0x2D8);
575  }
576 
577  [[nodiscard]] inline const BSTEventSource<BGSActorCellEvent>* AsBGSActorCellEventSource() const noexcept {
578  return &REL::RelocateMemberIfNewer<BSTEventSource<BGSActorCellEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2D0, 0x2D8);
579  }
580 
582  return &REL::RelocateMemberIfNewer<BSTEventSource<BGSActorDeathEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x328, 0x330);
583  }
584 
585  [[nodiscard]] inline const BSTEventSource<BGSActorDeathEvent>* AsBGSActorDeathEventSource() const noexcept {
586  return &REL::RelocateMemberIfNewer<BSTEventSource<BGSActorDeathEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2D0, 0x330);
587  }
588 
590  return &REL::RelocateMemberIfNewer<BSTEventSource<PositionPlayerEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x380, 0x388);
591  }
592 
593  [[nodiscard]] inline const BSTEventSource<PositionPlayerEvent>* AsPositionPlayerEventSource() const noexcept {
594  return &REL::RelocateMemberIfNewer<BSTEventSource<PositionPlayerEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x380, 0x388);
595  }
596 
598  return &REL::RelocateMemberIfNewer<BSTEventSink<MenuOpenCloseEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2B0, 0x2B8);
599  }
600 
601  [[nodiscard]] inline const BSTEventSink<MenuOpenCloseEvent>* AsMenuOpenCloseEventSink() const noexcept {
602  return &REL::RelocateMemberIfNewer<BSTEventSink<MenuOpenCloseEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2B0, 0x2B8);
603  }
604 
606  return &REL::RelocateMemberIfNewer<BSTEventSink<MenuModeChangeEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2B8, 0x2C0);
607  }
608 
609  [[nodiscard]] inline const BSTEventSink<MenuModeChangeEvent>* AsMenuModeChangeEventSink() const noexcept {
610  return &REL::RelocateMemberIfNewer<BSTEventSink<MenuModeChangeEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2B8, 0x2C0);
611  }
612 
614  return &REL::RelocateMemberIfNewer<BSTEventSink<UserEventEnabledEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2C0, 0x2C8);
615  }
616 
617  [[nodiscard]] inline const BSTEventSink<UserEventEnabledEvent>* AsUserEventEnabledEventSink() const noexcept {
618  return &REL::RelocateMemberIfNewer<BSTEventSink<UserEventEnabledEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2C0, 0x2C8);
619  }
620 
622  return &REL::RelocateMemberIfNewer<BSTEventSink<TESTrackedStatsEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2C8, 0x2D0);
623  }
624 
625  [[nodiscard]] inline const BSTEventSink<TESTrackedStatsEvent>* AsTESTrackedStatsEventSink() const noexcept {
626  return &REL::RelocateMemberIfNewer<BSTEventSink<TESTrackedStatsEvent>>(SKSE::RUNTIME_SSE_1_6_629, this, 0x2C8, 0x2D0);
627  }
628 
630  {
631 #ifndef ENABLE_SKYRIM_VR // Non-VR
632 #define PLAYER_RUNTIME_DATA_CONTENT \
633  mutable BSSpinLock questTargetsLock; /* 3D8, 3E0 */ \
634  CRIME_VALUE_CONTENT; /* 3E0 */ \
635  ObjectRefHandle commandWaitMarker; /* 440 */ \
636  std::uint32_t pad444; /* 444 */ \
637  BSTHashMap<const TESFaction*, FriendshipFactionsStruct> factionOwnerFriendsMap; /* 448 */ \
638  NiPoint3 lastKnownGoodPosition; /* 478 */ \
639  NiPoint3 bulletAutoAim; /* 484 */ \
640  NiPoint3 cachedVelocity; /* 490 */ \
641  float pad49C; /* 49C */ \
642  BGSNote* unusedNote; /* 4A0 */ \
643  BGSNote* unusedNote2; /* 4A8 */ \
644  BSTArray<PerkRankData*> addedPerks; /* 4B0 */ \
645  BSTArray<BGSPerk*> perks; /* 4C8 */ \
646  BSTArray<BGSPerk*> standingStonePerks; /* 4E0 */ \
647  BSTArray<ObjectRefHandle> currentMapMarkers; /* 4F8 */ \
648  BSTArray<BSTTuple<NiPoint3, AITimeStamp>> velocityArray; /* 510 */ \
649  BSTArray<ProjectileHandle> runesCast; /* 528 */ \
650  BSTArray<void*> imageSpaceModifierAnims1; /* 540 */ \
651  BSTArray<void*> imageSpaceModifierAnims2; /* 558 */ \
652  BSSimpleList<TESQuestStageItem*> questLog; /* 570 */ \
653  BSTArray<BGSInstancedQuestObjective> objectives; /* 580 */ \
654  BSTHashMap<TESQuest*, BSTArray<TESQuestTarget*>*> questTargets; /* 598 */ \
655  BSTHashMap<UnkKey, UnkValue> currentSayOnceInfosMap; /* 5C8 */ \
656  BSSimpleList<ObjectRefHandle> droppedRefList; /* 5F8 */ \
657  NiTMap<std::uint32_t, std::uint8_t> randomDoorSpaceMap; /* 608 */ \
658  TESWorldSpace* cachedWorldSpace; /* 628 */ \
659  NiPoint3 exteriorPosition; /* 630 */ \
660  std::uint32_t pad63C; /* 63C */ \
661  PLAYER_TARGET_LOC queuedTargetLoc; /* 640 */ \
662  BSSoundHandle unusedSound; /* 688 */ \
663  BSSoundHandle magicFailureSound; /* 694 */ \
664  BSSoundHandle shoutFailureSound; /* 6A0 */ \
665  std::uint32_t pad6AC; /* 6AC */ \
666  DialoguePackage* closestConversation; /* 6B0 */ \
667  std::uint32_t unk6B8; /* 6B8 */ \
668  std::uint32_t unk6BC; /* 6BC */ \
669  DialoguePackage* aiConversationRunning; /* 6C0 */ \
670  std::int32_t numberofStealWarnings; /* 6C8 */ \
671  float stealWarningTimer; /* 6CC */ \
672  std::int32_t numberofPickpocketWarnings; /* 6D0 */ \
673  float pickPocketWarningTimer; /* 6D4 */ \
674  AITimeStamp warnToLeaveTimeStamp; /* 6D8 */ \
675  std::uint32_t pad6DC; /* 6DC */ \
676  ImageSpaceModifierInstanceDOF* ironsightsDOFInstance; /* 6E0 */ \
677  ImageSpaceModifierInstanceDOF* vatsDOFInstance; /* 6E8 */ \
678  ImageSpaceModifierInstanceDOF* dynamicDOFInstance; /* 6F0 */ \
679  float dynamicDOFFocusTime; /* 6F8 */ \
680  bool dynamicDOFFocused; /* 6FC */ \
681  std::uint8_t unk6FD; /* 6FD */ \
682  std::uint16_t unk6FE; /* 6FE */ \
683  NiPoint3 dynamicDOFLastAngle; /* 700 */ \
684  NiPoint3 dynamicDOFLastPosition; /* 70C */ \
685  TESFaction* currentPrisonFaction; /* 718 */ \
686  std::int32_t jailSentence; /* 720 */ \
687  std::uint32_t pad724; /* 724 */ \
688  void* unk728; /* 728 - smart ptr */ \
689  QueuedWeapon queuedWeaponAttachs[WEAPON_TYPE::kTotal]; /* 730 */ \
690  std::int32_t vampireFeedDetection; /* 7D0 */ \
691  std::uint32_t mapMarkerIterator; /* 7D4 */ \
692  RefHandle forceActivateRef; /* 7D8 */ \
693  PlayerActionObject playerActionObjects[15]; /* 7DC */ \
694  PLAYER_ACTION mostRecentAction; /* 890 */ \
695  ActorHandle actorDoingPlayerCommand; /* 894 */ \
696  BSTSmallArray<hkRefPtr<bhkMouseSpringAction>, 4> grabSpring; /* 898 */ \
697  ObjectRefHandle grabbedObject; /* 8C8 */ \
698  float grabObjectWeight; /* 8CC */ \
699  INFO_RUNTIME_DATA_CONTENT; /* 8D0 */ \
700  std::uint8_t unkA20[0xA0]; /* A20 */ \
701  std::uint32_t unkAC0; /* AC0 */ \
702  std::uint32_t unkAC4; /* AC4 */ \
703  BGSLocation* currentLocation; /* AC8 */ \
704  AITimeStamp cachedVelocityTimeStamp; /* AD0 */ \
705  float telekinesisDistance; /* AD4 */ \
706  float commandTimer; /* AD8 */ \
707  float sunGazeTimer; /* ADC */ \
708  TESImageSpaceModifier* sunGazeImageModifierSpace; /* AE0 */ \
709  ActorValue advanceSkill; /* AE8 */ \
710  std::uint32_t advanceAction; /* AEC */ \
711  stl::enumeration<DEFAULT_OBJECT, std::int32_t> animationObjectAction; /* AF0 */ \
712  stl::enumeration<GrabbingType, std::uint32_t> grabType; /* AF4 */ \
713  GAME_STATE_DATA_CONTENT; /* AF8 */ \
714  std::uint32_t unkB04; /* B04 */ \
715  Crime* resistArrestCrime; /* B08 */ \
716  BSTArray<TintMask*> tintMasks; /* B10 */ \
717  BSTArray<TintMask*>* overlayTintMasks; /* B28 */ \
718  RACE_DATA_CONTENT; /* B30 */ \
719  std::int32_t unkB48; /* B48 */ \
720  std::uint32_t padB4C; /* B4C */ \
721  BSTArray<std::uint64_t> unkB50; /* B50 */ \
722  std::uint64_t unkB68; /* B68 */ \
723  std::uint64_t unkB70; /* B70 */ \
724  std::uint64_t unkB78; /* B78 */ \
725  std::uint64_t unkB80; /* B80 */ \
726  std::int32_t unkB88; /* B88 */ \
727  std::uint32_t padB8C; /* B8C */ \
728  std::uint64_t unkB90; /* B90 */ \
729  TESBoundObject* unkB98; /* B98 */ \
730  BSTSmallArray<void*, 4> unkBA0; /* BA0 */ \
731  PreTransformationData* preTransformationData; /* BD0 */ \
732  PlayerFlags playerFlags; /* BD8 */
733 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE) // VR
734 #define PLAYER_RUNTIME_DATA_CONTENT \
735  std::uint64_t unk3D8; /* 3D8 */ \
736  std::uint64_t unk3E0; /* 3E0 */ \
737  std::uint64_t unk3E8; /* 3E8 */ \
738  VR_NODE_DATA_CONTENT; /* 3F0 */ \
739  std::uint64_t unk680; /* 680 */ \
740  std::uint64_t unk688; /* 688 */ \
741  std::uint64_t unk690; /* 690 */ \
742  std::uint64_t unk698; /* 698 */ \
743  std::uint64_t unk6A0; /* 6A0 */ \
744  std::uint64_t unk6A8[0x65]; /* 6A8 */ \
745  CRIME_VALUE_CONTENT; /* 9D0 */ \
746  std::uint64_t unkA30[0x11]; /* A30 */ \
747  void* perkArray; /* AB8 */ \
748  std::uint64_t unk6C0[0x14]; /* AC0 */ \
749  /*BSTArray<PerkRankData*> addedPerks; // B60 */ \
750  /*BSTArray<BGSPerk*> perks; // B68 */ \
751  /*BSTArray<BGSPerk*> standingStonePerks; // B70 */ \
752  std::uint64_t addedPerks; /* B60 - these 3 here gotta be fixed */ \
753  std::uint64_t perks; /* B68 */ \
754  std::uint64_t standingStonePerks; /* B70 */ \
755  std::uint64_t unkB78; /* B78 */ \
756  std::uint64_t unkB80; /* B80 */ \
757  std::uint64_t unkMessageArrayPtr; /* B88 */ \
758  std::uint64_t unkB90; /* B90 */ \
759  std::uint64_t unkB98; /* B98 */ \
760  std::uint64_t unkBA0; /* BA0 */ \
761  std::uint64_t unkBA8; /* BA8 */ \
762  std::uint64_t unkBB0[0x25]; /* BB0 */ \
763  std::uint64_t imageSpaceModifierAnims1; /* CD8 - Wrong Datatype from Below */ \
764  std::uint64_t imageSpaceModifierAnims2; /* CE0 - Wrong Datatype from below */ \
765  std::uint64_t unkCE8[0x34]; /* CE8 */ \
766  std::uint32_t padE90; /* E88 */ \
767  ActorHandle actorDoingPlayerCommand; /* E8C */ \
768  std::uint64_t unkE90; /* E90 */ \
769  std::uint64_t unkE98[0x27]; /* E98 */ \
770  /* BSTSmallArray<hkRefPtr<bhkMouseSpringAction>, 4> grabSpring; // F00 // not used in vr as far as i can tell F08?????? */ \
771  INFO_RUNTIME_DATA_CONTENT; /* FD0 */ \
772  std::uint64_t unk1120[0x1A]; /* 1120 */ \
773  std::uint32_t unk11F0; /* 11F0 */ \
774  GAME_STATE_DATA_CONTENT; /* 11F4 */ \
775  std::uint64_t unk1200; /* 1200 */ \
776  std::uint64_t unk1208; /* 1208 */ \
777  std::uint64_t unk1210; /* 1210 */ \
778  std::uint64_t unk1218; /* 1218 */ \
779  std::uint64_t unk1220; /* 1220 */ \
780  RACE_DATA_CONTENT; /* 1228 */ \
781  std::uint64_t unk1240[0x12]; /* 1240 */ \
782  std::uint8_t pad12D0; /* 12D0 */ \
783  std::uint8_t flags; /* 12D1 -- TODO MAP THESE FLAGS OUT */ \
784  std::uint16_t pad12D2; /* 12D2 */ \
785  std::uint32_t unk12D4; /* 12D4 */
786 #else
787 #define PLAYER_RUNTIME_DATA_CONTENT
788 #endif
789 
791  };
792 
793  [[nodiscard]] inline PLAYER_RUNTIME_DATA& GetPlayerRuntimeData() noexcept
794  {
795  return REL::RelocateMemberIfNewer<PLAYER_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x3D8, 0x3E0);
796  }
797 
798  [[nodiscard]] inline const PLAYER_RUNTIME_DATA& GetPlayerRuntimeData() const noexcept
799  {
800  return REL::RelocateMemberIfNewer<PLAYER_RUNTIME_DATA>(SKSE::RUNTIME_SSE_1_6_629, this, 0x3D8, 0x3E0);
801  }
802 
803  [[nodiscard]] inline CrimeValue& GetCrimeValue() noexcept
804  {
806  if (REL::Module::get().version().compare(SKSE::RUNTIME_SSE_1_6_629) != std::strong_ordering::less) {
807  return REL::RelocateMember<CrimeValue>(this, 0x3E8);
808  }
809  }
810  return REL::RelocateMember<CrimeValue>(this, 0x3E0, 0x9D0);
811  }
812 
813  [[nodiscard]] inline const CrimeValue& GetCrimeValue() const noexcept
814  {
816  if (REL::Module::get().version().compare(SKSE::RUNTIME_SSE_1_6_629) != std::strong_ordering::less) {
817  return REL::RelocateMember<CrimeValue>(this, 0x3E8);
818  }
819  }
820  return REL::RelocateMember<CrimeValue>(this, 0x3E0, 0x9D0);
821  }
822 
823  [[nodiscard]] inline RaceData& GetRaceData() noexcept
824  {
826  if (REL::Module::get().version().compare(SKSE::RUNTIME_SSE_1_6_629) != std::strong_ordering::less) {
827  return REL::RelocateMember<RaceData>(this, 0xB38);
828  }
829  }
830  return REL::RelocateMember<RaceData>(this, 0xB30, 0x1228);
831  }
832 
833  [[nodiscard]] inline const RaceData& GetRaceData() const noexcept
834  {
836  if (REL::Module::get().version().compare(SKSE::RUNTIME_SSE_1_6_629) != std::strong_ordering::less) {
837  return REL::RelocateMember<RaceData>(this, 0xB38);
838  }
839  }
840  return REL::RelocateMember<RaceData>(this, 0xB30, 0x1228);
841  }
842 
843  [[nodiscard]] inline GameStateData& GetGameStatsData() noexcept
844  {
846  if (REL::Module::get().version().compare(SKSE::RUNTIME_SSE_1_6_629) != std::strong_ordering::less) {
847  return REL::RelocateMember<GameStateData>(this, 0xB00);
848  }
849  }
850  return REL::RelocateMember<GameStateData>(this, 0xAF8, 0x11F4);
851  }
852 
853  [[nodiscard]] inline const GameStateData& GetGameStatsData() const noexcept
854  {
856  if (REL::Module::get().version().compare(SKSE::RUNTIME_SSE_1_6_629) != std::strong_ordering::less) {
857  return REL::RelocateMember<GameStateData>(this, 0xB00);
858  }
859  }
860  return REL::RelocateMember<GameStateData>(this, 0xAF8, 0x11F4);
861  }
862 
863  [[nodiscard]] inline INFO_RUNTIME_DATA& GetInfoRuntimeData() noexcept
864  {
866  if (REL::Module::get().version().compare(SKSE::RUNTIME_SSE_1_6_629) != std::strong_ordering::less) {
867  return REL::RelocateMember<INFO_RUNTIME_DATA>(this, 0x8D8);
868  }
869  }
870  return REL::RelocateMember<INFO_RUNTIME_DATA>(this, 0x8D0, 0xFD0);
871  }
872 
873  [[nodiscard]] inline const INFO_RUNTIME_DATA& GetInfoRuntimeData() const noexcept
874  {
876  if (REL::Module::get().version().compare(SKSE::RUNTIME_SSE_1_6_629) != std::strong_ordering::less) {
877  return REL::RelocateMember<INFO_RUNTIME_DATA>(this, 0x8D8);
878  }
879  }
880  return REL::RelocateMember<INFO_RUNTIME_DATA>(this, 0x8D0, 0xFD0);
881  }
882 
883  [[nodiscard]] VR_NODE_DATA* GetVRNodeData() noexcept
884  {
886  return nullptr;
887  } else {
888  return &REL::RelocateMember<VR_NODE_DATA>(this, 0, 0x3F0);
889  }
890  }
891 
892  [[nodiscard]] const VR_NODE_DATA* GetVRNodeData() const noexcept
893  {
895  return nullptr;
896  } else {
897  return &REL::RelocateMember<VR_NODE_DATA>(this, 0, 0x3F0);
898  }
899  }
900 
901  // members
902 #if (!defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)) || (!defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_VR))
904 #endif
905 
906  private:
907  bool CenterOnCell_Impl(const char* a_cellName, RE::TESObjectCELL* a_cell);
908  };
909 #if !defined(ENABLE_SKYRIM_VR) && !defined(ENABLE_SKYRIM_AE)
910  static_assert(sizeof(PlayerCharacter) == 0xBE0);
911 #elif !defined(ENABLE_SKYRIM_AE) && !defined(ENABLE_SKYRIM_SE)
912  static_assert(sizeof(PlayerCharacter) == 0x12D8);
913 #endif
914 }
915 #undef PLAYER_RUNTIME_DATA_CONTENT
916 #undef VR_NODE_DATA_CONTENT
917 #undef INFO_RUNTIME_DATA_CONTENT
918 #undef GAME_STATE_DATA_CONTENT
919 #undef RACE_DATA_CONTENT
#define SKYRIM_REL_VR_CONSTEXPR
Definition: Common.h:85
#define SKYRIM_REL_VR_VIRTUAL
Definition: Common.h:94
#define SKYRIM_REL_CONSTEXPR
Definition: Common.h:47
#define CRIME_VALUE_CONTENT
Definition: PlayerCharacter.h:377
#define PLAYER_RUNTIME_DATA_CONTENT
Definition: PlayerCharacter.h:632
#define RACE_DATA_CONTENT
Definition: PlayerCharacter.h:387
#define VR_NODE_DATA_CONTENT
Definition: PlayerCharacter.h:79
#define GAME_STATE_DATA_CONTENT
Definition: PlayerCharacter.h:398
#define INFO_RUNTIME_DATA_CONTENT
Definition: PlayerCharacter.h:470
static SKYRIM_REL_VR bool IsVR() noexcept
Definition: Module.h:254
static Module & get()
Definition: Module.h:82
static SKYRIM_REL bool IsAE() noexcept
Definition: Module.h:238
Definition: BSTArray.h:377
Definition: BSTEvent.h:143
Definition: BSTEvent.h:19
Definition: Character.h:8
Definition: InventoryEntryData.h:15
Definition: MagicItem.h:30
Definition: NiPoint3.h:6
Definition: NiSmartPointer.h:9
Definition: PlayerCharacter.h:198
std::uint32_t pad44
Definition: PlayerCharacter.h:215
NiPoint3 angle
Definition: PlayerCharacter.h:206
TESObjectCELL * interior
Definition: PlayerCharacter.h:204
NiPoint3 location
Definition: PlayerCharacter.h:205
bool resetWeather
Definition: PlayerCharacter.h:211
bool isValid
Definition: PlayerCharacter.h:213
bool allowAutoSave
Definition: PlayerCharacter.h:212
RefHandle fastTravelMarker
Definition: PlayerCharacter.h:210
std::int64_t arrivalFuncData
Definition: PlayerCharacter.h:208
void(std::int64_t) ArrivalFunc_t
Definition: PlayerCharacter.h:200
TESWorldSpace * world
Definition: PlayerCharacter.h:203
RefHandle furnitureRef
Definition: PlayerCharacter.h:209
ArrivalFunc_t * arrivalFunc
Definition: PlayerCharacter.h:207
std::uint8_t pad43
Definition: PlayerCharacter.h:214
Definition: PlayerCharacter.h:242
static bool IsGodMode()
static PlayerCharacter * GetSingleton()
RaceData & GetRaceData() noexcept
Definition: PlayerCharacter.h:823
SKYRIM_REL_VR_VIRTUAL void Unk_12E(void)
const VR_NODE_DATA * GetVRNodeData() const noexcept
Definition: PlayerCharacter.h:892
ByCharGenFlag
Definition: PlayerCharacter.h:263
static constexpr auto RTTI
Definition: PlayerCharacter.h:244
VR_NODE_DATA * GetVRNodeData() noexcept
Definition: PlayerCharacter.h:883
PLAYER_RUNTIME_DATA & GetPlayerRuntimeData() noexcept
Definition: PlayerCharacter.h:793
bool CenterOnCell(const char *a_cellName)
BSTEventSink< MenuModeChangeEvent > * AsMenuModeChangeEventSink() noexcept
Definition: PlayerCharacter.h:605
std::uint32_t GetNumTints(std::uint32_t a_tintType)
void AddPlayerAddItemEvent(TESObject *a_object, TESForm *a_owner, TESObjectREFR *a_container, AQUIRE_TYPE a_type)
const BSTEventSink< MenuOpenCloseEvent > * AsMenuOpenCloseEventSink() const noexcept
Definition: PlayerCharacter.h:601
SKYRIM_REL_VR_VIRTUAL std::uint32_t GetNonViolentCrimeGoldValue(const TESFaction *a_faction) const
NiPointer< Actor > GetActorDoingPlayerCommand() const
TintMask * GetTintMask(std::uint32_t a_tintType, std::uint32_t a_index)
bool AttemptPickpocket(TESObjectREFR *a_containerRef, InventoryEntryData *a_entry, std::int32_t a_number, bool a_fromContainer=true)
NiPointer< TESObjectREFR > GetGrabbedRef()
const BSTEventSource< BGSActorCellEvent > * AsBGSActorCellEventSource() const noexcept
Definition: PlayerCharacter.h:577
GameStateData & GetGameStatsData() noexcept
Definition: PlayerCharacter.h:843
CrimeValue & GetCrimeValue() noexcept
Definition: PlayerCharacter.h:803
void RemoveWeapon(BIPED_OBJECT equipIndex) override
const GameStateData & GetGameStatsData() const noexcept
Definition: PlayerCharacter.h:853
BSTEventSink< MenuOpenCloseEvent > * AsMenuOpenCloseEventSink() noexcept
Definition: PlayerCharacter.h:597
const BSTEventSink< MenuModeChangeEvent > * AsMenuModeChangeEventSink() const noexcept
Definition: PlayerCharacter.h:609
BSTEventSink< UserEventEnabledEvent > * AsUserEventEnabledEventSink() noexcept
Definition: PlayerCharacter.h:613
void SetAIDriven(bool a_enable)
BSTEventSource< PositionPlayerEvent > * AsPositionPlayerEventSource() noexcept
Definition: PlayerCharacter.h:589
bool CenterOnCell(TESObjectCELL *a_cell)
BSTEventSource< BGSActorDeathEvent > * AsBGSActorDeathEventSource() noexcept
Definition: PlayerCharacter.h:581
const BSTEventSource< PositionPlayerEvent > * AsPositionPlayerEventSource() const noexcept
Definition: PlayerCharacter.h:593
SKYRIM_REL_VR_VIRTUAL std::uint32_t GetViolentCrimeGoldValue(const TESFaction *a_faction) const
BSTEventSource< BGSActorCellEvent > * AsBGSActorCellEventSource() noexcept
Definition: PlayerCharacter.h:573
bool HasActorDoingCommand() const
const BSTEventSource< BGSActorDeathEvent > * AsBGSActorDeathEventSource() const noexcept
Definition: PlayerCharacter.h:585
BSTArray< TintMask * > * GetTintList()
BSTEventSink< TESTrackedStatsEvent > * AsTESTrackedStatsEventSink() noexcept
Definition: PlayerCharacter.h:621
float GetDamage(InventoryEntryData *a_form)
~PlayerCharacter() override
const BSTEventSink< UserEventEnabledEvent > * AsUserEventEnabledEventSink() const noexcept
Definition: PlayerCharacter.h:617
void PlayPickupEvent(TESForm *a_item, TESForm *a_containerOwner, TESObjectREFR *a_containerRef, EventType a_eventType)
void SetEscaping(bool a_flag, bool a_escaped)
void AddSkillExperience(ActorValue a_skill, float a_experience)
INFO_RUNTIME_DATA & GetInfoRuntimeData() noexcept
Definition: PlayerCharacter.h:863
float GetArmorValue(InventoryEntryData *a_form)
GrabbingType
Definition: PlayerCharacter.h:256
const RaceData & GetRaceData() const noexcept
Definition: PlayerCharacter.h:833
static constexpr auto VTABLE
Definition: PlayerCharacter.h:245
SKYRIM_REL_VR_VIRTUAL void Unk_12A(void)
bool IsGrabbing() const
void PlayMagicFailureSound(MagicSystem::SpellType a_spellType)
const CrimeValue & GetCrimeValue() const noexcept
Definition: PlayerCharacter.h:813
const BSTEventSink< TESTrackedStatsEvent > * AsTESTrackedStatsEventSink() const noexcept
Definition: PlayerCharacter.h:625
const INFO_RUNTIME_DATA & GetInfoRuntimeData() const noexcept
Definition: PlayerCharacter.h:873
bool CheckCast(MagicItem *a_spell, Effect *a_effect, MagicSystem::CannotCastReason &a_reason)
static constexpr auto FORMTYPE
Definition: PlayerCharacter.h:246
EventType
Definition: PlayerCharacter.h:249
const PLAYER_RUNTIME_DATA & GetPlayerRuntimeData() const noexcept
Definition: PlayerCharacter.h:798
TintMask * GetOverlayTintMask(TintMask *a_original)
std::int32_t GetItemCount(TESBoundObject *a_object)
SKYRIM_REL_VR_VIRTUAL void ClearAllCrimeGold(TESFaction *a_faction)
Definition: TESBoundObject.h:24
Definition: TESFaction.h:120
Definition: TESForm.h:36
Definition: TESObjectCELL.h:116
Definition: TESObjectREFR.h:113
Definition: TESObjectWEAP.h:79
Definition: TESObject.h:11
Definition: TESRace.h:146
Definition: TESWorldSpace.h:118
Definition: TintMask.h:9
SpellType
Definition: MagicSystem.h:61
CannotCastReason
Definition: MagicSystem.h:10
Definition: AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 17 > VTABLE_PlayerCharacter
Definition: Offsets_VTABLE.h:2231
constexpr REL::VariantID RTTI_PlayerCharacter(686898, 394747, 0x1f07958)
ActorValue
Definition: ActorValues.h:6
PLAYER_ACTION
Definition: PlayerCharacter.h:56
AQUIRE_TYPE
Definition: BGSAddToPlayerInventoryEvent.h:11
std::uint32_t RefHandle
Definition: BSCoreTypes.h:6
constexpr REL::Version RUNTIME_SSE_1_6_629(1, 6, 629, 0)
BIPED_OBJECT
Definition: BipedObjects.h:8
Definition: PlayerCharacter.h:170
float nonViolentCur
Definition: PlayerCharacter.h:174
float violentInfamy
Definition: PlayerCharacter.h:176
float nonViolentInfamy
Definition: PlayerCharacter.h:175
float violentCur
Definition: PlayerCharacter.h:173
Definition: Effect.h:11
Definition: PlayerCharacter.h:190
std::uint16_t friendCounts[4]
Definition: PlayerCharacter.h:193
Definition: PlayerCharacter.h:220
RefHandle refObj
Definition: PlayerCharacter.h:224
float timer
Definition: PlayerCharacter.h:223
stl::enumeration< PLAYER_ACTION, std::uint32_t > next
Definition: PlayerCharacter.h:225
Definition: PlayerCharacter.h:376
Definition: PlayerCharacter.h:397
Definition: PlayerCharacter.h:469
Definition: PlayerCharacter.h:630
Definition: PlayerCharacter.h:270
bool everModded
Definition: PlayerCharacter.h:315
bool goToJailQueued
Definition: PlayerCharacter.h:310
bool unk1_4
Definition: PlayerCharacter.h:284
bool unk3_3
Definition: PlayerCharacter.h:299
bool unk2_0
Definition: PlayerCharacter.h:288
std::uint16_t pad6
Definition: PlayerCharacter.h:318
bool isSungazing
Definition: PlayerCharacter.h:313
bool travelUseDoor
Definition: PlayerCharacter.h:272
bool aiControlledFromPos
Definition: PlayerCharacter.h:290
bool aiControlledPackage
Definition: PlayerCharacter.h:291
bool unk1_0
Definition: PlayerCharacter.h:280
bool unk4_7
Definition: PlayerCharacter.h:311
bool unk1_1
Definition: PlayerCharacter.h:281
bool aiControlledToPos
Definition: PlayerCharacter.h:289
bool unk3_2
Definition: PlayerCharacter.h:298
bool unk0_4
Definition: PlayerCharacter.h:276
bool pad5_5
Definition: PlayerCharacter.h:317
bool unk1_3
Definition: PlayerCharacter.h:283
bool magickaTutorialShown
Definition: PlayerCharacter.h:308
bool escaping
Definition: PlayerCharacter.h:278
bool unk2_7
Definition: PlayerCharacter.h:295
bool isInThirdPersonMode
Definition: PlayerCharacter.h:296
bool unk4_2
Definition: PlayerCharacter.h:306
bool attemptedYieldInCurrentCombat
Definition: PlayerCharacter.h:302
bool greetingPlayer
Definition: PlayerCharacter.h:286
bool target3DDistant
Definition: PlayerCharacter.h:300
bool returnToLastKnownGoodPosition
Definition: PlayerCharacter.h:292
bool unk2_6
Definition: PlayerCharacter.h:294
bool shouldUpdateCrosshair
Definition: PlayerCharacter.h:305
bool unk3_1
Definition: PlayerCharacter.h:297
bool healthTutorialShown
Definition: PlayerCharacter.h:307
bool forceQuestTargetRepath
Definition: PlayerCharacter.h:279
bool fastTraveling
Definition: PlayerCharacter.h:273
bool unk1_5
Definition: PlayerCharacter.h:285
bool sleeping
Definition: PlayerCharacter.h:282
bool overAutoAimTarget
Definition: PlayerCharacter.h:274
bool isInCombat
Definition: PlayerCharacter.h:301
bool showQuestItems
Definition: PlayerCharacter.h:275
bool servingJailTime
Definition: PlayerCharacter.h:316
bool isLoading
Definition: PlayerCharacter.h:304
bool isSprinting
Definition: PlayerCharacter.h:312
bool unk3_7
Definition: PlayerCharacter.h:303
bool unk1_7
Definition: PlayerCharacter.h:287
bool hasQueuedEquipAnim
Definition: PlayerCharacter.h:277
bool isBeingChased
Definition: PlayerCharacter.h:293
bool dragonRideTargetLocked
Definition: PlayerCharacter.h:314
bool staminaTutorialShown
Definition: PlayerCharacter.h:309
float level
Definition: PlayerCharacter.h:447
float levelThreshold
Definition: PlayerCharacter.h:449
float xp
Definition: PlayerCharacter.h:448
Definition: PlayerCharacter.h:417
Skill
Definition: PlayerCharacter.h:419
@ kIllusion
Definition: PlayerCharacter.h:435
@ kAlchemy
Definition: PlayerCharacter.h:430
@ kSneak
Definition: PlayerCharacter.h:429
@ kEnchanting
Definition: PlayerCharacter.h:437
@ kLightArmor
Definition: PlayerCharacter.h:426
@ kArchery
Definition: PlayerCharacter.h:422
@ kSmithing
Definition: PlayerCharacter.h:424
@ kDestruction
Definition: PlayerCharacter.h:434
@ kPickpocket
Definition: PlayerCharacter.h:427
@ kLockpicking
Definition: PlayerCharacter.h:428
@ kTwoHanded
Definition: PlayerCharacter.h:421
@ kOneHanded
Definition: PlayerCharacter.h:420
@ kRestoration
Definition: PlayerCharacter.h:436
@ kConjuration
Definition: PlayerCharacter.h:433
@ kTotal
Definition: PlayerCharacter.h:438
@ kAlteration
Definition: PlayerCharacter.h:432
@ kBlock
Definition: PlayerCharacter.h:423
@ kSpeech
Definition: PlayerCharacter.h:431
@ kHeavyArmor
Definition: PlayerCharacter.h:425
Definition: PlayerCharacter.h:414
SkillData skills[Skill::kTotal]
Definition: PlayerCharacter.h:456
float xp
Definition: PlayerCharacter.h:451
float levelThreshold
Definition: PlayerCharacter.h:455
std::uint32_t legendaryLevels[Skill::kTotal]
Definition: PlayerCharacter.h:457
Definition: PlayerCharacter.h:411
Data * data
Definition: PlayerCharacter.h:464
void AdvanceLevel(bool a_addThreshold)
Definition: PlayerCharacter.h:365
TESBoundObject * storedLastOneHandItems[2]
Definition: PlayerCharacter.h:371
MagicItem * storedSelectedSpells[4]
Definition: PlayerCharacter.h:368
TESRace * storedRace
Definition: PlayerCharacter.h:369
TESForm * storedSelectedPower
Definition: PlayerCharacter.h:370
Definition: PlayerCharacter.h:323
TESObjectWEAP * rightHandWeapon
Definition: PlayerCharacter.h:326
TESObjectWEAP * leftHandWeapon
Definition: PlayerCharacter.h:327
Definition: PlayerCharacter.h:386
Definition: PlayerCharacter.h:335
TESWorldSpace * worldspace
Definition: PlayerCharacter.h:340
char pad01[7]
Definition: PlayerCharacter.h:339
bool unk00
Definition: PlayerCharacter.h:338
TESObjectCELL * interiorCell
Definition: PlayerCharacter.h:341
Definition: PlayerCharacter.h:346
std::uint64_t unk10
Definition: PlayerCharacter.h:351
std::uint64_t unk08
Definition: PlayerCharacter.h:350
RE::TESObjectREFR * unk00
Definition: PlayerCharacter.h:349
Definition: PlayerCharacter.h:332
BSTArray< Unk00Data > unk00
Definition: PlayerCharacter.h:353
std::uint64_t unk38
Definition: PlayerCharacter.h:359
BSTArray< Unk18Data > unk18
Definition: PlayerCharacter.h:357
std::uint64_t unk30
Definition: PlayerCharacter.h:358
std::uint64_t unk40
Definition: PlayerCharacter.h:360
Definition: PlayerCharacter.h:181
std::int32_t unwitnessed
Definition: PlayerCharacter.h:184
std::int32_t witnessed
Definition: PlayerCharacter.h:185
Definition: PlayerCharacter.h:78