[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.
This commit is contained in:
Treeston authored and Ovahlord committed 2020-07-22 13:43:23 +02:00
1 parent f21877e00f
commit ec04d3b2cd
218 files changed
+1021 -1105

No files matched your search

+2 -2
View File
@@ -4653,9 +4653,9 @@ class spell_gen_blink : public SpellScriptLoader
{
if (Creature* caster = GetCaster()->ToCreature())
{
if (HostileReference* ref = caster->getThreatManager().getCurrentVictim())
if (Unit* target = caster->GetThreatManager().GetCurrentVictim())
{
ref->setThreat(0.0f);
caster->GetThreatManager().ResetThreat(target);
if (caster->IsAIEnabled)
{
caster->CastSpell(target, SPELL_BLINK_TARGET, true);