Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_refresh_hook.c
Go to the documentation of this file.
1
8
9
10#include "../sf_wrappers.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
19int __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
int __thiscall sf_refresh_hook(SF_CGdSpell *_this, uint16_t spell_index)
refresh_handler_ptr get_spell_refresh(uint16_t spell_line_id)
int(__thiscall * refresh_handler_ptr)(SF_CGdSpell *, uint16_t)
Definition sfsf.h:31
SF_GdSpell active_spell_list[800]