aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Spells
diff options
context:
space:
mode:
authorTreeston <treeston.mmoc@gmail.com>2017-07-01 20:18:02 +0200
committerShauren <shauren.trinity@gmail.com>2017-07-01 20:18:02 +0200
commite2a1ccd118d129b96e09ff1a15ed0adb1d4a3897 (patch)
treebbe6600c4066078bb7c64a117df457dce0d00b26 /src/server/scripts/Spells
parent5879eb2198fdb976b9fff136757bf8187adb6cf0 (diff)
[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.
Diffstat (limited to 'src/server/scripts/Spells')
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp2
-rw-r--r--src/server/scripts/Spells/spell_warlock.cpp2
2 files changed, 2 insertions, 2 deletions
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);
}
}