11static std::map<uint16_t, handler_ptr> s_handler_map;
21 auto it = s_handler_map.find(key);
22 if (it == s_handler_map.end())
33 auto check = s_handler_map.find(spell_index);
34 if (check != s_handler_map.end())
40 "%s (v%s) has replaced a Spelltype Handler! [%d] (Was this on purpose?)",
47 s_handler_map[spell_index] = handler;
SpellFunctions * spellAPI
void log_warning(const char *message)
void(__thiscall * handler_ptr)(SF_CGdSpell *, uint16_t)
void __thiscall default_handler(SF_CGdSpell *_this, uint16_t spell_index)
void __thiscall initializeSpellData(SF_CGdSpell *_this, uint16_t spell_id, SpellDataKey key)
void registerSpellTypeHandler(uint16_t spell_index, handler_ptr handler)
handler_ptr get_spell_handler(const uint16_t key)
setXData_ptr setXData
This function is used to assign specific value to an XData key of a given spell.