Targeting bug with copySpellontoStack
I finally found some time to look at the targeting bug with AF CopySpell (which includes Storm) and Replicate. At the moment the targets of all copies will be changed to the first target during their journey through the stack.
Looking at copySpellontoStack the error is clear:
The SpellAbility is cloned but it still has a pointer to the same target class, which makes storing different targets impossible. I made the changes needed to give the copied SpellAbility its own target class.
The real problem is showing now:
For some reason a lot of the ability factories use "af.getAbTgt()" to grab their targets and the AF is still pointing to the old shared Target class. Is there any reason for this?
I would gladly change all of them to use "sa.getTarget()" instead (which about 50% of the AF's already use). See any problems with this?
Looking at copySpellontoStack the error is clear:
The SpellAbility is cloned but it still has a pointer to the same target class, which makes storing different targets impossible. I made the changes needed to give the copied SpellAbility its own target class.
The real problem is showing now:
For some reason a lot of the ability factories use "af.getAbTgt()" to grab their targets and the AF is still pointing to the old shared Target class. Is there any reason for this?
I would gladly change all of them to use "sa.getTarget()" instead (which about 50% of the AF's already use). See any problems with this?