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
Conversation
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? |
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
|
Rev: 302623a Current behavior (on clean TrinityCore):
|
Thank you for confirming the issue on recent source. Have you tested if this patch works for you? :) |
Gonna test tonight, i think this might fix a few other bugs aswell |
any news here @Kittnz ? |
@@ -3271,6 +3271,10 @@ void Spell::handle_immediate() | |||
m_caster->AddInterruptMask(m_spellInfo->ChannelInterruptFlags); | |||
SendChannelStart(duration); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespaces
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, will fix.
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
what's the current status of this PR ? |
same status as before, finished |
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 ? |
@jackpoz I was wondering the same thing, but I guess it isn't intended. |
@robinsch : any idea if the thing jackpoz and ShinDarth mention is something that can be fixed here? |
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. |
I'm using the fix from the PR was created and always was what Jack said |
Care to continue working on this PR, @robinsch ? Or do you want to have it closed? |
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. |
Oh well. We will be needing a new PR, then. |
Sorry for being late :P |
this is correct, the problem is that pet follow movement cancels the channeling. |
merge? |
@ShinDarth still have problem |
@ShinDarth : it appears that this PR does not solve the issue it was supposed to solve. |
then why is it still open? |
Well, I did not consider the option. Usually it is the TC devs who decide if it should be closed or not. |
Needs improvement, but the fix works. (Work if he dont move on start cast) |
@Keader isn't that the default behaviour on current TC (without this PR) ? |
Nop, without the PR to get cast (with void stopped) and the player to move, the cast is cut to follow the owner. |
If u want to solve the issue, add something like a check in petai update Without this, creatures wont stop on channelings |
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. |
i haven't found anything not working since i tested this pr (just local build) |
@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 ? |
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). |
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: 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... |
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. |
So this works perfectly without the PR so no need anymore for this PR? |
@Kittnz Dont need anymore |
ok, closing. |
OK, so at least I got to clean off one more branch from my repo. :-p |
Great, another closed PR, up to the next 👍 |
#14813 (comment) The original problem is still there... |
It needs to be fixed by someone who knows how to handle it in the current source. Edit: the existing problem is documented in the actual issue #14054 which is still open. |
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