Spellforce-Spell-framework
Loading...
Searching...
No Matches
src
internal
core
hooks
sf_refresh_hook.c
Go to the documentation of this file.
1
10
#include "
../sf_wrappers.h
"
11
#include "
../../registry/spell_data_registries/sf_spellrefresh_registry.h
"
12
#include <stdint.h>
13
#include <stdlib.h>
14
#include <stdio.h>
15
#include <string.h>
16
17
#include "
sf_refresh_hook.h
"
18
19
int
__thiscall
sf_refresh_hook
(
SF_CGdSpell
*_this, uint16_t spell_index)
20
{
21
// We need a map of refresh handlers?
22
uint16_t spell_line = _this->
active_spell_list
[spell_index].
spell_line
;
23
refresh_handler_ptr
spellrefresh_handler =
get_spell_refresh
(spell_line);
24
/* char message[256];
25
sprintf(message, "Spell Refresh Hook: [%d]", spell_index);
26
log_info(message);
27
*/
28
if
(spellrefresh_handler != NULL)
29
{
30
return
spellrefresh_handler(_this, spell_index);
31
}
32
// Default return is 1, it can be 0
33
return
1;
34
}
35
sf_refresh_hook
int __thiscall sf_refresh_hook(SF_CGdSpell *_this, uint16_t spell_index)
Definition
sf_refresh_hook.c:19
sf_refresh_hook.h
refresh_handler_ptr
int(__thiscall * refresh_handler_ptr)(SF_CGdSpell *, uint16_t)
Definition
sf_registration_functions.h:29
get_spell_refresh
refresh_handler_ptr get_spell_refresh(uint16_t spell_line_id)
Definition
sf_spellrefresh_registry.cpp:31
sf_spellrefresh_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