Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.3.5] Core/Pet: Voidwalker Spell 'Consume Shadows' #14813

Closed
wants to merge 1 commit into from
Closed

[3.3.5] Core/Pet: Voidwalker Spell 'Consume Shadows' #14813

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 31, 2015

by @robinsch; closes #14054

Voidwalker should stop moving until it has completed channeling 'Consume Shadows' .

Existing issue: if the Voidwalker moves/follows its owner,
it interrupts itself from casting 'Consume Shadows' :
http://www.wowhead.com/spell=36472/consume-shadows

@ghost
Copy link
Author

ghost commented May 31, 2015

How does this deal with creatures that should channel spells while moving? I assume handle_immediate() is called when the spells are cast, so is it also safe to assume that no creature will ever start legitmately channeling anything while moving, even if the cast is triggered?

http://www.wowhead.com/spell=161199/debilitating-fixation

@ghost ghost changed the title [Core][Pet] Voidwalker Spell: 'Consume Shadows' [3.3.5][Core][Pet] Voidwalker Spell: 'Consume Shadows' May 31, 2015
@robinsch
Copy link
Contributor

You are correct.

From f8bc75bcbb44c79e0b0e69b6887fc6f75c08eec9 Mon Sep 17 00:00:00 2001
From: robinsch <robin.schriever.hude@web.de>
Date: Sun, 31 May 2015 17:14:29 +0200
Subject: [PATCH] Implement SPELL_ATTR_EX5_CAN_CHANNEL_WHEN_MOVING. This will
 not interrupt certain channeling spell casts for moving creatures. By @kvipka

---

diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index 06c58a4..251c83d 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -456,7 +456,7 @@ enum SpellAttr4

 enum SpellAttr5
 {
-    SPELL_ATTR5_UNK0                             = 0x00000001, //  0
+    SPELL_ATTR5_CAN_CHANNEL_WHILE_MOVING         = 0x00000001, //  0 don't interrupt channeling spells when moving
     SPELL_ATTR5_NO_REAGENT_WHILE_PREP            = 0x00000002, //  1 not need reagents if UNIT_FLAG_PREPARATION
     SPELL_ATTR5_UNK2                             = 0x00000004, //  2
     SPELL_ATTR5_USABLE_WHILE_STUNNED             = 0x00000008, //  3 usable while stunned
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index be0501e..3c78540 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2927,7 +2927,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect const* triggered

     // don't allow channeled spells / spells with cast time to be cast while moving
     // (even if they are interrupted on moving, spells with almost immediate effect get to have their effect processed before movement interrupter kicks in)
-    if ((m_spellInfo->IsChanneled() || m_casttime) && m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isMoving() && m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT)
+    if (((m_spellInfo->IsChanneled() && !m_spellInfo->HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHILE_MOVING)) || m_casttime) && m_caster->GetTypeId() == TYPEID_PLAYER && m_caster->isMoving() && m_spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_MOVEMENT)
     {
         SendCastResult(SPELL_FAILED_MOVING);
         finish(false);
@@ -3262,7 +3262,7 @@ void Spell::handle_immediate()
         }

         // interrupt movement at channeled spells for creature case
-        if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->isMoving())
+        if (m_caster->GetTypeId() == TYPEID_UNIT && m_caster->isMoving() && !m_spellInfo->HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHILE_MOVING))
             m_caster->StopMoving();
     }

-- 
1.9.5.msysgit.1

@ghost ghost changed the title [3.3.5][Core][Pet] Voidwalker Spell: 'Consume Shadows' [3.3.5] Core/Pet: Voidwalker Spell 'Consume Shadows' Jun 1, 2015
@FrancescoBorzi
Copy link
Member

Rev: 302623a

Current behavior (on clean TrinityCore):

  • when Voidwalker is moving, you are unable to cast Consume Shadows
  • when is not moving, you can cast Consume Shadows and the Voidwalker will not follow you (unless you manually tell him to follow you)
  • when Voidwalker is casting Consume Shadows and you click on follow button, the Voidwalker will interrupt casting and will follow you

@ghost
Copy link
Author

ghost commented Nov 19, 2015

Thank you for confirming the issue on recent source. Have you tested if this patch works for you? :)

@Kittnz
Copy link
Member

Kittnz commented Nov 20, 2015

Gonna test tonight, i think this might fix a few other bugs aswell

@MitchesD
Copy link
Contributor

MitchesD commented Dec 7, 2015

any news here @Kittnz ?

@@ -3271,6 +3271,10 @@ void Spell::handle_immediate()
m_caster->AddInterruptMask(m_spellInfo->ChannelInterruptFlags);
SendChannelStart(duration);
}

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespaces

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, will fix.

@Kittnz
Copy link
Member

Kittnz commented Dec 8, 2015

turns out it didn't fix the issue i was after, i didn't test the voidwalker yet

by @robinsch; closes  #14054

Voidwalker should stop moving until it has completed channeling 'Consume Shadows'.

Existing issue: if the Voidwalker moves/follows its owner,
it interrupts itself from casting 'Consume Shadows':
http://www.wowhead.com/spell=36472/consume-shadows
@jackpoz
Copy link
Member

jackpoz commented Dec 17, 2015

what's the current status of this PR ?

@ghost
Copy link
Author

ghost commented Dec 17, 2015

Except for keeping it in sync with the TC source, I don't know. I hope @robinsch can tell you more.
Because it was made as a response to @Rushor's issue #14054, I thought he would be interested.

@robinsch
Copy link
Contributor

same status as before, finished

@jackpoz jackpoz self-assigned this Dec 18, 2015
@jackpoz
Copy link
Member

