[3.3.5] Combat/Threat rewrite - prep & refactor (#19966)

* Combat/Threat rewrite (PR #19930) prep work. Mostly refactors, and a compatibility layer on ThreatManager/HostileReference that allows scripts to be changed already.

(cherry picked from commit e2a1ccd118d129b96e09ff1a15ed0adb1d4a3897)
This commit is contained in:
Treeston
2020-08-13 22:46:44 +02:00
committed by Shauren
parent 2c99678118
commit 8be23fcbbd
187 changed files with 981 additions and 1133 deletions
+1 -1
View File
@@ -1347,7 +1347,7 @@ class spell_warl_soulshatter : public SpellScriptLoader
{
Unit* caster = GetCaster();
if (Unit* target = GetHitUnit())
if (target->CanHaveThreatList() && target->getThreatManager().getThreat(caster) > 0.0f)
if (target->CanHaveThreatList() && target->GetThreatManager().IsThreatenedBy(caster, true))
caster->CastSpell(target, SPELL_WARLOCK_SOULSHATTER, true);
}