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

[6.x] Core/Spells: Removed a faulty aura handler #17590

Closed
wants to merge 17 commits into from

Conversation

Krudor
Copy link
Contributor

@Krudor Krudor commented Jul 15, 2016

Changes proposed:

  • Remove faulty generic removal of auras triggered by spells

Target branch(es): 6x

Tests performed: Build and in-game tested

Description:
Currently, auras triggered by SPELL_AURA_PERIODIC_TRIGGER_SPELL are improperly being removed upon the parent aura's removal.
Auras that do obey this behavior will now properly have it handled by Unit::RemoveAurasWithInterruptFlags when called upon, see Unit.h AURA_INTERRUPT_FLAG_...

If anyone knows if this applies to 3.3.5 branch as well, leave a comment and I'll fix the target branches.

…ations

Instances have since MoP (Possibly even Cataclysm) been able to set new
locations for players when they zone into the instance.

A theoretic example of this could be after a certain boss has been
defeated, a new entrance location is set to bring players entering the
instance closer to the relevant content.
A real example would be Siege of Orgrimmar changing entrance locations
many times as the raid progresses.

Added SetEntranceLocation for setting entrance locations that will be
saved to DB the next time the instance is saved, and
SetTemporaryEntranceLocation for when you don't want the value to be
saved to the database.
@Shauren
Copy link
Member

Shauren commented Jul 15, 2016

what interrupt flag?

@Krudor
Copy link
Contributor Author

Krudor commented Jul 15, 2016

None in particular...?
"AURA_INTERRUPT_FLAG_..." = any aura interrupt flags.
Unit::RemoveAurasWithInterruptFlags removes the need for this incredibly generic and absolutely missfunctioning method.

@Krudor
Copy link
Contributor Author

Krudor commented Jul 15, 2016

RemoveAurasWithInterruptFlags properly interrupts auras when needed, since the spells have the interrupt flags, and this function just goes in and removes all triggered auras, with no exceptions.

@Shauren
Copy link
Member

Shauren commented Jul 15, 2016

I really don't see how this will work as expected for proc trinkets applying a buff which in turn periodically triggers another buff.
Example of such trinket http://www.wowhead.com/item=34427/blackened-naaru-sliver
Notice the triggered stacking buff has no duration on it.

@Krudor
Copy link
Contributor Author

Krudor commented Jul 15, 2016

The exception should not govern the general behavior.
You can easily make exceptions from this with scripts / db entries.

The fact is that this function is completely 100% wrong

@Shauren
Copy link
Member

Shauren commented Jul 15, 2016

I gave examples of why its needed, expecting some proof on why this function is wrong now

@Krudor
Copy link
Contributor Author

Krudor commented Jul 15, 2016

Okay fair enough, so where would be best to fix these cases, can it be done in db?

@Krudor
Copy link
Contributor Author

Krudor commented Jul 15, 2016

These are spells that periodically applies an aura, and then expires, expecting the aura to still be applied.
http://www.wowhead.com/spell=100051/submerge
http://www.wowhead.com/spell=122547/draw-power

@Krudor
Copy link
Contributor Author

Krudor commented Jul 16, 2016

I'm pretty sure Blizzard does not design spells like the one you linked anymore.
The ones I've seen with similiar behavior in later expansions now have durations.

I think it's best to just deal with the spells like the one that you just linked and handle them case by case with a spellscript / db entry (not sure if db can deal with this).

@Shauren
Copy link
Member

Shauren commented Jul 16, 2016

In this case I think you should provide such script for the trinkets that are known to be broken by this

@Krudor
Copy link
Contributor Author

Krudor commented Jul 16, 2016

I don't mind.

@Krudor
Copy link
Contributor Author

Krudor commented Jul 16, 2016

Shall I update this PR with the spell proc fixes or make a new one, refering to this PR?

@Krudor
Copy link
Contributor Author

Krudor commented Jul 16, 2016

Added some aura proc fixes to this PR, let me know if you want separate them.

@QAston
Copy link
Contributor

QAston commented Jul 19, 2016

The aura scripts could be replaced by a single generic script, so that it can be easily added to other spells using db, and would save a LOT of code duplication.

Just check in validate() if the spell has a correct aura with existing triggered spell, and in register() register the handler only to that effect. No need to check if the spell you're scripting exists in db as the script loader does that for you, you only need to check existence of spells you're referencing.

@Krudor
Copy link
Contributor Author

Krudor commented Jul 19, 2016

I disagree with using a single script to handle multiple spells, just because some of them happen to use the same behavior as other scripts.

@Aokromes
Copy link
Member

This branch has conflicts that must be resolved
Use the command line to resolve conflicts before continuing.

@Aokromes
Copy link
Member

This branch has conflicts that must be resolved
Use the command line to resolve conflicts before continuing.
Conflicting files
src/server/scripts/Spells/spell_item.cpp

@Shauren
Copy link
Member

Shauren commented Oct 15, 2016

Files changed: 575? That can't be right

@ghost
Copy link

ghost commented Oct 15, 2016

Happened in commit d4dd6e2 (the latest one) from what I can see.
Reset the branch back to previous commit and then rebase or merge origin before pushing the update.

@Krudor
Copy link
Contributor Author

Krudor commented Oct 15, 2016

Yeah I tried updating from base branch, and got a load of merge errors that I can't fix, not sure what happened.

@Krudor Krudor force-pushed the spell_triggered_aura_removal branch from d4dd6e2 to 5cad011 Compare October 15, 2016 12:45
@Krudor
Copy link
Contributor Author

Krudor commented Oct 15, 2016

Not showing up in history, but I've reverted the bad merges, let's see if I can do it right this time

@Krudor
Copy link
Contributor Author

Krudor commented Oct 15, 2016

Alright, seems to have solved it.

@ghost
Copy link

ghost commented Oct 15, 2016

Looks a lot better, it should be good to test for other users now. 👍

@Shauren Shauren closed this in ad16014 Oct 15, 2016
@Krudor Krudor deleted the spell_triggered_aura_removal branch March 15, 2017 18:18
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

5 participants