Jump to content

[Patch] Animal Blood


Guest Patman128

Recommended Posts

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

Fixes the spell Animal Blood (http://www.wowhead.com/spell=46221) The spell should cause the player to cast Spawn Blood Pool (http://www.wowhead.com/spell=63471) when they enter water. This is necessary to acquire the quest items (http://www.wowhead.com/item=45905) for the quest Blood Is Thicker (http://www.wowhead.com/quest=13833)

* For which repository revision was the patch created?

Master

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

I could not find any

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

Myself (patman128)

Patch: http://paste2.org/p/768912

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 35362de..302dba1 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4649,6 +4649,14 @@ void Aura::HandlePeriodicTriggerSpell(bool apply, bool /*Real*/)
                if (m_removeMode == AURA_REMOVE_BY_DEFAULT && GetEffIndex() + 1 < MAX_EFFECT_INDEX)
                    m_target->CastSpell(m_target, m_spellProto->CalculateSimpleValue(SpellEffectIndex(GetEffIndex()+1)), true);
                return;
+            case 46221:                                     // Animal Blood
+                if (m_removeMode == AURA_REMOVE_BY_DEFAULT && m_target->IsInWater())
+                {
+                    LiquidData liquid_status;
+
+                    if (m_target->GetMap()->getLiquidStatus(m_target->GetPositionX(), m_target->GetPositionY(), m_target->GetPositionZ(), MAP_ALL_LIQUIDS, &liquid_status))
+                        m_target->CastSpell(m_target->GetPositionX(), m_target->GetPositionY(), liquid_status.level, 63471, true, NULL, this);
+                }
            case 51912:                                     // Ultra-Advanced Proto-Typical Shortening Blaster
                if (m_removeMode == AURA_REMOVE_BY_DEFAULT && m_duration <= 0)
                {

Link to comment
Share on other sites

Found Typo,

if(m_target->GetMap()->getLiquidStatus(m_target->GetPositionX(), m_target->GetPositionY(), m_target->GetPositionZ(), MAP_ALL_LIQUIDS, &liquid_status))

Change that to

if (m_target->GetMap()->getLiquidStatus(m_target->GetPositionX(), m_target->GetPositionY(), m_target->GetPositionZ(), MAP_ALL_LIQUIDS, &liquid_status))

Link to comment
Share on other sites

  • 7 months later...

Revision 10829:

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 09cace4..dea6a80 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -4619,9 +4619,19 @@ void Aura::HandlePeriodicTriggerSpell(bool apply, bool /*Real*/)
                    target->CastSpell(target, 32612, true, NULL, this);

                return;
-            case 42783:                                     //Wrath of the Astrom...
+            case 42783:                                     // Wrath of the Astrom...
                if (m_removeMode == AURA_REMOVE_BY_EXPIRE && GetEffIndex() + 1 < MAX_EFFECT_INDEX)
                    target->CastSpell(target, GetSpellProto()->CalculateSimpleValue(SpellEffectIndex(GetEffIndex()+1)), true);
+
+                return;
+            case 46221:                                     // Animal Blood
+                if (target->GetTypeId() == TYPEID_PLAYER && m_removeMode == AURA_REMOVE_BY_DEFAULT && target->IsInWater())
+                {
+                    float position_z = target->GetTerrain()->GetWaterLevel(target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
+                    // Spawn Blood Pool
+                    target->CastSpell(target->GetPositionX(), target->GetPositionY(), position_z, 63471, true);
+                }
+
                return;
            case 51912:                                     // Ultra-Advanced Proto-Typical Shortening Blaster
                if (m_removeMode == AURA_REMOVE_BY_EXPIRE) 

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