mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
refactor(Core/Combat): Code style and improvement of ThreatMgr (#12992)
This commit is contained in:
@@ -893,7 +893,7 @@ class spell_gen_knock_away : public SpellScript
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Unit* target = GetHitUnit())
|
||||
if (Creature* caster = GetCaster()->ToCreature())
|
||||
caster->GetThreatMgr().modifyThreatPercent(target, -25); // Xinef: amount confirmed by onyxia and void reaver notes
|
||||
caster->GetThreatMgr().ModifyThreatByPercent(target, -25); // Xinef: amount confirmed by onyxia and void reaver notes
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -999,7 +999,7 @@ class spell_gen_hate_to_zero : public SpellScript
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
if (Unit* target = GetHitUnit())
|
||||
if (Creature* caster = GetCaster()->ToCreature())
|
||||
caster->GetThreatMgr().modifyThreatPercent(target, -100);
|
||||
caster->GetThreatMgr().ModifyThreatByPercent(target, -100);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -699,7 +699,7 @@ class spell_warl_soulshatter : public SpellScript
|
||||
Unit* caster = GetCaster();
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
if (target->CanHaveThreatList() && target->GetThreatMgr().getThreat(caster) > 0.0f)
|
||||
if (target->CanHaveThreatList() && target->GetThreatMgr().GetThreat(caster) > 0.0f)
|
||||
caster->CastSpell(target, SPELL_WARLOCK_SOULSHATTER, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user