* Add a new function: Unit::IsSecondChoiceTarget to evaluate if a target will be selected
* Cleanup a bit related code
* SelectHostileTarget
- Only call AI()->AttackStart for new targets
- Remove exception for top-most taunter
* Fix a few minor bugs related to selectNextVictim
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
Thanks to Silverice for feedback!
This system interprets the content of the table `creature_linking_template`. To trigger different actions on different events of the npcs that are linked together.
Possible event/ action combinations can be taken form the flags in CreatureLinkingMgr.h::CreatureLinkingFlags
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.