Jump to content

[fix] Pygmy Oil effects


Guest Corfen

Recommended Posts

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

This patch would fix Pygmy Oil use effects.

For which repository revision was the patch created?

8052

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

No thread with this problem.

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

Me (Corfen)

core patch:

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index b8fe5b4..6191a6f 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2844,6 +2844,8 @@ void Aura::HandleAuraTransform(bool apply, bool Real)
                }
                // Murloc costume
                case 42365: m_target->SetDisplayId(21723); break;
+                // Pygmy Oil
+                case 53806: m_target->SetDisplayId(14973); break;
                default: break;
            }
        }
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 6f49c82..8553d68 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -755,6 +755,21 @@ void Spell::EffectDummy(uint32 i)
                    m_caster->CastSpell(m_caster, spell_id, true, NULL);
                    return;
                }
+                case 53808:                                 // Pygmy Oil
+                {
+                    if(m_caster->GetTypeId() != TYPEID_PLAYER)
+                        return;
+                    uint32 spell_id = 0;
+                    uint32 roll = urand(0, 99);
+
+                    if(roll < 20)
+                        spell_id = 53806;                    // 20% for 10min Pygmified buff. (off-like chance unknown)
+                    else
+                        spell_id = 53805;                    // You feel a little smaller buff.
+
+                    m_caster->CastSpell(unitTarget,spell_id,true,NULL);
+                    return;
+                }
                case 17251:                                 // Spirit Healer Res
                {
                    if(!unitTarget || !m_originalCaster)
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 99e9806..e615faa 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -1190,6 +1190,11 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) cons
                        (spellInfo_2->Id == 8326 && spellInfo_1->Id == 20584) )
                         return false;

+                    // Pygmy Oil Smaller and Pygmified effect can't be stacked
+                    if( (spellInfo_1->Id == 53806 && spellInfo_2->Id == 53805) ||
+                        (spellInfo_2->Id == 53806 && spellInfo_1->Id == 53805) )
+                         return true;
+
                    break;
                }
                case SPELLFAMILY_WARRIOR:

Patch file

// edit: updated for rev 8052

Link to comment
Share on other sites

  • 3 months later...

the comments i've found would suggest, that an increased consume would increase the chance to become pygmified.

Sooo...

What about getting the stack-count of this size-buff (ID:53805) and roll it against a rand(0, 10). You'd get the Pygm!-Buff definitly with the tenth stack and with a median of 6 or 7 stacks of the size-buff.

eg:

if(stackcount <= rand(0, 10))
   spell_id = 53805;                    // You feel a little smaller buff.
else
   spell_id = 53806;                    // 10min Pygmified buff.

wowwiki: "At 10 stacks you are transformed into a voodoo gnome"

wowhead: "This is the buff u get from drinking 6 - 10 Pygmy Oils in a row"

Link to comment
Share on other sites

I'm pretty sure stack's number is random between 5 and 10, not 0 and 10. (I'm an alchemist & fisherman on offy and I usually create and use 10-15 stacks of pygmy oil every week)

[Edit] Also, the effect that turns you into a gnome removes the 'smaller' buffs from the character.

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