Spellforce-Spell-framework
Loading...
Searching...
No Matches
src
internal
core
hooks
sf_endspell_hook.c
Go to the documentation of this file.
1
7
#include "
../sf_wrappers.h
"
8
#include "
../sf_hooks.h
"
9
#include "
../../registry/spell_data_registries/sf_spellend_registry.h
"
10
11
#include <stdint.h>
12
#include <stdlib.h>
13
#include <stdio.h>
14
#include <string.h>
15
16
#include "
sf_endspell_hook.h
"
17
18
22
void
__thiscall
sf_endspell_hook
(
SF_CGdSpell
*_this, uint16_t spell_index)
23
{
24
// We need a map of end spell handlers?
25
// And a default handler that does nothing
26
// handler takes (SF_CGdSpell *_this, uint16_t spell_index) as params
27
uint16_t spell_line = _this->
active_spell_list
[spell_index].
spell_line
;
28
handler_ptr
spellend_handler =
get_spell_end
(spell_line);
29
if
(spellend_handler != NULL)
30
{
31
spellend_handler(_this, spell_index);
32
}
33
}
sf_endspell_hook
void __thiscall sf_endspell_hook(SF_CGdSpell *_this, uint16_t spell_index)
Definition
sf_endspell_hook.c:22
sf_endspell_hook.h
sf_hooks.h
handler_ptr
void(__thiscall * handler_ptr)(SF_CGdSpell *, uint16_t)
Definition
sf_registration_functions.h:15
get_spell_end
handler_ptr get_spell_end(uint16_t spell_line)
Definition
sf_spellend_registry.cpp:28
sf_spellend_registry.h
sf_wrappers.h
SF_CGdSpell
Definition
sf_general_structures.h:512
SF_CGdSpell::active_spell_list
SF_GdSpell active_spell_list[800]
Definition
sf_general_structures.h:535
SF_GdSpell::spell_line
uint16_t spell_line
Definition
sf_general_structures.h:391
Generated by
1.12.0