Jump to content

[9960][fix] Glyph of Drain Soul


Guest DonTomika

Recommended Posts

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

This patch should fix Glyph of Drain Soul, and also change the text displayed on the client when you create a soul shard from "You receive item: [soul Shard]" to "You create: [soul Shard]" - it's looks a bit silly when the spell procs and you see

You create: [soul Shard].

You receive item: [soul Shard].

in the chat, and it's not blizzlike.

For which repository revision was the patch created?

7966

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

Didn't find any.

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 1c3cf83..0cde5f8 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2971,11 +2971,19 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
        if(spellInfo->EffectItemType[m_effIndex] == 0)
            return;

-        // Soul Shard only from non-grey units
-        if( spellInfo->EffectItemType[m_effIndex] == 6265 &&
-            (victim->getLevel() <= MaNGOS::XP::GetGrayLevel(caster->getLevel()) ||
-             victim->GetTypeId()==TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim)) )
-            return;
+        // Soul Shard
+        if (spellInfo->EffectItemType[m_effIndex] == 6265)
+        {
+            // Only from non-grey units
+            if ((victim->getLevel() <= MaNGOS::XP::GetGrayLevel(caster->getLevel()) ||
+                victim->GetTypeId() == TYPEID_UNIT && !((Player*)caster)->isAllowedToLoot((Creature*)victim)))
+                return;
+
+            // Glyph of Soul Shard
+            if ((caster->HasAura(58070)) && (roll_chance_i(5)))
+                caster->CastSpell(caster, 58068, true, NULL, NULL, 0);
+        }
+
        //Adding items
        uint32 noSpaceForCount = 0;
        uint32 count = m_modifier.m_amount;
@@ -2991,7 +2999,7 @@ void Aura::HandleChannelDeathItem(bool apply, bool Real)
        }

        Item* newitem = ((Player*)caster)->StoreNewItem(dest, spellInfo->EffectItemType[m_effIndex], true);
-        ((Player*)caster)->SendNewItem(newitem, count, true, false);
+        ((Player*)caster)->SendNewItem(newitem, count, true, true);
    }
}


Note that we don't know the real proc chance on offi, but according to the comments posted on wowhead it's somewhere around 5%.

Link to comment
Share on other sites

  • 11 months later...
×
×
  • 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