|
Spellforce-Spell-framework
|
Represents a collection of function pointers for managing spell-related operations. More...
#include <sf_spell_functions.h>

Data Fields | |
| setXData_ptr | setXData |
| This function is used to assign specific value to an XData key of a given spell. | |
| initializeSpellData_ptr | initializeSpellData |
| Initializes spell-related data for a given entity. | |
| setEffectDone_ptr | setEffectDone |
| Stops a spell effect handler for a given spell. | |
| addToXData_ptr | addToXData |
| Adds a value to a specific XData entry for the given spell. | |
| getChanceToResistSpell_ptr | getChanceToResistSpell |
| Returns target's resistance to a primary magic school that a specified spell belongs in. In case the spell has requirements for more than one magic school, the school with the highest requirement is regarded as primary. | |
| getRandom_ptr | getRandom |
| Generates a random value up to the specified maximum value. | |
| getResourceSpellData_ptr | getResourceSpellData |
| addVisualEffect_ptr | addVisualEffect |
| spawn a visual effect. | |
| figureAggro_ptr | figureAggro |
| Used to trigger aggressive behavior for a figure. | |
| getXData_ptr | getXData |
| Retrieves the XData value for a specific spell. | |
| getTargetsRectangle_ptr | getTargetsRectangle |
| This function is used to calculate area of effect for a spell. | |
| removeDLLNode_ptr | removeDLLNode |
| Used to remove a spell from the list of active spells over the target. | |
| spellClearFigureFlag_ptr | spellClearFigureFlag |
| Clears a specific flag on the spell object. | |
| addSpell_ptr | addSpell |
| Creates a new spell of a given spell type. | |
| getSpellLine_ptr | getSpellLine |
| Retrieves the spell type ID of a given spell. | |
| onSpellRemove_ptr | onSpellRemove |
| This function is triggered when a spell stops. | |
| getSpellID_ptr | getSpellID |
| Retrieves the Spell Effect ID for a given spell index. The spell effect ID can be used to obtain spell parameters (such as damage, radius, duration, etc.) from GameData.cff. | |
| checkCanApply_ptr | checkCanApply |
| Calls the Refresh handler for a specified spell type. | |
| getSpellTags_ptr | getSpellTags |
| Retrieves the tags associated with a spell. | |
| hasSpellTag_ptr | hasSpellTag |
| Checks if a spell has a specific tag. | |
| figClrChkSplBfrChkBattle_ptr | figClrChkSplBfrChkBattle |
| Clears the CHECK_SPELLS_BEFORE_CHECK_BATTLE flag. | |
| figTryClrCHkSPlBfrJob2_ptr | figTryClrCHkSPlBfrJob2 |
| clears the CHECK_SPELLS_BEFORE_JOB2 flag | |
| figTryUnfreeze_ptr | figTryUnfreeze |
| clears the UNFREEZE flag | |
| spellEffectCallback_ptr | spellEffectCallback |
| callback that iterates through spells on a target, checks a condition then executes the callback. | |
| getLeveledSpellID_ptr | getLeveledSpellID |
Represents a collection of function pointers for managing spell-related operations.
Definition at line 327 of file sf_spell_functions.h.
| addSpell_ptr SpellFunctions::addSpell |
Creates a new spell of a given spell type.
This function creates a new spell of the specified spell type and associates it with a source and target entity. The spell will be active during the game, and the time it appears is determined by the internal game tick.
| _this | A pointer to the global spell object. |
| spell_id | The Spell Type ID of the spell to create. |
| game_tick | The internal game tick when the spell should appear. This value can be determined via the opaque class in the global spell object. |
| source | The index of the spell caster (source entity). |
| target | The Spell Target entity index. |
| param5 | The purpose of this parameter is currently unknown. For safe use, it is recommended to pass it as 0. |
Definition at line 474 of file sf_spell_functions.h.
| addToXData_ptr SpellFunctions::addToXData |
Adds a value to a specific XData entry for the given spell.
This function increments the XData value associated with the given spell and XData key.
| _this | A pointer to the global spell object. |
| spell_id | The Spell Index of the currently active spell. |
| key | The XData key to modify. |
| value | The value to add to the XData entry. |
Definition at line 369 of file sf_spell_functions.h.
| addVisualEffect_ptr SpellFunctions::addVisualEffect |
spawn a visual effect.
This function attaches a visual effect to the given spell and its corresponding target.
| _this | A pointer to the global spell object. |
| spell_id | The Spell Index of the currently active spell. |
| effect_id | The ID of the visual effect to apply. |
| unused | Unused parameter that may be for future extensibility; Set to 0 for now. |
| target | The entity target data which the visual effect will be centered on. The X-Y coordinates passed as part of the target data will determine the visual effect offset relative to the target. |
| tick_start | The internal game tick when the visual effect must appear. |
| tick_count | The number of ticks the visual effect will last. |
| corner_coords | The area that the visual effect would be within for AoE effects. Use {0,0} for non AOE Spells. |
Definition at line 408 of file sf_spell_functions.h.
| checkCanApply_ptr SpellFunctions::checkCanApply |
Calls the Refresh handler for a specified spell type.
This function acts as a wrapper to invoke the Refresh handler associated with the given spell. It returns the value that the Refresh handler returns.
| _this | A pointer to the global spell object. |
| spell_id | The index of the spell for which the Refresh handler is called. |
Definition at line 511 of file sf_spell_functions.h.
| figClrChkSplBfrChkBattle_ptr SpellFunctions::figClrChkSplBfrChkBattle |
Clears the CHECK_SPELLS_BEFORE_CHECK_BATTLE flag.
Definition at line 535 of file sf_spell_functions.h.
| figTryClrCHkSPlBfrJob2_ptr SpellFunctions::figTryClrCHkSPlBfrJob2 |
clears the CHECK_SPELLS_BEFORE_JOB2 flag
Definition at line 540 of file sf_spell_functions.h.
| figTryUnfreeze_ptr SpellFunctions::figTryUnfreeze |
clears the UNFREEZE flag
Definition at line 545 of file sf_spell_functions.h.
| figureAggro_ptr SpellFunctions::figureAggro |
Used to trigger aggressive behavior for a figure.
| _this | A pointer to the global spell object. |
| spell_id | The Spell Index of the active spell. |
| target_index | The figure to make aggressive towards the caster of the spell. |
Definition at line 417 of file sf_spell_functions.h.
| getChanceToResistSpell_ptr SpellFunctions::getChanceToResistSpell |
Returns target's resistance to a primary magic school that a specified spell belongs in. In case the spell has requirements for more than one magic school, the school with the highest requirement is regarded as primary.
| autoclass34 | A pointer to an internal class. |
| source | The source character or entity casting the spell. |
| target | The target character or entity that we want the resistance from. |
| effect_info | spell effect ID and spell job ID grouped in a single variable of SF_SpellEffectInfo |
Definition at line 381 of file sf_spell_functions.h.
| getLeveledSpellID_ptr SpellFunctions::getLeveledSpellID |
Definition at line 556 of file sf_spell_functions.h.
| getRandom_ptr SpellFunctions::getRandom |
Generates a random value up to the specified maximum value.
This function returns a random value between 0 and the specified maximum value (inclusive).
| autoclass14 | A pointer to the Opaque class of the spell global object. |
| max_value | The upper bound for the random number. |
Definition at line 391 of file sf_spell_functions.h.
| getResourceSpellData_ptr SpellFunctions::getResourceSpellData |
Definition at line 393 of file sf_spell_functions.h.
| getSpellID_ptr SpellFunctions::getSpellID |
Retrieves the Spell Effect ID for a given spell index. The spell effect ID can be used to obtain spell parameters (such as damage, radius, duration, etc.) from GameData.cff.
| _this | A pointer to the global spell object. |
| spell_index | The index of the spell. |
Definition at line 499 of file sf_spell_functions.h.
| getSpellLine_ptr SpellFunctions::getSpellLine |
Retrieves the spell type ID of a given spell.
This function returns the spell type ID associated with a given spell.
| _this | A pointer to the global spell object. |
| spell_id | The index of the spell for which the type ID is to be retrieved |
Definition at line 485 of file sf_spell_functions.h.
| getSpellTags_ptr SpellFunctions::getSpellTags |
Retrieves the tags associated with a spell.
This function returns a set of tags associated with a given spell, which can be used for filtering or classification.
| spell_index | The index of the spell. |
Definition at line 520 of file sf_spell_functions.h.
| getTargetsRectangle_ptr SpellFunctions::getTargetsRectangle |
This function is used to calculate area of effect for a spell.
The Area of effect for a spell is a circle of a given radius within a rectangle
| _this | A pointer to the global spell object. |
| output | A pointer to the rectangle structure to store the result. |
| spell_id | The Spell Index of the currently active spell. |
| radius | The radius of the area of effect. |
| center_maybe | The center coordinates of the area of effect. |
Definition at line 441 of file sf_spell_functions.h.
| getXData_ptr SpellFunctions::getXData |
Retrieves the XData value for a specific spell.
This function returns the XData value stored for a given spell and key.
| _this | A pointer to the global spell object. |
| spell_id | The Spell Index of the currently active spell. |
| key | Numerical XData key ID or its predefined enumerator. |
Definition at line 428 of file sf_spell_functions.h.
| hasSpellTag_ptr SpellFunctions::hasSpellTag |
Checks if a spell has a specific tag.
This function determines whether the given spell contains the specified tag.
| spell_id | The ID of the spell. |
| tag | The tag to check for. |
Definition at line 530 of file sf_spell_functions.h.
| initializeSpellData_ptr SpellFunctions::initializeSpellData |
Initializes spell-related data for a given entity.
This function initializes spell data for a given entity, using the specified spell ID and key.
| _this | A pointer to the global spell object. |
| spell_id | The Spell Index of the spell. |
| key | The SpellDataKey to initialize the data with. |
Definition at line 346 of file sf_spell_functions.h.
| onSpellRemove_ptr SpellFunctions::onSpellRemove |
This function is triggered when a spell stops.
Definition at line 490 of file sf_spell_functions.h.
| removeDLLNode_ptr SpellFunctions::removeDLLNode |
Used to remove a spell from the list of active spells over the target.
| _this | A pointer to the global spell object. |
| spell_index | The Spell Index of the currently active spell. |
Definition at line 449 of file sf_spell_functions.h.
| setEffectDone_ptr SpellFunctions::setEffectDone |
Stops a spell effect handler for a given spell.
This function marks the spell effect as completed, which will lead to its automatic termination during the next game tick.
| _this | A pointer to the global spell object. |
| spell_id | The Spell Index of the currently active spell. |
| param_2 | The second parameter whose purpose is currently unknown; it should always be set to 0. |
Definition at line 357 of file sf_spell_functions.h.
| setXData_ptr SpellFunctions::setXData |
This function is used to assign specific value to an XData key of a given spell.
| _this | a pointer to the global spell object |
| spell_id | The Spell Index of the currently active spell |
| uint32_t | The predefined enumerator of the XData Key. |
| value | The value you wish to assign expressed as integer. |
Definition at line 336 of file sf_spell_functions.h.
| spellClearFigureFlag_ptr SpellFunctions::spellClearFigureFlag |
Clears a specific flag on the spell object.
It works as a wrapper of more specific flag clearing functions,
| _this | A pointer to the global spell object. |
| spell_id | The Spell Index of the currently active spell. |
| key | The flag key to clear. |
Definition at line 459 of file sf_spell_functions.h.
| spellEffectCallback_ptr SpellFunctions::spellEffectCallback |
callback that iterates through spells on a target, checks a condition then executes the callback.
Definition at line 550 of file sf_spell_functions.h.