Spellforce-Spell-framework
Loading...
Searching...
No Matches
src
internal
core
hooks
sf_subeffect_hook.c
Go to the documentation of this file.
1
9
#include "
../../registry/spell_data_registries/sf_subeffect_registry.h
"
10
#include "
../sf_wrappers.h
"
11
#include "
../sf_hooks.h
"
12
13
#include "
sf_subeffect_hook.h
"
14
15
void
__thiscall
sf_subeffect_hook
(
SF_CGDEffect
*_this, uint16_t effect_id)
16
{
17
uint16_t spell_id =
effectAPI
.
getEffectXData
(_this, effect_id,
18
EFFECT_SUBSPELL_ID
);
19
if
(spell_id)
20
{
21
SF_CGdResourceSpell
spell_data;
22
spellAPI
.
getResourceSpellData
(_this->
SF_CGdResource
, &spell_data,
23
spell_id);
24
sub_effect_handler_ptr
handler =
25
get_sub_effect_handler
(spell_data.
spell_line_id
);
26
if
(handler != NULL)
27
{
28
handler(_this, effect_id);
29
}
30
}
31
}
32
spellAPI
SpellFunctions * spellAPI
Definition
TestMod.cpp:11
effectAPI
EffectFunctions effectAPI
Definition
sf_hooks.c:37
sf_subeffect_hook
void __thiscall sf_subeffect_hook(SF_CGDEffect *_this, uint16_t effect_id)
Definition
sf_subeffect_hook.c:15
sub_effect_handler_ptr
void(__thiscall * sub_effect_handler_ptr)(SF_CGDEffect *, uint16_t effect_index)
Definition
sf_effect_functions.h:4
EFFECT_SUBSPELL_ID
@ EFFECT_SUBSPELL_ID
Definition
sf_general_structures.h:848
sf_hooks.h
sf_subeffect_hook.h
get_sub_effect_handler
sub_effect_handler_ptr get_sub_effect_handler(uint16_t spell_line)
Definition
sf_subeffect_registry.cpp:29
sf_subeffect_registry.h
sf_wrappers.h
EffectFunctions::getEffectXData
getEffectXData_ptr getEffectXData
Definition
sf_effect_functions.h:26
SF_CGDEffect
Definition
sf_general_structures.h:558
SF_CGDEffect::SF_CGdResource
void * SF_CGdResource
Definition
sf_general_structures.h:567
SF_CGdResourceSpell
Definition
sf_spell_functions.h:253
SF_CGdResourceSpell::spell_line_id
uint16_t spell_line_id
Definition
sf_spell_functions.h:255
SpellFunctions::getResourceSpellData
getResourceSpellData_ptr getResourceSpellData
Definition
sf_spell_functions.h:393
Generated by
1.12.0