refactor(Core/Combat): Code style and improvement of ThreatMgr (#12992)
This commit is contained in:
@@ -187,7 +187,7 @@ public:
|
||||
target = me->GetVictim();
|
||||
else
|
||||
{
|
||||
ThreatContainer::StorageType const& t_list = me->GetThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType const& t_list = me->GetThreatMgr().GetThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr)
|
||||
if (Unit* threatTarget = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (me->IsWithinMeleeRange(threatTarget))
|
||||
|
||||
+1
-1
@@ -221,7 +221,7 @@ public:
|
||||
|
||||
// Xinef: if we have target we currently follow, return
|
||||
if (Unit* target = GetCaster()->GetVictim())
|
||||
if (GetCaster()->GetThreatMgr().getThreat(target) >= 100000.0f)
|
||||
if (GetCaster()->GetThreatMgr().GetThreat(target) >= 100000.0f)
|
||||
return;
|
||||
|
||||
// Xinef: acquire new target
|
||||
|
||||
Reference in New Issue
Block a user