Jump to content

Shadow Bolt Whirl from Lethon


Guest DaC

Recommended Posts

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

Triggered shadowbolts should always be casted 4 times to each side

For which repository revision was the patch created?

MaNGOS One - latest revision

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

me

Old version was wrong. Now caster will always trigger four sets of shadow bolts to everyone on one side of him. After those four bolts the side will change.

From e8d8c65d1e483016db44ab032526be769c55ba94 Mon Sep 17 00:00:00 2001
From: DaC <[email protected]>
Date: Sat, 11 Jun 2011 19:27:26 +0200
Subject: [PATCH] Fix for Lethons ShadowBoltWhirl

---
src/game/SpellAuras.cpp |   21 ++++++++-------------
1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 80b9198..7d49cc9 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -1069,19 +1069,14 @@ void Aura::TriggerSpell()
//                    case 24832: break;
                    case 24834:                             // Shadow Bolt Whirl
                    {
-                        uint32 spellForTick[8] = { 24820, 24821, 24822, 24823, 24835, 24836, 24837, 24838 };
-                        uint32 tick = GetAuraTicks();
-                        if(tick < 8)
-                        {
-                            trigger_spell_id = spellForTick[tick];
-
-                            // casted in left/right (but triggered spell have wide forward cone)
-                            float forward = target->GetOrientation();
-                            float angle = target->GetOrientation() + ( tick % 2 == 0 ? M_PI_F / 2 : - M_PI_F / 2);
-                            target->SetOrientation(angle);
-                            triggerTarget->CastSpell(triggerTarget, trigger_spell_id, true, NULL, this, casterGUID);
-                            target->SetOrientation(forward);
-                        }
+                        uint32 tick = GetAuraTicks()+7;
+
+                        // casted in left/right (but triggered spell have wide forward cone)
+                        float forward = target->GetOrientation();
+                        float angle = target->GetOrientation() + ( tick % 8 > 3 ? M_PI_F / 2 : - M_PI_F / 2);
+                        target->SetOrientation(angle);
+                        target->CastSpell(target, 24820, true, NULL, this, casterGUID);
+                        target->SetOrientation(forward);
                        return;
                    }
//                    // Stink Trap
-- 
1.7.0.2.msysgit.0

regards, DaC

Link to comment
Share on other sites

  • 3 weeks later...

hmm why don't you use

uint32 tick = GetAuraTicks()+7 % 8;

and

target->CastSpell(target, spellForTick[tick], true, NULL, this, casterGUID); // also you can skip the casterGUID here

other things:

+ target->SetOrientation(angle);

+ target->CastSpell(target, 24820, true, NULL, this, casterGUID);

+ target->SetOrientation(forward);

this will result in no visual orientation change, so I think this might be wrong (isn't it rather the case that he should "slowly" turn around) ?

Edit:

Also you can get unexpected results when the victim of the boss changes or moves (but this is another patch's problem)

No, must work correct this way :)

Other edit:

there are two sets for these spells:

1-trigger aura (above) and 8 triggered spells (which are from classic times)

2-trigger auras (one with other timer!) 2-dmg spells (with other dmg- attributes) (likely from TBC-dbc)

Link to comment
Share on other sites

discussed a little bit in irc...

the real shadowbolts (aoe) is triggered by the permanent aura on the npc.

Orientation should not be visible, he still hit's his target

and all the spells in that array might not be needed, they are all doing the same.

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