Jump to content

[fix] Glyph of Guardian Spirit


Guest Danstahr

Recommended Posts

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

Added support for Glyph of Guardian Spirit (reset CD of GS if the target survives without consuming the GS)

For which repository revision was the patch created?

10148

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

No

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

Me, Danstahr

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index bdef8e4..97ee619 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -7147,6 +7148,28 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
                }
            }
        }
+        //Glyph of Guardian Spirit
+        if (spellProto->Id == 47788)
+        {
+            if (!(m_removeMode == AURA_REMOVE_BY_EXPIRE))
+                return;
+            if (target->IsInWorld() && GetStackAmount()>0)
+            {
+                if (caster)
+                    if (caster->HasAura(63231))
+                    {
+                        ((Player*)caster)->RemoveSpellCooldown(47788,true); //server CD set
+                        ((Player*)caster)->AddSpellCooldown(47788,0,time(NULL)+60);
+                        WorldPacket data(SMSG_SPELL_COOLDOWN,8+1+4+4); //client CD set
+                        data << caster->GetGUID();
+                        data << uint8(0x0);
+                        data << spellProto->Id;
+                        data << uint32(60000);
+                        ((Player*)caster)->GetSession()->SendPacket(&data);
+                    }
+                        
+            }
+        }
    }
}

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