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/Spells: Fix redundant mod charge drop and spell crit calc #16186

Merged
merged 1 commit into from Jan 9, 2016

Conversation

ariel-
Copy link
Contributor

@ariel- ariel- commented Jan 4, 2016

Note that critical is already calculated in Spell::DoAllEffectOnLaunchTarget()

@ariel- ariel- changed the title Core/Spells: Fix redundant mod charge and spell crit calc Core/Spells: Fix redundant mod charge drop and spell crit calc Jan 4, 2016
@Keader
Copy link
Member

Keader commented Jan 4, 2016

Work \o/

@ariel-
Copy link
Contributor Author

ariel- commented Jan 5, 2016

Note that this will fix only duplicated modSpell consuming, there is still issue of Aura stacks not synchronizing properly with the charges.

Detailed explanation in #15529 (comment)

@jackpoz
Copy link
Member

jackpoz commented Jan 7, 2016

could a solution to the other issue require to revert this PR ? maybe it's better to find a solution for all the cases ?

@ariel-
Copy link
Contributor Author

ariel- commented Jan 7, 2016

Not necessarily, IsSpellCrit is more than an observer, it calculates crit chance for a spell using active crit spellmods, and in doing so removes the charge from the spellmod.

This PR only replaces the (extra, IMO) call to IsSpellCrit, using member TargetInfo::crit, this member is already initialized with proper value (crit or not), as stated, in Spell::DoAllEffectOnLaunchTarget()

jackpoz added a commit that referenced this pull request Jan 9, 2016
Core/Spells: Fix redundant mod charge drop and spell crit calc
@jackpoz jackpoz merged commit b39216e into TrinityCore:3.3.5 Jan 9, 2016
@ariel- ariel- deleted the spellmodcharges branch January 11, 2016 02:43
Carbenium pushed a commit that referenced this pull request Jan 20, 2016
Core/Spells: Fix redundant mod charge drop and spell crit calc
(cherry picked from commit b39216e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants