TrinityCore icon indicating copy to clipboard operation
TrinityCore copied to clipboard

[Spell] King of the Jungle

Open ghost opened this issue 14 years ago • 19 comments

When This UPDATE spell_proc_event SET procFlags = 16384 WHERE entry in (48492,48494,48495); Update Happend

This Talent [King of the Jungle] Dont Works Anymore http://www.wowhead.com/spell=48495 http://www.wowhead.com/spell=48494 http://www.wowhead.com/spell=48492

Last Revision

ghost avatar Jul 14 '12 17:07 ghost

Confirmed

texen avatar Jul 15 '12 08:07 texen

reopen this issue talent is bug because https://github.com/TrinityCore/TrinityCore/commit/1036b0863b349c61bf65d48e7b2750d296a1ae5f

milotic avatar Jul 15 '12 16:07 milotic

yep, not working; no energy is restored nor dmg is increased in bear form.

Thars avatar Jul 16 '12 09:07 Thars

proc system need fix, not talent

Vincent-Michael avatar Jul 27 '12 19:07 Vincent-Michael

You know what its the fix?

pininaz avatar Jul 27 '12 19:07 pininaz

close i use druid in the https://github.com/TrinityCore/TrinityCore/commit/bf22bc11d377fb5aed49d77fca0626fb2d298433 and tiger fury work fine. kandera fix this in https://github.com/TrinityCore/TrinityCore/commit/061439d1125475c7314741fe6c3b7d12e39db967

milotic avatar Jul 28 '12 17:07 milotic

Still bugged.

Note: Pweeeeze fix it :D

Core revision: Trinity Core 0b98656b2878+ Database revision: TDB 335.11.48 Addons: Anticheat1

Crysicle avatar Aug 06 '12 15:08 Crysicle

confirm, King of the Jungle does not restore energy.

kirkita avatar Aug 19 '12 16:08 kirkita

Confirm on https://github.com/TrinityCore/TrinityCore/commit/b007fd70c07d9c61b1e111181edd3fe02eb51ed3

lordl00k avatar Aug 22 '12 08:08 lordl00k

Any news?

Nano-GG avatar Aug 29 '12 06:08 Nano-GG

UPDATE spell_proc_event SET procFlags = 1024 WHERE entry in (48492,48494,48495);

With this update the talent will work again, but I'm not sure if it bugs other things out.

ghost avatar Aug 29 '12 18:08 ghost

Confirming, it doesn't restore energy.

Core revision: Trinity Core 31dd9de0680d+ Database revision: TDB 335.11.48

syphor64 avatar Sep 12 '12 14:09 syphor64

Any news?

ApaxD avatar Sep 15 '12 02:09 ApaxD

Not sure if hack but I see no reason to have it in the proc system. This can be a lot improved (generic SpellScript), but i just want to have feedback if that's an okayish solution.

DELETE FROM spell_proc_event WHERE entry IN(48492,48494,48495);
DELETE FROM spell_script_names WHERE spell_id IN(-5217, -5229);
INSERT INTO spell_script_names (spell_id, ScriptName) VALUES
(-5217, 'spell_dru_tiger_s_fury'),
(-5229, 'spell_dru_enrage');
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 2c66da2..afae04b 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -6495,30 +6495,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
                 basepoints0 = CalculatePctN(int32(damage), triggerAmount);
                 break;
             }
-            // King of the Jungle
-            else if (dummySpell->SpellIconID == 2850)
-            {
-                // Effect 0 - mod damage while having Enrage
-                if (effIndex == 0)
-                {
-                    if (!(procSpell->SpellFamilyFlags[0] & 0x00080000) || procSpell->SpellIconID != 961)
-                        return false;
-                    triggered_spell_id = 51185;
-                    basepoints0 = triggerAmount;
-                    target = this;
-                    break;
-                }
-                // Effect 1 - Tiger's Fury restore energy
-                else if (effIndex == 1)
-                {
-                    if (!(procSpell->SpellFamilyFlags[2] & 0x00000800) || procSpell->SpellIconID != 1181)
-                        return false;
-                    triggered_spell_id = 51178;
-                    basepoints0 = triggerAmount;
-                    target = this;
-                    break;
-                }
-            }
             break;
         }
         case SPELLFAMILY_ROGUE:
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp
index b213f3d..df62966 100755
--- a/src/server/scripts/Spells/spell_druid.cpp
+++ b/src/server/scripts/Spells/spell_druid.cpp
@@ -34,6 +34,9 @@ enum DruidSpells
     DRUID_SURVIVAL_INSTINCTS            = 50322,
     DRUID_SAVAGE_ROAR                   = 62071,
     SPELL_DRUID_ITEM_T8_BALANCE_RELIC   = 64950,
+    SPELL_KING_OF_THE_JUNGLE_R1           = 48492,
+    SPELL_TIGER_S_FURY_ENERGIZE           = 51178,
+    SPELL_ENRAGE_MOD_DAMAGE               = 51185,
 };

 // 54846 Glyph of Starfire
@@ -644,6 +647,60 @@ class spell_dru_insect_swarm : public SpellScriptLoader
         }
 };

+class spell_dru_tiger_s_fury : public SpellScriptLoader
+{
+    public:
+        spell_dru_tiger_s_fury() : SpellScriptLoader("spell_dru_tiger_s_fury") { }
+
+        class spell_dru_tiger_s_fury_SpellScript : public SpellScript
+        {
+            PrepareSpellScript(spell_dru_tiger_s_fury_SpellScript);
+
+            void OnHit()
+            {
+                if (AuraEffect const* aurEff = GetHitUnit()->GetAuraEffectOfRankedSpell(SPELL_KING_OF_THE_JUNGLE_R1, EFFECT_1))
+                    GetHitUnit()->CastCustomSpell(SPELL_TIGER_S_FURY_ENERGIZE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetHitUnit(), true);
+            }
+
+            void Register()
+            {
+                AfterHit += SpellHitFn(spell_dru_tiger_s_fury_SpellScript::OnHit);
+            }
+        };
+
+        SpellScript* GetSpellScript() const
+        {
+            return new spell_dru_tiger_s_fury_SpellScript();
+        }
+};
+
+class spell_dru_enrage : public SpellScriptLoader
+{
+    public:
+        spell_dru_enrage() : SpellScriptLoader("spell_dru_enrage") { }
+
+        class spell_dru_enrage_SpellScript : public SpellScript
+        {
+            PrepareSpellScript(spell_dru_enrage_SpellScript);
+
+            void OnHit()
+            {
+                if (AuraEffect const* aurEff = GetHitUnit()->GetAuraEffectOfRankedSpell(SPELL_KING_OF_THE_JUNGLE_R1, EFFECT_0))
+                    GetHitUnit()->CastCustomSpell(SPELL_ENRAGE_MOD_DAMAGE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetHitUnit(), true);
+            }
+
+            void Register()
+            {
+                AfterHit += SpellHitFn(spell_dru_enrage_SpellScript::OnHit);
+            }
+        };
+
+        SpellScript* GetSpellScript() const
+        {
+            return new spell_dru_enrage_SpellScript();
+        }
+};
+
 void AddSC_druid_spell_scripts()
 {
     new spell_dru_glyph_of_starfire();
@@ -659,4 +716,6 @@ void AddSC_druid_spell_scripts()
     new spell_dru_savage_roar();
     new spell_dru_survival_instincts();
     new spell_dru_insect_swarm();
+    new spell_dru_tiger_s_fury();
+    new spell_dru_enrage();
 }

Warpten avatar Sep 15 '12 10:09 Warpten

2>..............\Trinity\Trinity Core\TrinityCore\src\server\scripts\Spells\spell_druid.cpp(720) : error C2061: error de sintaxis : identificador 'spell_dru_tiger_s_fury'

ApaxD avatar Sep 15 '12 16:09 ApaxD

got the auras backwards. the enrage one is effect 0 and the tigers fury is effect 1

Star-lion avatar Sep 17 '12 14:09 Star-lion

Well thats precisely what i did @Kandera :(

Warpten avatar Sep 17 '12 14:09 Warpten

shush you!

Star-lion avatar Sep 17 '12 15:09 Star-lion

well done

ghost avatar Sep 17 '12 19:09 ghost