Spellforce-Spell-framework
Loading...
Searching...
No Matches
sf_mod_registry.h File Reference
#include "../../api/sfsf.h"
#include "../core/sf_modloader.h"
#include "../core/sf_wrappers.h"
#include "../core/sf_hooks.h"
#include <list>
Include dependency graph for sf_mod_registry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void register_mod_spells ()
 Registers the mod spells and performs basic conflict checking.
 
uint16_t __thiscall getSpellTags (uint16_t spell_line_id)
 

Variables

std::list< SFSpell * > g_internal_spell_list
 

Function Documentation

◆ getSpellTags()

uint16_t __thiscall getSpellTags ( uint16_t spell_line_id)

Definition at line 117 of file sf_mod_registry.cpp.

Here is the caller graph for this function:

◆ register_mod_spells()

void register_mod_spells ( )
extern

Registers the mod spells and performs basic conflict checking.

This function iterates over the g_internal_spell_list and registers each spell by adding it to the spell_id_map and spell_effect_id_map. It checks for conflicts by checking if the spell_id or spell_effect_id is already registered by another mod. If a conflict is detected, an error message is logged. If no conflict is detected, the spell is added to the respective map.

Additionally, it registers the spell type handler, spell effect handler, and spell end handler if the SFSpell struct has a non-null handler pointer.

After registering all the spells, the memory allocated for each spell is freed.

Definition at line 143 of file sf_mod_registry.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_internal_spell_list

std::list<SFSpell *> g_internal_spell_list
extern

Definition at line 25 of file sf_mod_registry.cpp.