mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 07:23:44 +00:00
Core/Combat: rename getThreatMgr() to GetThreatMgr() (#11758)
This commit is contained in:
@@ -116,7 +116,7 @@ public:
|
||||
{
|
||||
me->CastSpell(me, SPELL_INCITE_CHAOS, false);
|
||||
|
||||
std::list<HostileReference*> t_list = me->getThreatMgr().getThreatList();
|
||||
std::list<HostileReference*> t_list = me->GetThreatMgr().getThreatList();
|
||||
for (std::list<HostileReference*>::const_iterator itr = t_list.begin(); itr != t_list.end(); ++itr)
|
||||
{
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
if (!me->IsWithinMeleeRange(me->GetVictim()))
|
||||
{
|
||||
ThreatContainer::StorageType threatlist = me->getThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType threatlist = me->GetThreatMgr().getThreatList();
|
||||
for (ThreatContainer::StorageType::const_iterator i = threatlist.begin(); i != threatlist.end(); ++i)
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, (*i)->getUnitGuid()))
|
||||
if (target->IsAlive() && me->IsWithinMeleeRange(target))
|
||||
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
{
|
||||
PreventHitEffect(effIndex);
|
||||
if (Unit* target = GetHitUnit())
|
||||
GetCaster()->getThreatMgr().modifyThreatPercent(target, -20);
|
||||
GetCaster()->GetThreatMgr().modifyThreatPercent(target, -20);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -618,7 +618,7 @@ public:
|
||||
me->SetDisableGravity(false);
|
||||
break;
|
||||
case EVENT_START_PHASE_3_LAND:
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetTarget(me->GetVictim()->GetGUID());
|
||||
AttackStart(me->GetVictim());
|
||||
@@ -631,7 +631,7 @@ public:
|
||||
// ///////////////////////////
|
||||
case EVENT_PHASE_4_START:
|
||||
me->CastSpell(me, SPELL_DEMON_TRANSFORM_1, true);
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim(), 35.0f);
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOW_BLAST, 11000);
|
||||
@@ -654,7 +654,7 @@ public:
|
||||
break;
|
||||
case EVENT_REMOVE_DEMON_FORM:
|
||||
me->CastSpell(me, SPELL_DEMON_TRANSFORM_1, true);
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
events.Reset();
|
||||
if (summons.HasEntry(NPC_MAIEV_SHADOWSONG))
|
||||
{
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -355,7 +355,7 @@ public:
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
GetCaster()->getThreatMgr().ResetAllThreat();
|
||||
GetCaster()->GetThreatMgr().ResetAllThreat();
|
||||
|
||||
if (roll_chance_i(33))
|
||||
if (Unit* target = GetCaster()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
else
|
||||
{
|
||||
me->resetAttackTimer();
|
||||
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)
|
||||
if (Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (me->IsWithinMeleeRange(unit))
|
||||
|
||||
@@ -994,7 +994,7 @@ public:
|
||||
{
|
||||
PreventHitEffect(effIndex);
|
||||
|
||||
ThreatContainer::StorageType const& ThreatList = GetCaster()-> getThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType const& ThreatList = GetCaster()-> GetThreatMgr().getThreatList();
|
||||
std::list<Unit*> targetList;
|
||||
for (ThreatContainer::StorageType::const_iterator itr = ThreatList.begin(); itr != ThreatList.end(); ++itr)
|
||||
{
|
||||
|
||||
@@ -1741,7 +1741,7 @@ public:
|
||||
// some code to cast spell Mana Burn on random target which has mana
|
||||
if (ManaBurnTimer <= diff)
|
||||
{
|
||||
std::list<HostileReference*> AggroList = me->getThreatMgr().getThreatList();
|
||||
std::list<HostileReference*> AggroList = me->GetThreatMgr().getThreatList();
|
||||
std::list<Unit*> UnitsWithMana;
|
||||
|
||||
for (std::list<HostileReference*>::const_iterator itr = AggroList.begin(); itr != AggroList.end(); ++itr)
|
||||
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
AttackStart(Dragonmaw);
|
||||
}
|
||||
|
||||
HostileReference* ref = me->getThreatMgr().getOnlineContainer().getReferenceByTarget(caster);
|
||||
HostileReference* ref = me->GetThreatMgr().getOnlineContainer().getReferenceByTarget(caster);
|
||||
if (ref)
|
||||
ref->removeReference();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user