CommonLibVR
Loading...
Searching...
No Matches
BGSEntryPoint.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace RE
6{
7 class Actor;
8
10 {
12 {
13 enum ENTRY_POINT : std::uint32_t
14 {
107
108 kTotal
109 };
110 };
112
114 {
115 public:
116 const char* name; // 00
117 bool nonActor; // 08
118 std::uint8_t pad09; // 09
119 std::uint16_t pad0A; // 0A
120 std::uint32_t pad0C; // 0C
121 };
122 static_assert(sizeof(EntryPointParameter) == 0x10);
123
125 {
126 public:
127 std::uint32_t count; // 00
128 std::uint32_t pad04; // 04
130 };
131 static_assert(sizeof(EntryPointParameters) == 0x10);
132
134 {
135 public:
136 const char* name; // 00
139 std::uint32_t pad1C; // 1C
140 };
141 static_assert(sizeof(EntryPoint) == 0x20);
142
144 {
145 if (a_entryPoint < ENTRY_POINT::kTotal) {
146 static REL::Relocation<EntryPoint*> entryPoints{ RELOCATION_ID(675707, 368994) }; //TODO: Verify SSE ID against VR
147 return &entryPoints.get()[a_entryPoint];
148 }
149
150 return nullptr;
151 }
152
153 template <class... Args>
154 static void HandleEntryPoint(ENTRY_POINT a_entryPoint, Actor* a_perkOwner, Args... a_args)
155 {
156 using func_t = decltype(&BGSEntryPoint::HandleEntryPoint<Args...>);
157 static REL::Relocation<func_t> func{ RELOCATION_ID(23073, 23526) };
158 func(a_entryPoint, a_perkOwner, a_args...);
159 }
160 };
161}
#define RELOCATION_ID(SE, AE)
Definition PCH.h:506
Definition Relocation.h:210
value_type get() const noexcept(std::is_nothrow_copy_constructible_v< value_type >)
Definition Relocation.h:278
Definition Actor.h:133
Definition AbsorbEffect.h:6
ENTRY_POINT_FUNCTION_TYPE
Definition BGSEntryPointFunction.h:38
Definition BGSEntryPoint.h:12
ENTRY_POINT
Definition BGSEntryPoint.h:14
@ kModLockpickSweetSpot
Definition BGSEntryPoint.h:74
@ kModPotionsCreated
Definition BGSEntryPoint.h:104
@ kShouldApplyPlacedItem
Definition BGSEntryPoint.h:99
@ kModSecondaryValueWeight
Definition BGSEntryPoint.h:46
@ kAddLeveledListOnDeath
Definition BGSEntryPoint.h:24
@ kApplyBashingSpell
Definition BGSEntryPoint.h:67
@ kIgnoreRunningDuringDetection
Definition BGSEntryPoint.h:30
@ kModTargetDamageResistance
Definition BGSEntryPoint.h:52
@ kModAttackDamage
Definition BGSEntryPoint.h:50
@ kModPickpocketChance
Definition BGSEntryPoint.h:71
@ kCanDualCastSpell
Definition BGSEntryPoint.h:90
@ kCalculateMyCriticalHitDamage
Definition BGSEntryPoint.h:17
@ kModSpellCastingSoundEvent
Definition BGSEntryPoint.h:70
@ kSetProgressionPicking
Definition BGSEntryPoint.h:79
@ kModSneakAttackMult
Definition BGSEntryPoint.h:33
@ kModCommandedActorLimit
Definition BGSEntryPoint.h:83
@ kTotal
Definition BGSEntryPoint.h:108
@ kCalculateMineExplodeChance
Definition BGSEntryPoint.h:18
@ kGetShouldAttack
Definition BGSEntryPoint.h:22
@ kModLockpickingKeyRewardChance
Definition BGSEntryPoint.h:105
@ kModRecoverArrowChance
Definition BGSEntryPoint.h:36
@ kModBowZoom
Definition BGSEntryPoint.h:35
@ kModSpellDuration
Definition BGSEntryPoint.h:45
@ kModTelekinesisDamage
Definition BGSEntryPoint.h:40
@ kModEnemyCriticalHitChance
Definition BGSEntryPoint.h:32
@ kModIncomingStagger
Definition BGSEntryPoint.h:48
@ kModFallingDamage
Definition BGSEntryPoint.h:73
@ kModSpellMagnitude
Definition BGSEntryPoint.h:44
@ kModPlayerReputation
Definition BGSEntryPoint.h:59
@ kApplyWeaponSwingSpell
Definition BGSEntryPoint.h:82
@ kModAddictionDuration
Definition BGSEntryPoint.h:27
@ kModMaxPlaceableMines
Definition BGSEntryPoint.h:34
@ kApplyReanimateSpell
Definition BGSEntryPoint.h:68
@ kModLockpickingCrimeChance
Definition BGSEntryPoint.h:101
@ kSetBooleanGraphVariable
Definition BGSEntryPoint.h:69
@ kApplyCombatHitSpell
Definition BGSEntryPoint.h:66
@ kGetMaxCarryWeight
Definition BGSEntryPoint.h:25
@ kModPoisonDoseCount
Definition BGSEntryPoint.h:98
@ kModShoutOK
Definition BGSEntryPoint.h:97
@ kAdjustBookSkillPoints
Definition BGSEntryPoint.h:20
@ kModAddictionChance
Definition BGSEntryPoint.h:26
@ kModSpellRange_TargetLoc
Definition BGSEntryPoint.h:103
@ kIgnoreBrokenLock
Definition BGSEntryPoint.h:31
@ kModFavorPoints
Definition BGSEntryPoint.h:60
@ kModSpellCost
Definition BGSEntryPoint.h:53
@ kModArmorWeight
Definition BGSEntryPoint.h:47
@ kModSoulGemEnchanting
Definition BGSEntryPoint.h:94
@ kModBashingDamage
Definition BGSEntryPoint.h:41
@ kModIngredientsHarvested
Definition BGSEntryPoint.h:102
@ kModIncomingDamage
Definition BGSEntryPoint.h:51
@ kCanPickpocketEquippedItem
Definition BGSEntryPoint.h:76
@ kModPowerAttackDamage
Definition BGSEntryPoint.h:43
@ kModBuyPrices
Definition BGSEntryPoint.h:23
@ kFilterActivation
Definition BGSEntryPoint.h:89
@ kApplySneakingSpell
Definition BGSEntryPoint.h:84
@ kModDetectionMovement
Definition BGSEntryPoint.h:63
@ kModAlchemyEffectiveness
Definition BGSEntryPoint.h:81
@ kModIncomingSpellDuration
Definition BGSEntryPoint.h:57
@ kModShieldDeflectArrowChance
Definition BGSEntryPoint.h:55
@ kModTargetStagger
Definition BGSEntryPoint.h:49
@ kModBribeAmount
Definition BGSEntryPoint.h:61
@ kModInitialIngredientEffectsLearned
Definition BGSEntryPoint.h:87
@ kModSoulGemRecharge
Definition BGSEntryPoint.h:64
@ kModDetectionSneakSkill
Definition BGSEntryPoint.h:72
@ kModTemperingHealth
Definition BGSEntryPoint.h:91
@ kPurifyAlchemyIngredients
Definition BGSEntryPoint.h:88
@ kAllowMountActor
Definition BGSEntryPoint.h:106
@ kActivate
Definition BGSEntryPoint.h:29
@ kSetLockpickStartingArc
Definition BGSEntryPoint.h:78
@ kModSellPrices
Definition BGSEntryPoint.h:75
@ kModPositiveChemDuration
Definition BGSEntryPoint.h:28
@ kSetActivateLabel
Definition BGSEntryPoint.h:96
@ kModDetectionLight
Definition BGSEntryPoint.h:62
@ kModPercentBlocked
Definition BGSEntryPoint.h:54
@ kCalculateMyCriticalHitChance
Definition BGSEntryPoint.h:16
@ kModPlayerMagicSlowdown
Definition BGSEntryPoint.h:85
@ kModEnchantmentPower
Definition BGSEntryPoint.h:92
@ kModIncomingSpellMagnitude
Definition BGSEntryPoint.h:56
@ kModNumberAppliedEnchantmentsAllowed
Definition BGSEntryPoint.h:95
@ kModWardMagickaAbsorptionPct
Definition BGSEntryPoint.h:86
@ kAdjustLimbDamage
Definition BGSEntryPoint.h:19
@ kSetSweepAttack
Definition BGSEntryPoint.h:65
@ kCalculateWeaponDamage
Definition BGSEntryPoint.h:15
@ kModPlayerIntimidation
Definition BGSEntryPoint.h:58
@ kMakeLockpicksUnbreakable
Definition BGSEntryPoint.h:80
@ kModSoulPctCapturedToWeapon
Definition BGSEntryPoint.h:93
@ kModSkillUse
Definition BGSEntryPoint.h:37
@ kModTelekinesisDamageMult
Definition BGSEntryPoint.h:39
@ kModLockpickLevelAllowed
Definition BGSEntryPoint.h:77
@ kModTelekinesisDistance
Definition BGSEntryPoint.h:38
@ kModRecoveredHealth
Definition BGSEntryPoint.h:21
@ kModPowerAttackStamina
Definition BGSEntryPoint.h:42
@ kModArmorRating
Definition BGSEntryPoint.h:100
Definition BGSEntryPoint.h:114
std::uint8_t pad09
Definition BGSEntryPoint.h:118
bool nonActor
Definition BGSEntryPoint.h:117
std::uint32_t pad0C
Definition BGSEntryPoint.h:120
const char * name
Definition BGSEntryPoint.h:116
std::uint16_t pad0A
Definition BGSEntryPoint.h:119
Definition BGSEntryPoint.h:125
std::uint32_t pad04
Definition BGSEntryPoint.h:128
EntryPointParameter * data
Definition BGSEntryPoint.h:129
std::uint32_t count
Definition BGSEntryPoint.h:127
Definition BGSEntryPoint.h:134
const char * name
Definition BGSEntryPoint.h:136
EntryPointParameters parameters
Definition BGSEntryPoint.h:137
std::uint32_t pad1C
Definition BGSEntryPoint.h:139
BGSEntryPointFunction::ENTRY_POINT_FUNCTION_TYPE functionType
Definition BGSEntryPoint.h:138
Definition BGSEntryPoint.h:10
static void HandleEntryPoint(ENTRY_POINT a_entryPoint, Actor *a_perkOwner, Args... a_args)
Definition BGSEntryPoint.h:154
static EntryPoint * GetEntryPoint(ENTRY_POINT a_entryPoint)
Definition BGSEntryPoint.h:143