I am sure there will be numbers in the vast sequence of spellIDs that do not exist.
You either read through the buff/debuffs that the player/target/focus/pet etc has and get the SpellInfo from that spellID. I can't see any reason why you would need to cycle through 1 to 999999 to see IF there is a spell there. And remember some spells aren't buffs, so again, your best bet when dealing with buffs/debuffs is to work with the buff/debuff functions before dealing with the respective spell functions.
|