Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_endspell_hook.c
Go to the documentation of this file.
1
7#include "../sf_wrappers.h"
8#include "../sf_hooks.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
22void __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}
void __thiscall sf_endspell_hook(SF_CGdSpell *_this, uint16_t spell_index)
void(__thiscall * handler_ptr)(SF_CGdSpell *, uint16_t)
handler_ptr get_spell_end(uint16_t spell_line)
SF_GdSpell active_spell_list[800]