Jump to content

[11879][Patch] Use of original caster for JustSummoned SpellHitTarget


Schmoozerd

Recommended Posts

What bug does the patch fix? What features does the patch add?

This patch triggers the AI-calls JustSummoned, SpellHitTarget (and also the other calls for Summoned creatures)

for spell summoned mobs to the original caster and not m_caster

For which repository revision was the patch created?

11073

Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread.

no

Who has been writing this patch? Please include either forum user names or email addresses.

me

I didn't see any problems with this change with momentarily scripts, infact this will simplify a few (as no need for special scripts for summon-trigger npcs)

Patch, any input welcome

http://paste2.org/p/1212878 (V2a, with vladimir's suggestion, for Rev 11073)

History

http://paste2.org/p/1210352 (V1)

http://paste2.org/p/1211001 (V2, with vladimir's suggestion)

Link to comment
Share on other sites

Hint:

// real source of cast affects, explicit caster, or DoT/HoT applier, or GO owner, or wild GO itself. Can be NULL

WorldObject* GetAffectiveCasterObject() const;

// limited version returning NULL in cases not Unit* caster object, need for Aura (auras currently not support non-Unit caster)

Unit* GetAffectiveCaster() const { return !m_originalCasterGUID.IsEmpty() ? m_originalCaster : m_caster; }

Link to comment
Share on other sites

  • 2 weeks later...

the very problem about this patch is, that it is very very difficult to be sure that there are no unwanted side-effects :(

I only can say that I am quite sure that in current SD2 there will be no sideeffects with current scripts.

If there are sideeffects in normal casts, I cannot tell.

(And unfortunately I don't really understand the differences of original caster in case of GO-spells)

Link to comment
Share on other sites

  • 11 months later...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use