* removed hacky update_object call from SetSpellFocus helper
* corrected facing behaivior in SetSpellFocus
* spells with SPELL_ATTR5_DONT_TURN_DURING_CAST will no longer set a target guid for proper clientside facing behaivior
* channeled spells with a destination target will no longer pick a objectTarget
* update serverside orientation for channeled spells with SPELL_ATTR1_CHANNEL_TRACK_TARGET
According to blueposts and wikis, there is a supression to crit chances if the target is having a higher level than the attacker. Each level that the target is above the one of the attacker, the crit chance is reduced by 1%. Though this number is solely based on bluepost data so this needs extensive testing since fan made calculations point more towards 0.7%.
* Online states are now re-evaluated before victim update instead of continuously. Closes#22226. Tagging #21501.
* Victim update now happens every 1s as opposed to every server tick unless current target goes away.
* Suppressed threat is no longer re-established until the victim gains additional threat (by hitting the target, for instance).
* Assistance threat is now split between non-controlled units threatened by target, as opposed to all units threatened by target.
# Conflicts:
# src/server/game/Combat/ThreatManager.cpp
Also, some anti-annoyance treatment for dot tele.
# Conflicts:
# src/server/game/Combat/CombatManager.h
# src/server/game/Combat/ThreatManager.h
# src/server/scripts/Commands/cs_tele.cpp
- PvE combat is now always mutual. UNIT_FLAG_IN_COMBAT is backed by actual references to the units we're in combat with.
- PvP combat is now also tracked, and almost always mutual; spells like Vanish and Feign Death can break this rule. That means we can easily determine a list of players we're fighting.
- By extension, IsInCombatWith now has sensible behavior when invoked on nonplayers.
- Threat and combat systems are no longer the same.
- They still have an enforced relationship (threat implies combat - clearing combat clears threat)...
- ...but we can have combat without threat. A creature (with threat list) isn't considered to be engaged until it has an entry on its threat list...
- ...which means we can now faithfully replicate retail engage behavior. Combat on projectile launch - engagement start on projectile impact. Yay for progress!
- AI method refactor, as already ported in 6113b9d - `JustEngagedWith`, `JustEnteredCombat` and `JustExitedCombat`.
- Vehicle threat is now properly pooled on the main vehicle body (fixes#16542).
- Various edge case bug fixes for threat redirects (Misdirection "cancelling" Vigilance and similar).
- Target re-selection is now significantly faster.
- Fixed a ton of other smaller edge case bugs, probably.
Closes#7951 and #19998.