Jump to content

[correct][6664] Spell Effect 130


Guest Peppers

Recommended Posts

Rev.: 6630

Index: SharedDefines.h
===================================================================
--- SharedDefines.h        (revision 6630)
+++ SharedDefines.h        (working copy)
@@ -632,7 +632,7 @@
        SPELL_EFFECT_PROSPECTING                             = 127,
        SPELL_EFFECT_APPLY_AREA_AURA_FRIEND        = 128,
        SPELL_EFFECT_APPLY_AREA_AURA_ENEMY         = 129,
-        SPELL_EFFECT_130                                             = 130,
+        SPELL_EFFECT_REDIRECT_THREAT                     = 130,
        SPELL_EFFECT_131                                             = 131,
        SPELL_EFFECT_132                                             = 132,
        SPELL_EFFECT_UNLEARN_SPECIALIZATION        = 133,

130 Spell Effect 130 only used in Misdirection, hunter spell.

<strike>And Aura #226 Is not a dummy effect, it is aura for WoLK also for hunter: http://wotlk.wowhead.com/?spell=60053</strike>

Link to comment
Share on other sites

I doubt that 130 is really REDIRECT_THREAD. I think it's the dummy aura that in fact redirects the thread. Would be more logical for me (redirect thread as long as you are affected by the aura), but only my oppinion. Maybe 130 does anything else the we don't know until know :huh:

Why should Aura #226 should not be a periodic dummy? Seems logical if it triggers this spell http://wotlk.wowhead.com/?spell=56298 every period.

Link to comment
Share on other sites

I use effect to set a guid of person that has it threat redirected to, but then again it could be all done just with that dummy aura ( And probably going to redo it that way ). Well, Misdirection is currently only spell using this effect, but basicly redirection is aura not an effect ;), so it is probably very useless.

Maybe for effect_immunity? Didn't check that yet...

Link to comment
Share on other sites

repaired? It never work before in any mangos revision...

Unclear how better implement it.

Main problem: caster side aura not have information about target at apply (most important) and remove.

For speed we can store redirection target guid in Unit field, but this will be very not safe code: effect called for target and caster aura for caster

In mangos pet-target effects apply algo we will have call effect _before_ aura apply.

This create problems: at load from saved data target lost (liitle problem for short working spells)

But if aura failed to apply or replace other similar aura (caster/target aura versions) then we can in result or lost correct setting at aura replace (effect called before aura replace code) or have target setup at infinity time (until relogin).

I have some "working" version but don't want add its as totally hack-like.

Anyway name update patch applied in [6664]. Thank you :)

Link to comment
Share on other sites

And I didn't found how to get threat made by last attack, not all threat. Or maybe i'm missing something?

Well I thinking this way:

To get Misdirection Target i could use getUnitTarget() if it do what i think.

When get attacks aggro(don't know how to do that, i don't know if this would be safe, but maybe check before adding agro to target if he has aura-34477, and then save it).

Redirect threat to getUnitTarget().

Use one of the use(still looking for the code to do that :D )

Cancel aura if one of the side cancels.

P.s. I'm just trying to get mangos code as much as posible.

Link to comment
Share on other sites

For redirection need know redirect target in Unit::AddThreat

this possible 2 ways:

a) from aura (not work without changes: aura self casted and store redirect target data)

:cool: from new variable in Unit (need initialize at spell cast)

b1) if it initilize in effect then

- we can have problem with not reset it at aura remove in case aura apply fail (aura applied after reset in current code)

- at aura save and loading we will not set correctly redirect target

- at spell cast if old aura active redirect target will be lost at old aura remove (aura remove before new apply but after redirect effect apply), cooldown prevent this for normal player but not for GM.

b2) if it initilized in aura then

- we not have like problems, but need way to get correct target in aura (aura self casted and then not have any target information for redirect target)

a, b2 is hack, b1 isn't safe

Link to comment
Share on other sites

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