refactor(Core/Combat): Code style and improvement of ThreatMgr (#12992)

This commit is contained in:
Maelthyr
2022-09-25 20:20:34 +02:00
committed by GitHub
parent ddcf0e79b6
commit 1f472bddd3
61 changed files with 212 additions and 196 deletions

View File

@@ -245,7 +245,7 @@ public:
{
PreventHitEffect(effIndex);
if (Unit* target = GetHitUnit())
GetCaster()->GetThreatMgr().modifyThreatPercent(target, -20);
GetCaster()->GetThreatMgr().ModifyThreatByPercent(target, -20);
}
void Register() override

View File

@@ -126,7 +126,7 @@ public:
Unit* FindHatefulStrikeTarget()
{
Unit* target = nullptr;
ThreatContainer::StorageType const& threatlist = me->GetThreatMgr().getThreatList();
ThreatContainer::StorageType const& threatlist = me->GetThreatMgr().GetThreatList();
for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i)
{
Unit* unit = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid());