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 / Ruby Sanctum] Baltharus Warborn cast interrupt by UpdateSplineMovement #18549

Closed
Keader opened this issue Dec 21, 2016 · 13 comments
Closed

Comments

@Keader
Copy link
Member

Keader commented Dec 21, 2016

Description: Cast of spell 76221 (SPELL_BARRIER_CHANNEL) is interrupted by movement

Expected behaviour: Cast of SPELL_BARRIER_CHANNEL should be interrupted only when Baltharus enter combat

Steps to reproduce the problem:

  1. go to Baltharus (.go crea id 39751)
  2. observe channel cast

Callstack from Spell::cancel() -> https://gist.github.com/Keader/943ee8c122814a0370c09b2e291e7d91

Looks like similar problem fixed in 90a5811

Branch(es): 3.3.5

TC rev. hash/commit: c809c22

@ghost
Copy link

ghost commented Dec 22, 2016

@Keader
Try this, movement shouldn't be allowed if channel is interrupted by movement

diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 8394ca7..f1c49d5 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -1211,7 +1211,7 @@ bool SpellInfo::IsChanneled() const
 
 bool SpellInfo::IsMoveAllowedChannel() const
 {
-    return IsChanneled() && HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING);
+    return IsChanneled() && (HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING) || (ChannelInterruptFlags & (AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING)));
 }
 
 bool SpellInfo::NeedsComboPoints() const

@Keader
Copy link
Member Author

Keader commented Dec 22, 2016

@xinef1 Tested and does not work for Baltharus

@ghost
Copy link

ghost commented Dec 22, 2016

@Keader Well, spell 76221 has 0x1000101F channelinterruptflags (both AURA_INTERRUPT_FLAG_MOVE and AURA_INTERRUPT_FLAG_TURNING). This means that some movegen allows to move without checking for IsMovementPreventedByCasting
At the first glance, the channel is cast at reset function (which appears directly after evade or init). Try moving it to JustReachedHome and see if it helps.

I also got this in spellmgr, maybe helpful:

		// Barrier Channel
		case 76221:
			spellInfo->ChannelInterruptFlags &= ~(AURA_INTERRUPT_FLAG_TURNING|AURA_INTERRUPT_FLAG_MOVE);
			spellInfo->EffectImplicitTargetA[EFFECT_0] = TARGET_UNIT_NEARBY_ENTRY;
			break;

@ghost
Copy link

ghost commented Dec 26, 2016

@Keader Update his orientation to 4,76864 (the angle at which he faces the trigger with channel) and apply #18595

@Keader
Copy link
Member Author

Keader commented Dec 26, 2016

[214] GUID: Full: 0xF130009B4700BB4A Type: Creature Entry: 39751 (Baltharus the Warborn) Low: 47946
[214] Object Type: Unit (3)
[214] Update Flags: Living, StationaryObject (96)
[214] Movement Flags: None (0)
[214] Extra Movement Flags: None (0)
[214] Time: 2333322435
[214] Position: X: 3153.061 Y: 389.4861 Z: 86.25955
[214] Orientation: 5.637414

Current orientation is right.
And without change orientation #18595 dont work for me

@ghost
Copy link

ghost commented Dec 26, 2016

Then he needs a hook in spellmgr, you can check yourself that he changes orientation and this causes the channel to interrupt.

@Keader
Copy link
Member Author

Keader commented Jan 21, 2017

@xinef1 i tested today with #18549 (comment) and still dont work. He still interrupt cast

@ghost
Copy link

ghost commented Jan 21, 2017

@Keader Update his orientation to 4,76864 or remove AURA_INTERRUPT_FLAG_TURNING|AURA_INTERRUPT_FLAG_MOVE from ChannelInterruptFlags

@Keader
Copy link
Member Author

Keader commented Jan 21, 2017

already changed orientation to 4.76864 and dont work.
Not tested remove this flags

@ghost
Copy link

ghost commented Jan 21, 2017

Fuzzy eps is too small to compensate for change from loaded db orientation to GetAngle(target)

ariel- added a commit that referenced this issue Jan 22, 2017
@ariel-
Copy link
Contributor

ariel- commented Jan 22, 2017

Reopening, turning state doesn't get removed, if I add remove state in Creature::ReleaseFocus, spell is again cancelled.

This is not due to eps diff (creature orient is 5.637414, faces 4.76864).
What needs to be done here is don't cancel own channeling when we're facing just to start the channel

@ariel- ariel- reopened this Jan 22, 2017
ariel- added a commit that referenced this issue Jan 22, 2017
partial revert of 6b55fab

Simply removing the unit state in Creature::ReleaseFocus causes #18549 again
Aokromes pushed a commit to Aokromes/TrinityCore that referenced this issue Jan 22, 2017
Aokromes pushed a commit to Aokromes/TrinityCore that referenced this issue Jan 22, 2017
partial revert of 6b55fab

Simply removing the unit state in Creature::ReleaseFocus causes TrinityCore#18549 again
@ariel-
Copy link
Contributor

ariel- commented Apr 24, 2017

No longer an issue in 522f537

@Keader
Copy link
Member Author

Keader commented Jan 3, 2019

Just for references: 5a2f0ce#diff-4522eeffcbc961602e86620011a2d579 removed fix made by ariel

Shauren pushed a commit that referenced this issue Jun 15, 2019
…ng to face target

Closes #18549

(cherrypicked from 6b55fab)
(cherrypicked from  c83092a)
TheGhostGroup pushed a commit to TheGhostGroup/TrinityCore that referenced this issue Jan 29, 2022
…ng to face target

Closes TrinityCore#18549

(cherrypicked from 6b55fab)
(cherrypicked from  c83092a)

(cherry picked from commit 6135ee1)
TheGhostGroup pushed a commit to TheGhostGroup/TrinityCore that referenced this issue Mar 17, 2022
…ng to face target

Closes TrinityCore#18549

(cherrypicked from 6b55fab)
(cherrypicked from  c83092a)

(cherry picked from commit 6135ee1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants