Spellforce-Spell-framework
Toggle main menu visibility
Loading...
Searching...
No Matches
sf_refresh_hook.c
Go to the documentation of this file.
1
8
9
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
if
(spellrefresh_handler != NULL)
25
{
26
return
spellrefresh_handler(_this, spell_index);
27
}
28
// Default return is 1, it can be 0
29
return
1;
30
}
31
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
get_spell_refresh
refresh_handler_ptr get_spell_refresh(uint16_t spell_line_id)
Definition
sf_spellrefresh_registry.cpp:25
sf_spellrefresh_registry.h
sf_wrappers.h
refresh_handler_ptr
int(__thiscall * refresh_handler_ptr)(SF_CGdSpell *, uint16_t)
Definition
sfsf.h:31
SF_CGdSpell
Definition
sf_spell_structures.h:26
SF_CGdSpell::active_spell_list
SF_GdSpell active_spell_list[800]
Definition
sf_spell_structures.h:49
SF_GdSpell::spell_line
uint16_t spell_line
Definition
sf_spell_structures.h:16
src
internal
core
hooks
sf_refresh_hook.c
Generated by
1.17.0