Party AI and detectable spells

I'm hacking my way through this, modifying the SCS Ease of Use AI (SCS v28) on BG2:EE and trying to add group-buff hotkeys that suit my fancy. I've had trouble with detecting if the Cleric's Resist Fire and Cold spell is already applied to a character. I looked in my STATS.IDS file using NearInfinity (which is also what I've been using to decompile/recompile the party AI), but I don't know which ID matches up or if I should even really be using CheckStat for this sort of thing. Any tips would be appreciated.
0