252typedef struct __attribute__((packed))
256 uint8_t skill_requirements[12];
271 uint8_t xdatakey, uint32_t value);
279 uint16_t source, uint16_t target,
285 uint16_t tick_count,
void *corner_coords);
287 uint16_t target_index);
293 SF_Rectangle *output, uint16_t spell_id, uint16_t radius,
304 uint16_t spell_id, uint16_t unk1);
310 uint16_t spell_index);
315 uint16_t source_index, uint16_t spell_index,
316 bool (*conditionPtr)(
SF_CGdSpell *, uint16_t, uint16_t),
317 void (*callbackPtr)(
SF_CGdSpell *, uint16_t, uint16_t,
321DECLARE_FUNCTION(uint16_t, getLeveledSpellID,
void *CGdResource, uint16_t source_spell_id, uint16_t spell_level);
void __thiscall spellEffectCallback(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index, bool(*condition)(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index), void(*callback)(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index))
bool __thiscall hasSpellTag(uint16_t spell_id, SpellTag tag)
void __thiscall spellClearFigureFlag(SF_CGdSpell *_this, uint16_t spell_id, SpellFlagKey key)
Group of Structures and Enums used throught SFSF.
#define DECLARE_FUNCTION(type, name,...)
Declares a function with the specified return type, name, and arguments.
uint16_t __thiscall getSpellTags(uint16_t spell_line_id)
void(__thiscall * removeDLLNode_ptr)(SF_CGdSpell *_this, uint16_t param_1)
void(__thiscall * initializeSpellData_ptr)(SF_CGdSpell *_this, uint16_t spell_id, SpellDataKey key)
uint16_t(__thiscall * getSpellID_ptr)(SF_CGdSpell *_this, uint16_t spell_index)
void(__thiscall * figTryUnfreeze_ptr)(SF_CGdSpell *_this, uint16_t spell_id, uint16_t unk1)
void(__thiscall * spellEffectCallback_ptr)(SF_CGdSpell *_this, uint16_t source_index, uint16_t spell_index, bool(*conditionPtr)(SF_CGdSpell *, uint16_t, uint16_t), void(*callbackPtr)(SF_CGdSpell *, uint16_t, uint16_t, uint16_t))
uint16_t(__thiscall * getLeveledSpellID_ptr)(void *CGdResource, uint16_t source_spell_id, uint16_t spell_level)
void(__thiscall * figureAggro_ptr)(SF_CGdSpell *_this, uint16_t spell_id, uint16_t target_index)
uint32_t(__thiscall * addToXData_ptr)(SF_CGdSpell *_this, uint16_t spell_id, SpellDataKey key, uint32_t value)
uint16_t(__thiscall * addSpell_ptr)(SF_CGdSpell *_this, uint16_t spell_id, uint16_t param2, SF_CGdTargetData *source, SF_CGdTargetData *target, uint16_t param5)
void(__thiscall * spellClearFigureFlag_ptr)(SF_CGdSpell *_this, uint16_t spell_id, SpellFlagKey key)
bool(__thiscall * hasSpellTag_ptr)(uint16_t spell_id, SpellTag tag)
uint32_t(__thiscall * getChanceToResistSpell_ptr)(void *autoclass34, uint16_t source, uint16_t target, SF_SpellEffectInfo effect_info)
void(__thiscall * onSpellRemove_ptr)(SF_CGdSpell *_this, uint16_t spell_id)
uint16_t(__thiscall * getSpellTags_ptr)(uint16_t spell_index)
@ CHECK_SPELLS_BEFORE_JOB2
@ CHECK_SPELLS_BEFORE_CHECK_BATTLE
void(__thiscall * setXData_ptr)(SF_CGdSpell *_this, uint16_t spell_id, uint8_t xdatakey, uint32_t value)
SF_Rectangle *(__thiscall * getTargetsRectangle_ptr)(SF_CGdSpell *_this, SF_Rectangle *output, uint16_t spell_id, uint16_t radius, SF_Coord *center_maybe)
uint32_t(__thiscall * getXData_ptr)(SF_CGdSpell *_this, uint16_t spell_id, SpellDataKey key)
void(__thiscall * setEffectDone_ptr)(SF_CGdSpell *_this, uint16_t spell_id, uint16_t param_2)
void(__thiscall * addVisualEffect_ptr)(SF_CGdSpell *_this, uint16_t spell_id, CGdEffectType effect_id, void *unused, SF_CGdTargetData *target, uint32_t tick_start, uint16_t tick_count, void *corner_coords)
void(__thiscall * figTryClrCHkSPlBfrJob2_ptr)(SF_CGdSpell *_this, uint16_t spell_id)
@ kGdSpellLineInflexibility
@ kGdSpellLineShockChained
@ kGdSpellLineAuraSiegeElf
@ kGdSpellLineDetectMagic
@ kGdSpellLineAbilityTrueShot
@ kGdSpellLineAbilitySteelSkin
@ kGdSpellLineGreaterHealing
@ kGdSpellLineAbilityDurability
@ kGdSpellLineAuraHypnotization
@ kGdSpellLineSummonDemon
@ kGdSpellLineAuraManaTap
@ kGdSpellLineAbilityPatronize
@ kGdSpellLineDarknessArea
@ kGdSpellLineObjectIllusion
@ kGdSpellLineManaTapChained
@ kGdSpellLineAuraRegeneration
@ kGdSpellLineCharmAnimal
@ kGdSpellLineEnlightenment
@ kGdSpellLineDispelWhiteAura
@ kGdSpellLineChainFireburst
@ kGdSpellLineInvisibility
@ kGdSpellLineSummonGoblin
@ kGdSpellLineAuraSlowFighting
@ kGdSpellLineChillResistance
@ kGdSpellLineFireBallEffect
@ kGdSpellLineAuraSiegeOrc
@ kGdSpellLineSuffocation
@ kGdSpellLineIceShieldStun
@ kGdSpellLineSlowFighting
@ kGdSpellLineAuraDexterity
@ kGdSpellLineAuraInflexibility
@ kGdSpellLineAuraSiegeHuman
@ kGdSpellLineDetectMetal
@ kGdSpellLineSummonChanneler
@ kGdSpellLineAbilityShelter
@ kGdSpellLineHypnotizeArea
@ kGdSpellLineAlmightinessMental
@ kGdSpellLineCannibalize
@ kGdSpellLineCharmChained
@ kGdSpellLineChainHallow
@ kGdSpellLineFireBlockEffect
@ kGdSpellLineIceBurstChained
@ kGdSpellLineMirrorImage
@ kGdSpellLineIceArrowEffect
@ kGdSpellLineRemoveCurse
@ kGdSpellLineIceburstTower
@ kGdSpellLineDominateAnimal
@ kGdSpellLineAuraEternity
@ kGdSpellLineHypnotizeTower
@ kGdSpellLineAuraHealing
@ kGdSpellLineDoNotTouchMe
@ kGdSpellLineManaTapAura
@ kGdSpellLineSentinelHealing
@ kGdSpellLineAlmightinessElementalEffect
@ kGdSpellLineSummonSpectre
@ kGdSpellLineChainRockBullet
@ kGdSpellLineWallOfRocks
@ kGdSpellLineAbilityCriticalHits
@ kGdSpellLineConfuseArea
@ kGdSpellLineFireBallChained
@ kGdSpellLineThornShieldDamage
@ kGdSpellLineSacrificeMana
@ kGdSpellLineAuraWeakness
@ kGdSpellLineInvulnerability
@ kGdSpellLineSuicideHeal
@ kGdSpellLineAbilityWarCry
@ kGdSpellLineRockBulletChained
@ kGdSpellLineLifeTapAura
@ kGdSpellLineFireBurstChained
@ kGdSpellLineFireShieldDamage
@ kGdSpellLineEssenceWhite
@ kGdSpellLineSummonEarthGolem
@ kGdSpellLineSummonSkeleton
@ kGdSpellLineAbilityBenefactions
@ kGdSpellLineReinforcement
@ kGdSpellLineFlexibilityArea
@ kGdSpellLineIceBlockEffect
@ kGdSpellLineFakeSpellOneFigure
@ kGdSpellLineChainMutation
@ kGdSpellLineAuraSiegeDarkElf
@ kGdSpellLineAbilitySalvo
@ kGdSpellLineAbilityBlessing
@ kGdSpellLineSummonFireGolem
@ kGdSpellLineEarthElemental
@ kGdSpellLineLifeTapChained
@ kGdSpellLineChainIceburst
@ kGdSpellLineHypnotizeTwo
@ kGdSpellLineAuraSuffocation
@ kGdSpellLineAuraSiegeTroll
@ kGdSpellLineEssenceMental
@ kGdSpellLineFireElemental
@ kGdSpellLineMutationChained
@ kGdSpellLineSummonTreeWraith
@ kGdSpellLineHealingTower
@ kGdSpellLineExtinctTower
@ kGdSpellLineProtectionBlack
@ kGdSpellLineEssenceBlack
@ kGdSpellLineAuraSlowWalking
@ kGdSpellLinePainChained
@ kGdSpellLineHealingArea
@ kGdSpellLineSuicideDeath
@ kGdSpellLineRingOfRocks
@ kGdSpellLineFlexibility
@ kGdSpellLineHealingAura
@ kGdSpellLineAlmightinessElemental
@ kGdSpellLineAuraLifeTap
@ kGdSpellLineCureDisease
@ kGdSpellLineAbilityRiposte
@ kGdSpellLineDarkBanishing
@ kGdSpellLineDispelBlackAura
@ kGdSpellLineMeltResistance
@ kGdSpellLineInflexibilityArea
@ kGdSpellLineAuraFlexibility
@ kGdSpellLineSummonIceGolem
@ kGdSpellLineSelfIllusion
@ kGdSpellLineQuicknessArea
@ kGdSpellLineEssenceElementalEffect
@ kGdSpellLineSlownessArea
@ kGdSpellLineFastFighting
@ kGdSpellLineFireResistance
@ kGdSpellLineAuraBrilliance
@ kGdSpellLineThornShield
@ kGdSpellLineSummonBlade
@ kGdSpellLineConservation
@ kGdSpellLineAlmightinessWhite
@ kGdSpellLineAbilityBerserk
@ kGdSpellLineAuraFastFighting
@ kGdSpellLineAuraStrength
@ kGdSpellLineWaveOfRocks
@ kGdSpellLineDemoralization
@ kGdSpellLineAbilityShiftLife
@ kGdSpellLineIceElemental
@ kGdSpellLineFireBurstTower
@ kGdSpellLineChainLifetap
@ kGdSpellLineChainFireball
@ kGdSpellLineAlmightinessBlack
@ kGdSpellLineAuraInability
@ kGdSpellLineAuraEndurance
@ kGdSpellLineHallowChained
@ kGdSpellLineEssenceElemental
@ kGdSpellLineDominateUndead
@ kGdSpellLineAbilityEndurance
@ kGdSpellLineChainManatap
@ kGdSpellLineAuraFastWalking
@ kGdSpellLineStrengthenArea
uint16_t(__thiscall * getSpellLine_ptr)(SF_CGdSpell *_this, uint16_t spell_id)
void(__thiscall * figClrChkSplBfrChkBattle_ptr)(SF_CGdSpell *_this, uint16_t spell_id, uint16_t unk1)
uint16_t(__thiscall * getRandom_ptr)(void *autoclass14, uint16_t max_value)
SF_CGdResourceSpell *(__thiscall * getResourceSpellData_ptr)(void *, SF_CGdResourceSpell *spellData, uint16_t index)
int(__thiscall * checkCanApply_ptr)(SF_CGdSpell *_this, uint16_t index)
void __thiscall initializeSpellData(SF_CGdSpell *_this, uint16_t spell_id, SpellDataKey key)
Represents a collection of function pointers for managing spell-related operations.
getRandom_ptr getRandom
Generates a random value up to the specified maximum value.
getChanceToResistSpell_ptr getChanceToResistSpell
Returns target's resistance to a primary magic school that a specified spell belongs in....
spellClearFigureFlag_ptr spellClearFigureFlag
Clears a specific flag on the spell object.
getTargetsRectangle_ptr getTargetsRectangle
This function is used to calculate area of effect for a spell.
addToXData_ptr addToXData
Adds a value to a specific XData entry for the given spell.
spellEffectCallback_ptr spellEffectCallback
callback that iterates through spells on a target, checks a condition then executes the callback.
getResourceSpellData_ptr getResourceSpellData
checkCanApply_ptr checkCanApply
Calls the Refresh handler for a specified spell type.
setEffectDone_ptr setEffectDone
Stops a spell effect handler for a given spell.
getSpellTags_ptr getSpellTags
Retrieves the tags associated with a spell.
getXData_ptr getXData
Retrieves the XData value for a specific spell.
addSpell_ptr addSpell
Creates a new spell of a given spell type.
getSpellLine_ptr getSpellLine
Retrieves the spell type ID of a given spell.
initializeSpellData_ptr initializeSpellData
Initializes spell-related data for a given entity.
addVisualEffect_ptr addVisualEffect
spawn a visual effect.
onSpellRemove_ptr onSpellRemove
This function is triggered when a spell stops.
figTryClrCHkSPlBfrJob2_ptr figTryClrCHkSPlBfrJob2
clears the CHECK_SPELLS_BEFORE_JOB2 flag
hasSpellTag_ptr hasSpellTag
Checks if a spell has a specific tag.
getLeveledSpellID_ptr getLeveledSpellID
removeDLLNode_ptr removeDLLNode
Used to remove a spell from the list of active spells over the target.
figureAggro_ptr figureAggro
Used to trigger aggressive behavior for a figure.
figTryUnfreeze_ptr figTryUnfreeze
clears the UNFREEZE flag
getSpellID_ptr getSpellID
Retrieves the Spell Effect ID for a given spell index. The spell effect ID can be used to obtain spel...
setXData_ptr setXData
This function is used to assign specific value to an XData key of a given spell.
figClrChkSplBfrChkBattle_ptr figClrChkSplBfrChkBattle
Clears the CHECK_SPELLS_BEFORE_CHECK_BATTLE flag.