Jump to content

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


Recommended Posts

Posted

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)

Posted

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; }

  • 2 weeks later...
Posted

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)

Posted

Ok I understand.

But what about just pointing to Creature function "JustSummoned" from Instance Script?

I think there would be no side effect if Spell summoned Creature is noticed from "OnCreatureCreate".

Greetings

  • 11 months later...
Posted

Any news about this?

In some scripts, especially 3.x.x scripts, it would be useful to have such a feature.

See - Anub'arak (Azjol Nerub) or Trollgore (Draktharon Keep). - it may be possible to have other examples as well.

Posted
I think we can savely extend the system for both JustSummoned and SpellHitTarget, but need to not change anything at all (like an original caster)

Then how do we extend it, if we don't change anything? :)

×
×
  • 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