EffectSpellImmunity(SPELL_DROWN)). More generally, I'd like to be able to determine if a creature has immunity to a specific spell.
This seems like it should be easy enough recoding something similar to
x0_i0_match's
GetHasEffect()and checking for
EFFECT_TYPE_SPELL_IMMUNITY, but I realize I don't know how to get the spell subtype for that effect. In other words, I can check if a character has the effect
EFFECT_TYPE_SPELL_IMMUNITY, but I don't know how to determine which specific spell it is immune to.
It seems like there is probably something analogous to the check one would make to see if an item property grants immunity from a specific spell. E.g. if I were looking for this as an objects item property, I might try:
- Loop through the object's item properties.
- For each one, check if
GetItemPropertyType()
returnsITEM_PROPERTY_IMMUNITY_SPECIFIC_SPELL
- If so, check if
GetItemPropertyCostTable()
returnsIPRP_SPELLCOST
- If so, check if
GetItemPropertyCostTableValue()
returns 201 (the Drown entry fromiprp_spellcost.2da
)
Thanks for any advice or pointers to another thread that covers this. :-)
[EDIT: It appears that list termination is broken on the boards.]
Modifié par MrZork, 20 avril 2012 - 07:05 .





Retour en haut







