Commit Graph

3 Commits

Author SHA1 Message Date
Prithu 094f55e879 Fix area aura and channel spell tick loss by syncing updates with the caster (#1099)
* Now cache whether the current spell is channeled on DynamicObjects, and prevent deletion of the object if it is from a channeled spell
- Fixes premature channel ending when the object despawns before the cast finshes

* Now update SpellAuraHolders for channeled spells on Spell::update to ensure the durations remain synced
Now cache whether the spell is channeled

* Now add aura holder to spell cast for synced updates in channeled area auras
Implemented method to sync periodic ticks with remaining aura duration

* Add aura holders to channeled spell caster holder list when a unit enters the area of a dynamic object
Now sync persistent effect ticks with the remaining aura duration

* No longer process channeled spell holders on target unit update, instead they are now updated in the caster's spell update
Now buffer unit spell updates (mostly only applicable for players) rather than updating twice per world update if the unit is a player
Fixed an issue where channeled AoE spells initiated with CastSpell were having a unique target set, which caused them to cancel if the unit moved out of the area of effect

* Replaced const_iterator usage with plain iterators when performing changes

* Implemented additional aura remove types

* Implemented passive periodic aura tick syncing on application - the aura still currently updates separately, so it can eventually desync
Added new aura remove types to area/persistent aura removal calls
Fixed an issue with persistent area auras where all holders of the same spell from different casters would be removed if a unit left the range of one
Removed redundant arcane missiles cancellation

* Updated RemoveSpellAuraHolder channel handling to coincide with new system

* Fixed an issue causing double interrupts for channeled spells which are delayed to 0 duration
Implemented removal of aura holders from channeled spells, which can occur when other actions remove the holder (eg, Divine Shield)
Now remove all remaining holders on units when a channel is ended

* Fixed another case where channeled spells were being interrupted more than once

* Fixed a bug which was preventing pushback during channeling from having any effect on the aura holder, allowing the full amount of ticks sometimes (depending on spell duration and hit timing)

* Fixed aura tick timers not being updated on area aura application

* Fixed totems not updating on the final tick before despawn

* Area auras now tick in accordance with the caster's update timer to ensure ticks remain synced and none are lost (eg totems)

* Fixed order of finish and channel update on FinishSpell

* Removed double interrupt call on mod possess end

* Now handle removal of holders from the channeled holders list during spell updates more robustly

* Now handle some aura remove modes in spell update for efficiency, while allowing others to be handled normally

* No longer check through list of channeled holders on AddChanneledHolders, instead we check before calling for better efficiency

* Updated some comments, removed some debug logging

* Fixed missing parenthesis - merge broke?
2017-06-29 08:25:15 +01:00
StadenElysium 43452c0d9c License update (#27) 2017-03-15 17:27:20 +00:00
shenna c9151a5715 Initial Commit / Core Files 2017-03-10 00:38:11 +03:00