Jump to content

[9080] [FIX] Some spells number of targets limitation


Guest kamillys
 Share

Recommended Posts

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

Patch fixes number of targets for 4 spells: Curse of the Plaguebringer, Poison Bolt Volley and their heroic versions. It limits to 3 targets(as Wowhead says).

For which repository revision was the patch created?

damnit... 8280 as my DB says? Don't Remember

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

No/I didn't search.

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

My idea how to fix and I wrote it.

diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 2d894fb..f97a6dd 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1426,6 +1426,16 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,UnitList& TagUnitMap)
        default:
            break;
    }
+    switch(m_spellInfo->Id)
+    {
+        case 29213: // Curse of the Plaguebringer
+        case 54835: // Curse of the Plaguebringer (H)
+        case 28796: // Poison Bolt Volley
+        case 54098: // Poison Bolt Volley (H)
+                unMaxTargets = 3;
+        default:
+            break;
+    }

    Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);
    for(Unit::AuraList::const_iterator m = mod.begin(); m != mod.end(); ++m)

It can be done for every "custom" spell, including Circle of Healing etc.... I'm working on CoH, soon will be posted in new thread if not here.

==EDIT==

Addition for CoH(I don't have players for test it, but should work)

        //Circle of Healing + ranks
       case 34861: //1
       case 34863: //2
       case 34864: //3
       case 34865: //4
       case 34866: //5
       case 34868: //6
       case 34869: //7
               unMaxTargets = 5;

Link to comment
Share on other sites

for CoH maybe should be done in different part, but at least Poison Bolt Volley and Curse of the Plaguebringer should be done here, because targets are random.

Glyph for CoH is also supported, because there is

Unit::AuraList const& mod = m_caster->GetAurasByType(SPELL_AURA_MOD_MAX_AFFECTED_TARGETS);

and other part for it.

==EDIT==

Yes, CoH shall be done like Wild Growth, because my patch forces to affect only nearest targets. In case of damaging spells it should be done like my patch. As of http://www.wowhead.com/?npc=15953 says: "Faerlina will launch a Poison Bolt Volley, hitting the 3 closest to her players" and some things cannot be done in SD2. It is possible to manually remove but this makes no sense. Although description of spell 28796 is bad :P

Link to comment
Share on other sites

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