jackpoz commented Dec 19, 2015

If you run, let voidwalker follow you and click on Consume Shadows it will cast it for a moment and then interrupt it and keep following you. Is this intended ?

@FrancescoBorzi
Copy link
Member

@jackpoz I was wondering the same thing, but I guess it isn't intended.

@ghost
Copy link
Author

ghost commented Jan 3, 2016

@robinsch : any idea if the thing jackpoz and ShinDarth mention is something that can be fixed here?

@robinsch
Copy link
Contributor

robinsch commented Jan 4, 2016

No this is not intended as it was how it worked before. 7m old pr so idk if something changed that make this no longer work.

@Keader
Copy link
Member

Keader commented Jan 4, 2016

I'm using the fix from the PR was created and always was what Jack said

@ghost
Copy link
Author

ghost commented Jan 4, 2016

Care to continue working on this PR, @robinsch ? Or do you want to have it closed?

@ChazyTheBest
Copy link
Contributor

I can confirm that (in tbc/wotlk retail) If you are running and click Consume Shadows, the Voidwalker will stop moving and begin the casting. And he won't follow you until he finish (unless you click follow or click attack to a near mob). I remember it perfectly.

@ghost
Copy link
Author

ghost commented Jan 6, 2016

Oh well. We will be needing a new PR, then.

@ChazyTheBest
Copy link
Contributor

Sorry for being late :P

@ccrs
Copy link
Member

ccrs commented Jan 6, 2016

this is correct, the problem is that pet follow movement cancels the channeling.

@FrancescoBorzi
Copy link
Member

merge?

@Keader
Copy link
Member

Keader commented Jan 6, 2016

@ShinDarth still have problem

@ghost
Copy link
Author

ghost commented Jan 6, 2016

@ShinDarth : it appears that this PR does not solve the issue it was supposed to solve.

@FrancescoBorzi
Copy link
Member

then why is it still open?

@ghost
Copy link
Author

ghost commented Jan 6, 2016

Well, I did not consider the option. Usually it is the TC devs who decide if it should be closed or not.

@Keader
Copy link
Member

Keader commented Jan 6, 2016

Needs improvement, but the fix works. (Work if he dont move on start cast)
Just does not work when during attempts to cast while moving. Only need to fix it

@FrancescoBorzi
Copy link
Member

@Keader isn't that the default behaviour on current TC (without this PR) ?

@Keader
Copy link
Member

Keader commented Jan 6, 2016

Nop, without the PR to get cast (with void stopped) and the player to move, the cast is cut to follow the owner.

@ccrs
Copy link
Member

ccrs commented Jan 6, 2016

#14813 (comment)

If u want to solve the issue, add something like a check in petai update

Without this, creatures wont stop on channelings

ccrs referenced this pull request in Treeston/TrinityCore Jan 8, 2016
@FrancescoBorzi
Copy link
Member

If this PR actually solves something, and if it does it in the proper way, I think it can be merged even if there are still other things that needs to be improved... Otherwise it should be closed.

@Kittnz
Copy link
Member

Kittnz commented Jan 10, 2016

i haven't found anything not working since i tested this pr (just local build)

@jackpoz
Copy link
Member

jackpoz commented Jan 10, 2016

@Kittnz what about #14813 (comment) ?

if SPELL_ATTR5_CAN_CHANNEL_WHILE_MOVING has to be implemented, better implement it correctly than half implement it. @robinsch any plan about fixing it in the next days ?

@ccrs
Copy link
Member

ccrs commented Jan 10, 2016

the attribute is implemented correctly, its just the movement calls for each AI the ones that need to be revised (unrelated to the attribute itself).

@ChazyTheBest
Copy link
Contributor

Just to clarify this (it seems there's a lot of confusion going on...). The problem is not the player moving, is about the pet. You can move around your pet or before the distance will trigger the follow mechanism that if the pet is stopped he will be able to cast and finish the channelcast. Once he's channeling, the follow mechanism won't trigger until he finishes (meaning you don't need to stop/wait for him to finish). This is in a clean TrinityCore.

@ShinDarth I don't know why @Keader said that but I just tested in a clean TrinityCore and it's working fine:

screenshot from 2016-01-10 17-54-04

So, the only problem is: when the pet is following and you click the spell, not let him cancel it and follow you until he finishes the channelcast.

This means the PR is not solving anything atm...

@Keader
Copy link
Member

Keader commented Jan 10, 2016

True, last time I tested the TC tava one month out of date, I thought it would make no difference (I had not seen any commits related to that) but apparently did.
Thanks @ChazyTheBest

@Kittnz
Copy link
Member

Kittnz commented Jan 12, 2016

So this works perfectly without the PR so no need anymore for this PR?

@Keader
Copy link
Member

Keader commented Jan 12, 2016

@Kittnz Dont need anymore

@FrancescoBorzi
Copy link
Member

ok, closing.

@ghost
Copy link
Author

ghost commented Jan 12, 2016

OK, so at least I got to clean off one more branch from my repo. :-p

@ghost ghost deleted the vw_consume_shadows branch January 12, 2016 14:35
@Kittnz
Copy link
Member

Kittnz commented Jan 12, 2016

Great, another closed PR, up to the next 👍

@ChazyTheBest
Copy link
Contributor

#14813 (comment) The original problem is still there...

@ghost
Copy link
Author

ghost commented Jan 13, 2016

It needs to be fixed by someone who knows how to handle it in the current source.
When I made this PR, I did it as a service to robinsch who could not make TC Pull Requests in his repo.

Edit: the existing problem is documented in the actual issue #14054 which is still open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants