Commit Graph

22 Commits

Author SHA1 Message Date
ratkosrb 8e0150ee26 Some spell target check changes. 2023-11-05 06:51:59 +02:00
Wall a27f97d2ba Fix XML Whitespace & Comments (#1996) 2023-07-04 12:56:09 +03:00
ratkosrb 1b2bdf2fbf Delay far sight guid updates. 2022-12-13 22:44:27 +02:00
namreeb dfb90c5880 Logging rewrite (#1519) 2022-10-06 16:34:56 +03:00
ratkosrb b2c5ba5789 Add intermediary SpellCaster class to hold common parts of Unit and GameObject. 2021-04-24 04:42:03 +03:00
ratkosrb d54dbd66c2 Cleanup header dependencies. 2021-04-12 14:34:00 +03:00
ratkosrb b5111a3ca4 Fix issues with The Great Masquerade. 2021-02-28 19:39:33 +02:00
ratkosrb 8ed340bb98 Fix transport progress pre 1.9.
Huge thanks to Hiperzone!
2020-04-07 02:41:01 +03:00
Kittnz dbe7c59332 Core/Objects: increase sight range of all objects & correct general default visibility distance (#283)
Some info on range
https://trinitycore.atlassian.net/wiki/spaces/tc/pages/74950924/Lua+Scene+Script+Documentation#LuaSceneScriptDocumentation-ActorAOIRange

Port from: https://github.com/TrinityCore/TrinityCore/commit/83e6fde0664cf8ab0c425e574781262893e7b226

Co-authored-by: ratkosrb <35845488+ratkosrb@users.noreply.github.com>
2020-02-10 21:43:55 +02:00
ratkosrb e806acc769 Apply clang tidy fixes. (#330) 2019-12-24 06:23:40 +02:00
ratkosrb 49b9a82244 Switch to east const style. 2019-12-21 00:45:35 +02:00
ratkosrb 66659fe13f Cleanup and reorganization of Unit and SpellEntry headers. (#312)
* Move some unit and spell defines to dedicated header.

* Reorder functions in unit header.

* Clean up until spell category.

* Finish cleaning up spell functions.

* Cleanup combat system methods.

* Done cleaning up unit header.

* Reduce not needed includes.
2019-11-24 22:20:44 +02:00
ratkosrb df76eff1d3 Fix a ton of warnings found using clang. (#308) 2019-11-20 20:27:36 +02:00
ratkosrb 6567663210 Fix issues with area auras casted by a gameobject.
Closes https://github.com/vmangos/core/issues/275
2019-10-06 13:31:48 +03:00
ratkosrb 428aa18976 Implement gameobject spell casting (#271)
* Some initial work.

* More work.

* Just a few more errors fixed.

* More progress.

* Fixed all errors in main spell code.

* It compiles!

* Change order of function declarations.

* Fix healing effects.

* Remove empty lines.

* Try to fix travis build.

* Fix old version of Slice and Dice.

* Headers cleanup.

* Move gameobjects list back to unit class.
2019-09-18 23:40:41 +03:00
ratkosrb 539bae6c9c Make SpellEntry related functions into class members. 2019-05-05 16:02:36 +03:00
Prithu Parker cad7b13ed3 Revert "Revert "Fix area aura and channel spell tick loss by syncing updates with the caster (#1099)""
This reverts commit 10a58e326b.
2017-10-14 12:28:13 +11:00
Prithu 10a58e326b Revert "Fix area aura and channel spell tick loss by syncing updates with the caster (#1099)"
This reverts commit 094f55e879.

# Conflicts:
#	src/game/Objects/Unit.cpp
2017-09-11 20:25:28 +10:00
Prithu Parker a7f8c58c60 Implement customisable visibility modifier for world objects that allows draw distance to extend beyond normal distance
- This can only be used for active objects, as they are the only objects that will update outside of normal draw distance
- Active objects are stored on the map, and added to player visibility updates based on their visibility modifier (or standard draw distance if none)
2017-09-01 01:42:05 +10:00
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