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

@@ -325,7 +325,7 @@ public:
return;
// Now lets get archimode threat list
ThreatContainer::StorageType const& t_list = me->getThreatMgr().getThreatList();
ThreatContainer::StorageType const& t_list = me->GetThreatMgr().getThreatList();
if (t_list.empty())
return;
@@ -435,7 +435,7 @@ public:
if (victim && me->IsWithinMeleeRange(victim))
return false;
ThreatContainer::StorageType const& threatlist = me->getThreatMgr().getThreatList();
ThreatContainer::StorageType const& threatlist = me->GetThreatMgr().getThreatList();
if (threatlist.empty())
return false;

View File

@@ -142,7 +142,7 @@ public:
{
std::list<Unit*> targetList;
{
const std::list<HostileReference*>& threatlist = me->getThreatMgr().getThreatList();
const std::list<HostileReference*>& threatlist = me->GetThreatMgr().getThreatList();
for (std::list<HostileReference*>::const_iterator itr = threatlist.begin(); itr != threatlist.end(); ++itr)
if ((*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && (*itr)->getTarget()->getPowerType() == POWER_MANA)
targetList.push_back((*itr)->getTarget());

View File

@@ -421,7 +421,7 @@ class spell_vem_knockback : public SpellScript
{
if (Creature* cCaster = GetCaster()->ToCreature())
{
cCaster->getThreatMgr().modifyThreatPercent(target, -80);
cCaster->GetThreatMgr().modifyThreatPercent(target, -80);
}
}
}

View File

@@ -659,7 +659,7 @@ public:
//Place all units in threat list on outside of stomach
Stomach_Map.clear();
for (std::list<HostileReference*>::const_iterator i = me->getThreatMgr().getThreatList().begin(); i != me->getThreatMgr().getThreatList().end(); ++i)
for (std::list<HostileReference*>::const_iterator i = me->GetThreatMgr().getThreatList().begin(); i != me->GetThreatMgr().getThreatList().end(); ++i)
Stomach_Map[(*i)->getUnitGuid()] = false; //Outside stomach
//Spawn 2 flesh tentacles

View File

@@ -415,7 +415,7 @@ public:
void CastSpellOnBug(Creature* target) override
{
target->SetFaction(FACTION_MONSTER);
target->AI()->AttackStart(me->getThreatMgr().getHostileTarget());
target->AI()->AttackStart(me->GetThreatMgr().getHostileTarget());
target->AddAura(SPELL_MUTATE_BUG, target);
target->SetFullHealth();
}

View File

@@ -191,7 +191,7 @@ class spell_arcane_vacuum : public SpellScript
Unit* hitUnit = GetHitUnit();
if (caster && hitUnit && hitUnit->ToPlayer())
{
caster->getThreatMgr().modifyThreatPercent(hitUnit, -100);
caster->GetThreatMgr().modifyThreatPercent(hitUnit, -100);
caster->CastSpell(hitUnit, SPELL_ARCANE_VACUUM_TP, true);
}
}