Jump to content

[One] spell 974


Guest betagan

Recommended Posts

Hi,

This patch tries to fix the following bug:

The threat generated from spell 379 triggered by spell 974 (Shaman's Earth Shield) should be added to the shield's target. So far, it is added to the caster (shaman).

Proof is given by the 3.0.2 Patch Notes:

Patch 3.0.2 (2008-10-14): Earth Shield threat is now added to the healer. Previously the threat was added to the target being healed.

Where Previoulsy does include 2.4.3 (mangos/one).

I created it for repository version: s1009

I wrote "tries to fix" because I do not consider this a good fix. The trade-off is that to have the threat count correctly, I made the healing count towards the target as well. Thus the combat log will read "$target healed $target for .." and I dont think this is the case on retail though I dont know exactly.

diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
index f7acb4f..dfe0aae 100644
--- a/src/game/UnitAuraProcHandler.cpp
+++ b/src/game/UnitAuraProcHandler.cpp
@@ -1498,7 +1498,16 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
                basepoints[0] = triggerAmount;
                target = this;
                triggered_spell_id = 379;
-                break;
+                
+                // simulate Earth Shield be casted by the target, 
+                // thus making the target receive the threat instead of the shaman
+                // trade-off: the healing counts towards the target in combat log
+                CastCustomSpell(target, triggered_spell_id,
+                        basepoints[EFFECT_INDEX_0] ? &basepoints[EFFECT_INDEX_0] : NULL,
+                        NULL,
+                        NULL,
+                        true, castItem, triggeredByAura, this->GetObjectGuid());
+                    return SPELL_AURA_PROC_OK;
            }
            // Lightning Overload
            if (dummySpell->SpellIconID == 2018)            // only this spell have SpellFamily Shaman SpellIconID == 2018 and dummy aura

Any thoughts on this patch or suggestions for a better approach are welcome, ofc.

Betagan

Link to comment
Share on other sites

but this call also meaning that spell power will used from target data instead caster...

In normal way related code work in all version in similar way: caster get always related threat as source of heal

I think threat has been bliz bug. But if this considered importan fucntionality for < 3.x maybe most clear place check into threat distribution code in Spell.

Link to comment
Share on other sites

Uhm, you're right about the spell power :(

But I think the threat redirection was somewhat intended. The status quo however is a real nerf to this spell as you (and the tank) have to be much more careful about it. That's why I'd like it changed.

The Behaviour is the same for spell 33076 as well. This is Prayer of mending (priest).

Did I get your point right, you'd look for a better place in

void Spell::DoAllEffectOnTarget(TargetInfo *target)

or another function in Spell? I tried to avoid that as it means another check whenever any spell is cast but maybe we got to do that :(

PS:

I just read on http://www.wowwiki.com/Prayer_of_Mending that, at least for ProM, the Healing indeed seems to have been counted to the target:

The threat generated by ProM was changed to be given to the casting priest with patch 3.0.2. This was a side effect of changing the way ProM healing was registered so that it counted as the casting priest's healing.

Nothing said about the healing bonuses, however I do think the ones from the originalCaster should still be used

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