[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

+1 -1
View File
@@ -1125,7 +1125,7 @@ class spell_sha_nature_guardian : public SpellScriptLoader
GetTarget()->CastCustomSpell(GetTarget(), SPELL_SHAMAN_NATURE_GUARDIAN, &basePoints0, nullptr, nullptr, true);
if (eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->IsAlive())
eventInfo.GetProcTarget()->getThreatManager().modifyThreatPercent(GetTarget(), -10);
eventInfo.GetProcTarget()->GetThreatManager().ModifyThreatByPercent(GetTarget(), -10);
if (Player* player = GetTarget()->ToPlayer())
player->GetSpellHistory()->AddCooldown(GetSpellInfo()->Id, 0, std::chrono::seconds(GetSpellInfo()->Effects[EFFECT_1].CalcValue()));