Jump to content

[patch][6252] Water Shield 3sec Cooldown Between Charges


Auntie Mangos
 Share

Recommended Posts

What bug does the patch fix?

Water Shield has no cooldown between charges use

For which SubVersion revision was the patch created?

5895

Is there a thread in the bug report section?

http://getmangos.eu/community/viewtopic.php?id=24951

Who has been writing this patch?

Ultron

Index: Unit.cpp
===================================================================
--- Unit.cpp                (revision 5895)
+++ Unit.cpp                (working copy)
@@ -5853,6 +5853,31 @@
                                                                return;
                                                }

+                                                //Water Shield (3 secs cooldown between charges)
+                                                if((auraSpellInfo->SpellFamilyFlags & 0x0000002000000000LL) && auraSpellInfo->SpellVisual==7358)
+                                                {
+                                                                if(GetTypeId() != TYPEID_PLAYER)
+                                                                                return;
+
+                                                                uint32 trigger_spell_id = auraSpellInfo->EffectTriggerSpell[triggeredByAura->GetEffIndex()];
+                                                                if(!trigger_spell_id)
+                                                                {
+                                                                                 sLog.outError("Unit::HandleProcTriggerSpell: Spell %u have 0 in EffectTriggered[%d], not handled custom case?",auraSpellInfo->Id,triggeredByAura->GetEffIndex());
+                                                                                 return;
+                                                                }
+
+                                                                if (((Player*)this)->HasSpellCooldown(trigger_spell_id))
+                                                                {
+                                                                                ++triggeredByAura->m_procCharges;
+                                                                                return;
+                                                                }
+
+                                                                CastSpell(this, trigger_spell_id, true, 0, triggeredByAura);
+                                                                // 3 secs cooldown
+                                                                ((Player*)this)->AddSpellCooldown(trigger_spell_id,0,time(NULL) + 3);
+                                                                return;
+                                                }
+
                                                //Lightning Shield (overwrite non existing triggered spell call in spell.dbc
                                                if((auraSpellInfo->SpellFamilyFlags & 0x00000400) && auraSpellInfo->SpellVisual==37)
                                                {

http://filebeam.com/013b8b7a2af9cc31d7f2d1d6bb9d8880

Link to comment
Share on other sites

  • 38 years later...
  • 1 month later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • 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