From e2a1ccd118d129b96e09ff1a15ed0adb1d4a3897 Mon Sep 17 00:00:00 2001 From: Treeston Date: Sat, 1 Jul 2017 20:18:02 +0200 Subject: [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. --- src/server/scripts/Spells/spell_shaman.cpp | 2 +- src/server/scripts/Spells/spell_warlock.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/scripts/Spells') diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 5b89beaee2c..72208d73653 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -1608,7 +1608,7 @@ public: // Threat reduction is around 10% confirmed in retail and from wiki Unit* attacker = eventInfo.GetActor(); if (attacker->IsAlive()) - attacker->getThreatManager().modifyThreatPercent(target, -10); + attacker->GetThreatManager().ModifyThreatByPercent(target, -10); } } } diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 1b602210889..4ff38244435 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1373,7 +1373,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); } } -- cgit v1.2.3