Jump to content

Attuned to Nature Freya Spell Ulduar


Guest breakwater

Recommended Posts

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

Fix the Reduce for the buff Attuned to Nature (Freya Buff)

there a three spells, one reduce 25, an other 10 and an other 2.

For which repository revision was the patch created?

11265

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

I dont know

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

me

SQL Part: because ScriptTarget

DELETE FROM spell_script_target WHERE spell_script_target.entry IN (62525,62524,62521);
INSERT INTO spell_script_target (entry, type, targetEntry) VALUES
(62525, 1, 32906), (62524, 1, 32906), (62521, 1, 32906);

Core Part

diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 70578c3..9a67fd7 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -7525,6 +7525,42 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)

                    return;
                }
+                case 62521:                                 // Attuned to Nature 25 Dose Reduction
+                {
+                    if (!unitTarget && unitTarget->GetTypeId() != TYPEID_UNIT)
+                        return;
+                    
+                    if(SpellAuraHolder* natureAura = unitTarget->GetSpellAuraHolder(62519))
+                    {
+                        if(natureAura->ModStackAmount(-25))
+                            unitTarget->RemoveAurasDueToSpell(62519);
+                    }
+                    break;
+                }
+                case 62524:                                 // Attuned to Nature 2 Dose Reduction
+                {
+                    if (!unitTarget && unitTarget->GetTypeId() != TYPEID_UNIT)
+                        return;
+                    
+                    if(SpellAuraHolder* natureAura = unitTarget->GetSpellAuraHolder(62519))
+                    {
+                        if(natureAura->ModStackAmount(-2))
+                            unitTarget->RemoveAurasDueToSpell(62519);
+                    }
+                    break;
+                }
+                case 62525:                                 // Attuned to Nature 10 Dose Reduction
+                {
+                    if (!unitTarget && unitTarget->GetTypeId() != TYPEID_UNIT)
+                        return;
+                    
+                    if(SpellAuraHolder* natureAura = unitTarget->GetSpellAuraHolder(62519))
+                    {
+                        if(natureAura->ModStackAmount(-10))
+                            unitTarget->RemoveAurasDueToSpell(62519);
+                    }
+                    break;
+                }
                case 62705:                                 // Auto-repair
                {
                    if (!unitTarget)

enjoy :D

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