mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
refactor(Core/Combat): Code style and improvement of ThreatMgr (#12992)
This commit is contained in:
@@ -245,7 +245,7 @@ public:
|
||||
{
|
||||
PreventHitEffect(effIndex);
|
||||
if (Unit* target = GetHitUnit())
|
||||
GetCaster()->GetThreatMgr().modifyThreatPercent(target, -20);
|
||||
GetCaster()->GetThreatMgr().ModifyThreatByPercent(target, -20);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user