Jump to content

[fix] Not allow chain-casting Bloodlust and Heroism


Guest DonTomika

Recommended Posts

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

This patch should fix two spells: Sated (57724) and Exhaustion (57723). These spells are only checked clientside, so they only prevent casting Bloodlust or Heroism, but does not prevent players from getting the Bloodlust/Heroism buffs.

For example, when there are more than one shamans in a group, Shaman_A can go offline while Shaman_B casts bloodlust. 40 seconds later Shaman_A casts bloodlust too, and everyone in the group gets the haste buff again.

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/Spell.cpp b/src/game/Spell.cpp
index 34332c6..2c986b0 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -5447,6 +5447,11 @@ bool Spell::CheckTarget( Unit* target, uint32 eff )
            return false;
    }

+    // Check Sated & Exhaustion debuffs
+    if (((m_spellInfo->Id == 2825) && (target->HasAura(57724))) ||
+        ((m_spellInfo->Id == 32182) && (target->HasAura(57723))))
+        return false;
+
    //Check targets for LOS visibility (except spells without range limitations )
    switch(m_spellInfo->Effect[eff])
    {

I used hardcoded spell ids, because this patch should only affect 2 spells (no ranks and others), and as far as I know, they should not affect each other (so when a mage gets bloodlust & sated, and later he spellsteals a heroism buff, he should be able to benefit from both buffs). They could be checked with "((m_spellInfo->SpellFamilyName == SPELLFAMILY_SHAMAN) && (m_spellInfo->SpellFamilyFlags == 64))", and a SpellIconID check, but I think it would be too slow and complicated for a simple fix like this.

Link to comment
Share on other sites

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