Edit: woops, code parts got mangled a bit. Copy+paste them into notepad and use a fixed-width font (such as Courier) to display correctly
It's been a while so take what I say with some caution.
If you want a spell to affect another one (for example, Improved Renew affects all Renew spells but not other spells), you need to:
- set the SpellFamilyName (aka SpellClassSet) to the same value for both (maybe not?)
- set the SpellFamilyFlags (aka SpellClassMask) in the AFFECTED spell (Renew in this case)
- set the EffectSpellClassMasks in the AFFECTING spell (Improved Renew in this case)
The SpellFamilyName is just the identifier of the class that has the spells. SpellFamilyFlags and EffectSpellClassMasks are a bitmasking system. To better understand, turn the values in both into binary.
Renew rank 1 (Id=139) has the following SpellFamilyFlags by default, first in hex and below it the same value represented in binary (the exact name of the field may differ, I'm looking at the fields in Stoneharry's spell editor/accompanying database):
Id SpellName0 SpellFamilyFlags SpellFamilyFlags1 SpellFamilyFlags2
139 Renew 0x40 0x0 0x400
0000 0000 0100 0000 0 0000 0100 0000 0000
Improved Renew rank 1 (Id=14908) has the following EffectSpellClassMasks for effect 1 by default, again first in hex and below it in binary. Imp Renew only has one effect (out of a possible 3), so the other two effects' EffectSpellClassMask (B1, B2, B3, C1, C2, C3) fields are left out:
Id SpellName0 EffectSpellClassMaskA1 EffectSpellClassMaskA2 EffectSpellClassMaskA3
14908 Improved Renew 0x40 0x0 0x0
0000 0000 0100 0000 0 0
Because Renew has the 7th bit set in SpellFamilyFlags, and Imp Renew has the 7th bit set in EffectSpellClassMaskA1, Imp Renew affects Renew.
If the bit was set in the second flags field for Renew instead, it wouldn't work.
SpellFamilyFlags is checked by EffectSpellClassMaskA1, EffectSpellClassMaskB1, EffectSpellClassMaskC1
SpellFamilyFlags1 is checked by EffectSpellClassMaskA2, EffectSpellClassMaskB2, EffectSpellClassMaskC2
SpellFamilyFlags2 is checked by EffectSpellClassMaskA3, EffectSpellClassMaskB3, EffectSpellClassMaskC3
It doesn't matter if Renew has a bit set set that Imp Renew doesn't match. So long as a single bit in a corresponding field is set, then the spell is affected.
If Imp Renew has a bit set that Renew doesn't have, that just means Imp Renew might affect other spells.
If Renew has a bit set that Imp Renew doesn't have, that just means Renew might be affected by other spells.
As an experiment, we can make the talent Shadow Reach affect Renew by adding a bit to Renew's flags that Shadow Reach already matches. Doing it this way is likely to have side effects. The "cleaner" way would be to take a bit that's unused among priest spells (in any of the SpellFamilyFlags fields), and set that in both the AFFECTING and AFFECTED spells.
We'll look at Shadow Reach rank 2 (Id=17323) because I can't find rank 3 for some reason. Again, it only has 1 effect:
Id EffectSpellClassMaskA1 EffectSpellClassMaskA2 EffectSpellClassMaskA3
17323 0x682A004 0x300502 0x2040
0110 1000 0010 1010 0000 0000 0100 0011 0000 0000 0101 0000 0010 0010 0000 0100 0000
If we set any of these bits in Renew's flags (in the appropriate field), Renew should have its range extended by 13%.
So I'll just open Stoneharry's spell editor, make a duplicate of Renew, set any of the bits from Shadow Reach's masks in an appropriate flags field of Renew, save and export the modified Spell.DBC, then copy it over to the server's DBC directory, put it in a client-side patch so I can learn the new spell, learn the original Renew and the modified version, then learn Shadow Reach (rank shouldn't matter, come to think of it, since all ranks affect identical spells).
As you can see, there were some side effects besides the increased range (the heal is stronger and costs less mana). Presumably because the bit by which I allowed Renew to be targeted by Shadow Reach is also targeted by other spells that have that effect.
Tips: use as few bits as possible. Depending on where you look, flags/masks will be in hex, binary or decimal. Use online converters.