CommonLibSSE NG
Loading...
Searching...
No Matches
CombatMagicCaster.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/C/CombatObject.h"
6
7namespace RE
8{
9 class CombatController;
10 class CombatProjectileAimController;
11 class MagicItem;
12
14 {
15 public:
16 inline static constexpr auto RTTI = RTTI_CombatMagicCaster;
17 inline static constexpr auto VTABLE = VTABLE_CombatMagicCaster;
18
19 ~CombatMagicCaster() override; // 00
20
21 // override (CombatObject)
22 void SaveGame(BGSSaveGameBuffer* a_buf) override; // 03
23 void LoadGame(BGSLoadGameBuffer* a_buf) override; // 04
24
25 // add
27 virtual bool CheckStartCast(CombatController* a_combatController); // 06
28 virtual bool CheckStopCast(CombatController* a_combatController); // 07
29 virtual float CalcCastMagicChance(CombatController* a_combatController) const; // 08
30 virtual float CalcMagicHoldTime(CombatController* a_combatController) const; // 09
31 virtual void* GetMagicTarget(CombatController* a_combatController) const; // 0A
32 virtual void NotifyStartCast(CombatController* a_combatController); // 0B
33 virtual void NotifyStopCast(CombatController* a_combatController); // 0C
34 virtual void SetupAimController(CombatProjectileAimController* a_aimController); // 0D
35
36 bool CheckTargetValid(const CombatController* a_combatController)
37 {
38 using func_t = bool* (*)(CombatMagicCaster*, const CombatController*);
39 REL::Relocation<func_t> func{ RELOCATION_ID(43956, 45348) };
40 return func(this, a_combatController);
41 }
42
43 static bool CheckTargetValid(const CombatController* a_combatController, Actor* a_target, const CombatInventoryItemMagic* a_inventoryItem)
44 {
45 using func_t = bool* (*)(const CombatController*, Actor*, const CombatInventoryItemMagic*);
46 REL::Relocation<func_t> func{ RELOCATION_ID(43952, 45343) };
47 return func(a_combatController, a_target, a_inventoryItem);
48 }
49
50 // members
53 };
54 static_assert(sizeof(CombatMagicCaster) == 0x20);
55}
#define RELOCATION_ID(a_se, a_ae)
Definition PCH.h:794
Definition Actor.h:131
Definition BGSLoadGameBuffer.h:6
Definition CombatController.h:23
CATEGORY
Definition CombatInventoryItem.h:53
Definition CombatInventoryItemMagic.h:12
Definition CombatMagicCaster.h:14
MagicItem * magicItem
Definition CombatMagicCaster.h:52
static constexpr auto VTABLE
Definition CombatMagicCaster.h:17
virtual void NotifyStopCast(CombatController *a_combatController)
~CombatMagicCaster() override
virtual float CalcMagicHoldTime(CombatController *a_combatController) const
void SaveGame(BGSSaveGameBuffer *a_buf) override
NiPointer< CombatInventoryItemMagic > inventoryItem
Definition CombatMagicCaster.h:51
virtual bool CheckStopCast(CombatController *a_combatController)
bool CheckTargetValid(const CombatController *a_combatController)
Definition CombatMagicCaster.h:36
virtual void * GetMagicTarget(CombatController *a_combatController) const
virtual bool CheckStartCast(CombatController *a_combatController)
virtual void SetupAimController(CombatProjectileAimController *a_aimController)
virtual CombatInventoryItem::CATEGORY GetCategory()=0
void LoadGame(BGSLoadGameBuffer *a_buf) override
static constexpr auto RTTI
Definition CombatMagicCaster.h:16
static bool CheckTargetValid(const CombatController *a_combatController, Actor *a_target, const CombatInventoryItemMagic *a_inventoryItem)
Definition CombatMagicCaster.h:43
virtual float CalcCastMagicChance(CombatController *a_combatController) const
virtual void NotifyStartCast(CombatController *a_combatController)
Definition CombatObject.h:11
Definition MagicItem.h:30
Definition NiSmartPointer.h:9
Definition Relocation.h:1638
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_CombatMagicCaster(687618, 395744, 0x1f1dcb8)
constexpr std::array< REL::VariantID, 1 > VTABLE_CombatMagicCaster
Definition Offsets_VTABLE.h:3363