this allows us update creature's death persistent auras, fall died creatures in natural, non hacky way
also fix the bug that creature starts waypoint movement not from begining at respawning. thanks to Grz3s for reporting
TODO: proper solution would be update creatures while in corpse state.
This also would solve problems with death persistent auras that not get updated for died creatures
Spline movement controls movements of server-side controlled units (monster movement, taxi movement, etc).
Proper implementation of effects such as charge, jump, cyclic movement will rely on it.
However, need improve our states system before.
Technical changes:
1. Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
2. Precission increased. There are no more position desync issues since client's position calculation formulas used.
3. Now possible to move by paths with multiple points, send whole path to client.
Inspired by patch suggested by darkstalker
Also
* Remove existed enums for family masks as contra-productive for developement.
* Drop one from horrible hack checks in SpellMgr::IsNoStackSpellDueToSpell
(spells for any fimilies with exactly 0x800 mask) I fail find useful cases
for current spell data with this check. All cases expected work correct without it.
If will some problems detected with this please report for fix in less strange way.
* Implement duel allowed check base at proper area flag AREA_FLAG_DUEL (0x00000040)
This allow duels for example in capital area 4570 and allow/fogbid correctly some other zones and areas.
* Implement duel cancel at leave duel allowed area
* Fixed code for duels work in sunctuary if area allow duels.
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.
Please _not_ add new uint64 storages (local and in structures) for guid values.
A new specialized function SetFactionTemporary for creatures are added. It work just like setFaction but has in addition option to set flags.
The flags determine if default faction should be restored and when; most commonly just before respawn and when reaching home after evade.
SCRIPT_COMMAND_SET_FACTION for DB scripts and ACTION_T_SET_FACTION for creature_ai_scripts are now capable of using the system (documentation updated)
The intention of the system is to be able to solve basic events that include faction changes, with the use of database only and in easier ways.
It is advised that DB devs revise current database scripts to check if changes should be made. The same goes for EventAI devs regarding ACTION_T_SET_FACTION.
Signed-off-by: NoFantasy <nofantasy@nf.no>
- Unit::CalculateSpellDuration split into two functions
- CalculateSpellDuration taking into account combo points and caster-side spell mods
- Unit::CalculateAuraDuration taking into account target-side spell mods
- Diminishing is now applied before duration reduction mods
- Implement saving per-effect periodic timers to DB (required for auras affected by haste)