Core/Combat: rename getThreatMgr() to GetThreatMgr() (#11758)

This commit is contained in:
Maelthyr
2022-05-18 10:36:57 +02:00
committed by GitHub
parent 8c058791ed
commit c5368816fa
67 changed files with 129 additions and 129 deletions

View File

@@ -335,7 +335,7 @@ public:
if (Player* p = itr->GetSource())
if (p->IsAlive() && p != me->GetVictim() && p->GetGUID() != _offtankGUID && !p->IsGameMaster() && p->GetDistance(me) < 70.0f)
{
float th = me->getThreatMgr().getThreatWithoutTemp(p);
float th = me->GetThreatMgr().getThreatWithoutTemp(p);
if (!target || th > maxThreat)
{
target = p;

View File

@@ -299,7 +299,7 @@ public:
if (events.GetPhaseMask() & PHASE_ONE_MASK && damage >= me->GetPower(POWER_MANA))
{
// reset threat
ThreatContainer::StorageType const& threatlist = me->getThreatMgr().getThreatList();
ThreatContainer::StorageType const& threatlist = me->GetThreatMgr().getThreatList();
for (ThreatContainer::StorageType::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
{
Unit* unit = ObjectAccessor::GetUnit((*me), (*itr)->getUnitGuid());
@@ -930,7 +930,7 @@ public:
ScriptedAI::AttackStart(who);
if (!targetGUID)
{
me->getThreatMgr().ResetAllThreat();
me->GetThreatMgr().ResetAllThreat();
me->AddThreat(who, 1000000.0f);
targetGUID = who->GetGUID();
}

View File

@@ -499,7 +499,7 @@ public:
bool Execute(uint64 /*time*/, uint32 /*diff*/) override
{
_owner->SetReactState(REACT_AGGRESSIVE);
if (!_owner->getThreatMgr().isThreatListEmpty())
if (!_owner->GetThreatMgr().isThreatListEmpty())
if (Unit* target = _owner->SelectVictim())
_owner->AI()->AttackStart(target);
if (!_owner->GetVictim())
@@ -2378,7 +2378,7 @@ public:
{
me->SetControlled(false, UNIT_STATE_ROOT);
if (!me->getThreatMgr().isThreatListEmpty())
if (!me->GetThreatMgr().isThreatListEmpty())
if (Unit* target = me->SelectVictim())
AttackStart(target);
if (!me->GetVictim())

View File

@@ -592,7 +592,7 @@ public:
{
checkTimer = 3000;
me->SetInCombatWithZone();
ThreatContainer::StorageType const& threatList = me->getThreatMgr().getThreatList();
ThreatContainer::StorageType const& threatList = me->GetThreatMgr().getThreatList();
if (!threatList.empty())
for (ThreatContainer::StorageType::const_iterator itr = threatList.begin(); itr != threatList.end(); ++itr)
if (Unit* target = (*itr)->getTarget())

View File

@@ -1773,15 +1773,15 @@ public:
Position myPos = me->GetPosition();
me->NearTeleportTo(c->GetPositionX(), c->GetPositionY(), c->GetPositionZ(), c->GetOrientation());
c->NearTeleportTo(myPos.GetPositionX(), myPos.GetPositionY(), myPos.GetPositionZ(), myPos.GetOrientation());
const ThreatContainer::StorageType me_tl = me->getThreatMgr().getThreatList();
const ThreatContainer::StorageType target_tl = c->getThreatMgr().getThreatList();
const ThreatContainer::StorageType me_tl = me->GetThreatMgr().getThreatList();
const ThreatContainer::StorageType target_tl = c->GetThreatMgr().getThreatList();
DoResetThreat();
for (ThreatContainer::StorageType::const_iterator iter = target_tl.begin(); iter != target_tl.end(); ++iter)
me->getThreatMgr().addThreat((*iter)->getTarget(), (*iter)->getThreat());
me->GetThreatMgr().addThreat((*iter)->getTarget(), (*iter)->getThreat());
c->getThreatMgr().ResetAllThreat();
c->GetThreatMgr().ResetAllThreat();
for (ThreatContainer::StorageType::const_iterator iter = me_tl.begin(); iter != me_tl.end(); ++iter)
c->getThreatMgr().addThreat((*iter)->getTarget(), (*iter)->getThreat());
c->GetThreatMgr().addThreat((*iter)->getTarget(), (*iter)->getThreat());
}
}