14 std::list<std::pair<uint16_t,
21 auto &handler_list = s_onhit_handler_map[phase];
24 sprintf(buffer,
"Mod [%s] setting on hit handler for Spell line ID [%d]",
28 for (
auto &entry : handler_list)
31 if (entry.first == spell_line_id)
36 "%s (v%s) has replaced an On Hit Handler [%d] (Was this on purpose?)",
42 entry.second = handler;
48 handler_list.emplace_back(spell_line_id, handler);
51std::list<std::pair<uint16_t,
54 int enumValue =
static_cast<int>(phase);
55 auto it = s_onhit_handler_map.find(phase);
56 if (it == s_onhit_handler_map.end())
void log_info(const char *message)
void log_warning(const char *message)
std::list< std::pair< uint16_t, onhit_handler_ptr > > get_onhit_phase(OnHitPhase phase)
void registerOnHitHandler(uint16_t spell_line_id, onhit_handler_ptr handler, OnHitPhase phase)
uint16_t(__thiscall * onhit_handler_ptr)(SF_CGdFigureJobs *, uint16_t source, uint16_t target, uint16_t damage)