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

Core/spell: SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING must allow melee attack #11311

Open
cooler-SAI opened this issue Dec 13, 2013 · 28 comments
Open

Comments

@cooler-SAI
Copy link
Contributor

Core: 4ca6341

Database - Last TDB 335

Commit: Learn Shared Bonds Spell http://www.wowhead.com/spell=34789
Try use it - nothing happend
This Spell needs for Dreghood Drudge http://www.wowhead.com/npc=18122

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Killyana
Copy link
Contributor

Killyana commented May 10, 2015

The spell casted is http://www.wowhead.com/spell=34789 but the problem is that for some reason it disable creature movement and attacks

UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (18122,18123) ;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18122,18123) AND `source_type`=0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(18122, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 11, 34788, 0, 0, 0, 0, 0, 11, 18122, 20, 0, 0, 0, 0,0,'Dreghood Drudge - On aggro - Cast Shared Bonds'),
(18123, 0, 0, 0, 4, 0, 100, 0, 0, 0, 0, 0, 11, 34788, 0, 0, 0, 0, 0, 11, 18123, 20, 0, 0, 0, 0,0,'Wrekt Slave - On aggro - Cast Shared Bonds'),
(18123, 0, 1, 0, 0, 0, 100, 0, 3000, 7000, 8000, 12000, 11, 11978, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0,0,'Wrekt Slave - IC - Cast Kick');

@Killyana
Copy link
Contributor

Killyana commented Feb 5, 2018

The spell 34788 use the attribute SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING = 0x00000001 but it doesn't work properly.
probably related to #17037

@ariel-
Copy link
Contributor

ariel- commented Feb 15, 2018

This is SmartAI issue

@ariel-
Copy link
Contributor

ariel- commented Feb 15, 2018

@Treeston @ccrs: lookup SmartAI::AttackStart and SmartAI::SetCombatMove- ugly stuff

@Treeston
Copy link
Contributor

lookup SmartAI

...do I have to, mommy?

@ariel-
Copy link
Contributor

ariel- commented Feb 15, 2018

Nah, only if you want to see the HORROR

@Treeston
Copy link
Contributor

see cfc77fd, i've had enough SAI code for today, thanks

@ccrs
Copy link
Contributor

ccrs commented Feb 15, 2018

t.t

@ariel-
Copy link
Contributor

ariel- commented Feb 15, 2018

Ok, actually the problem is CreatureAI::UpdateVictim returning early and not calling AttackStart due to Creature::IsFocusing returning true, the problem here being the creature has an infinite duration channel aura, so IsFocusing will keep returning true until the end of times, meaning the creature won't attack and freeze in place staring madly (but not at you, because it has it's focus on the nearby ally target)

ariel- added a commit that referenced this issue Feb 15, 2018
…L_ATTR1_CHANNEL_TRACK_TARGET

- Creatures stuck here wouldn't try attacking because of this
- Remove one workaround in halion script, now it's unneeded

Ref #11311
@Langerz82
Copy link
Contributor

Langerz82 commented Jan 18, 2019

The code has changed since and it was only a matter of the cast flag not being cleared for instant spells. Not sure if this breaks anything else needs further testing.

patch removed

@Killyana
Copy link
Contributor

I tested it, it fixes the issue, but a always it must be reviewed into a PR.

@Killyana
Copy link
Contributor

Killyana commented Jan 18, 2019

It also fix the issue for https://woehead.way-of-elendil.fr/?spell=70960 and https://woehead.way-of-elendil.fr/?spell=40946 and lots of other spells

@Killyana
Copy link
Contributor

Killyana commented Jan 18, 2019

@Langerz82 Your fix is causing any channeled spell to be interrupted by melee attack for example: https://woehead.way-of-elendil.fr/?spell=48156

If I'm not wrong the attribute: AttributesEx5: SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING must be used also to allow melee attack during channeling. #17037

@Keader
Copy link
Contributor

Keader commented Jan 18, 2019

@Killyana melee attack during channel is not allowed right now by default.
Cases that need it, is handled removing UNIT_STATE_CASTING inside of creature script.
Like Flame Leviathan, Loken, etc.

@Killyana
Copy link
Contributor

I tested the fix and it allow the creature to channel the spell and melee the target at the same time, this must jut be apply to spell with the attribute AttributesEx5: SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING

@Keader
Copy link
Contributor

Keader commented Jan 18, 2019

Check: #17131 (comment)

@Langerz82
Copy link
Contributor

Langerz82 commented Jan 18, 2019

Try:

Patch removed as corrupt.

edit: Wait I made a logic error let me update soon!

@Killyana Killyana changed the title [335] Shared Bonds Spell doesn't work Core/spell: SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING must allow melee attack Jan 18, 2019
@Langerz82
Copy link
Contributor

Langerz82 commented Jan 20, 2019

patch removed

There is a bug though, if the player stealths while a projectile in the air it still interrupts stealth, I'll take a look at that. In the mean time can you apply patch and let me know if there are any test cases I have missed?

@Killyana
Copy link
Contributor

On 3.3.5 the result of a cast is calculated when the spell is casted and not when it reaches the target
#577

@Langerz82
Copy link
Contributor

It's still wrong were missiles are clearing. Give me some time to fix.

@Langerz82
Copy link
Contributor

@Keader Iv'e read the other comment can you please outline in summary what will conflict with a test case. If the proposed changes breaks I can re-adjust accordingly.
Forget missiles atm though I'm still working on a fix for that.

@Langerz82
Copy link
Contributor

Langerz82 commented Jan 21, 2019

patch removed

If it breaks anything please let me know what, and the steps to reproduce bug.

@Langerz82
Copy link
Contributor

PR for testing:
#22972

@Killyana
Copy link
Contributor

This Issue is not related to SAI it's just the spell attribute SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING is not implemented properly.
Example:
The spell 70960 has 2 attribute
AttributesEx1: 0x00000040 (SPELL_ATTR1_CHANNELED_2)
AttributesEx5: 0x00000001 (SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING)

SPELL_ATTR1_CHANNELED_2 is used by Tranquility so it cannot be about melee or movements
SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING must in this case allow melee as the spell effect of 70960 is Apply Aura: Mod Melee Haste
I checked all spells that use this attribute and all must allow melee.

@Keader
Copy link
Contributor

Keader commented Jan 22, 2020

I told it to Shauren years ago... Again... check #17131

@Killyana
Copy link
Contributor

Killyana commented Jan 22, 2020

And Shauren is wrong, for a once.

Shauren pushed a commit that referenced this issue Jun 22, 2021
…L_ATTR1_CHANNEL_TRACK_TARGET

- Creatures stuck here wouldn't try attacking because of this
- Remove one workaround in halion script, now it's unneeded

Ref #11311

(cherry picked from commit 29f7258)
@aquadeus
Copy link
Contributor

aquadeus commented May 7, 2022

is this fixed in master?

@Shauren Shauren closed this as completed May 7, 2022
@Shauren Shauren reopened this May 7, 2022
@Shauren
Copy link
Member

Shauren commented May 7, 2022

no

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