mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 11:25:42 +00:00
Core/Combat: rename getThreatMgr() to GetThreatMgr() (#11758)
This commit is contained in:
@@ -155,7 +155,7 @@ public:
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
events.Reset();
|
||||
Talk(TEXT_EADRIC_DEATH);
|
||||
me->getThreatMgr().clearReferences();
|
||||
me->GetThreatMgr().clearReferences();
|
||||
me->SetRegeneratingHealth(false);
|
||||
_EnterEvadeMode();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
me->SetFaction(FACTION_FRIENDLY);
|
||||
events.Reset();
|
||||
Talk(TEXT_PALETRESS_DEATH);
|
||||
me->getThreatMgr().clearReferences();
|
||||
me->GetThreatMgr().clearReferences();
|
||||
me->SetRegeneratingHealth(false);
|
||||
_EnterEvadeMode();
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
|
||||
@@ -296,7 +296,7 @@ public:
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)) )
|
||||
{
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(target, 10000.0f);
|
||||
AttackStart(target);
|
||||
me->CastSpell(target, SPELL_MINIONS_CHARGE, false);
|
||||
@@ -749,7 +749,7 @@ public:
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)) )
|
||||
{
|
||||
me->getThreatMgr().ResetAllThreat();
|
||||
me->GetThreatMgr().ResetAllThreat();
|
||||
me->AddThreat(target, 10000.0f);
|
||||
AttackStart(target);
|
||||
me->CastSpell(target, SPELL_MINIONS_CHARGE, false);
|
||||
|
||||
@@ -102,16 +102,16 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
|
||||
void RecalculateThreat()
|
||||
{
|
||||
ThreatContainer::StorageType const& tList = me->getThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType const& tList = me->GetThreatMgr().getThreatList();
|
||||
for( ThreatContainer::StorageType::const_iterator itr = tList.begin(); itr != tList.end(); ++itr )
|
||||
{
|
||||
Unit* pUnit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
if( pUnit && pUnit->GetTypeId() == TYPEID_PLAYER && me->getThreatMgr().getThreat(pUnit) )
|
||||
if( pUnit && pUnit->GetTypeId() == TYPEID_PLAYER && me->GetThreatMgr().getThreat(pUnit) )
|
||||
{
|
||||
float threatMod = GetThreatMod(me->GetDistance2d(pUnit), (float)pUnit->GetArmor(), pUnit->GetHealth(), pUnit->GetMaxHealth(), pUnit);
|
||||
me->getThreatMgr().modifyThreatPercent(pUnit, -100);
|
||||
me->GetThreatMgr().modifyThreatPercent(pUnit, -100);
|
||||
//me->getThreatMgr().doAddThreat(pUnit, 10000000.0f * threatMod);
|
||||
if (HostileReference* ref = me->getThreatMgr().getOnlineContainer().getReferenceByTarget(pUnit))
|
||||
if (HostileReference* ref = me->GetThreatMgr().getOnlineContainer().getReferenceByTarget(pUnit))
|
||||
ref->addThreat(10000000.0f * threatMod);
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
|
||||
uint32 EnemiesInRange(float distance)
|
||||
{
|
||||
ThreatContainer::StorageType const& tList = me->getThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType const& tList = me->GetThreatMgr().getThreatList();
|
||||
uint32 count = 0;
|
||||
Unit* target;
|
||||
for( ThreatContainer::StorageType::const_iterator iter = tList.begin(); iter != tList.end(); ++iter )
|
||||
@@ -191,7 +191,7 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
|
||||
Unit* SelectEnemyCaster(bool casting, float range)
|
||||
{
|
||||
ThreatContainer::StorageType const& tList = me->getThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType const& tList = me->GetThreatMgr().getThreatList();
|
||||
Unit* target;
|
||||
for( ThreatContainer::StorageType::const_iterator iter = tList.begin(); iter != tList.end(); ++iter )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user