mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 09:33:47 +00:00
refactor(Core): Rename ...Manager to ...Mgr (#6910)
* Rename MapManager.h to MapMgr.h * Rename BanManager.h to BanMgr.h * Rename MapManager.cpp to MapMgr.cpp * Rename BanManager.cpp to BanMgr.cpp * Rename MapRefManager.h to MapRefMgr.h * Rename ThreatManager.h to ThreatMgr.h * Rename GridRefManager.h to GridRefMgr.h * Rename ThreatManager.cpp to ThreatMgr.cpp * Rename GroupRefManager.h to GroupRefMgr.h * Rename HostileRefManager.h to HostileRefMgr.h * Rename HostileRefManager.cpp to HostileRefMgr.cpp * Rename MMapManager.h to MMapMgr.h * Rename FollowerRefManager.h to FollowerRefMgr.h * Rename VMapManager2.h to VMapMgr2.h * Rename IVMapManager.h to IVMapMgr.h * Rename MMapManager.cpp to MMapMgr.cpp * Rename VMapManager2.cpp to VMapMgr2.cpp * Rename RefManager.h to RefMgr.h * Rename WaypointManager.h to WaypointMgr.h * Rename WaypointManager.cpp to WaypointMgr.cpp * Rename MPQManager.h to MPQMgr.h * Rename MPQManager.cpp to MPQMgr.cpp * Rename IMMAPManager.h to IMMAPMgr.h * fix build * Update Main.cpp * chore(Core/Misc): Remove toxic language * Revert "chore(Core/Misc): Remove toxic language" * fix build * build
This commit is contained in:
@@ -142,7 +142,7 @@ public:
|
||||
me->setFaction(35);
|
||||
events.Reset();
|
||||
Talk(TEXT_EADRIC_DEATH);
|
||||
me->getThreatManager().clearReferences();
|
||||
me->getThreatMgr().clearReferences();
|
||||
me->SetRegeneratingHealth(false);
|
||||
_EnterEvadeMode();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -289,7 +289,7 @@ public:
|
||||
me->setFaction(35);
|
||||
events.Reset();
|
||||
Talk(TEXT_PALETRESS_DEATH);
|
||||
me->getThreatManager().clearReferences();
|
||||
me->getThreatMgr().clearReferences();
|
||||
me->SetRegeneratingHealth(false);
|
||||
_EnterEvadeMode();
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->getHostileRefManager().setOnlineOfflineState(false);
|
||||
me->getHostileRefMgr().setOnlineOfflineState(false);
|
||||
}
|
||||
|
||||
void OnCharmed(bool apply) override
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)) )
|
||||
{
|
||||
me->getThreatManager().resetAllAggro();
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->AddThreat(target, 10000.0f);
|
||||
AttackStart(target);
|
||||
me->CastSpell(target, SPELL_MINIONS_CHARGE, false);
|
||||
@@ -736,7 +736,7 @@ public:
|
||||
uint8 rnd = LIST.size() > 1 ? urand(0, LIST.size() - 1) : 0;
|
||||
if( Unit* target = ObjectAccessor::GetUnit(*me, LIST.at(rnd)) )
|
||||
{
|
||||
me->getThreatManager().resetAllAggro();
|
||||
me->getThreatMgr().resetAllAggro();
|
||||
me->AddThreat(target, 10000.0f);
|
||||
AttackStart(target);
|
||||
me->CastSpell(target, SPELL_MINIONS_CHARGE, false);
|
||||
|
||||
@@ -89,16 +89,16 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
|
||||
void RecalculateThreat()
|
||||
{
|
||||
ThreatContainer::StorageType const& tList = me->getThreatManager().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->getThreatManager().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->getThreatManager().modifyThreatPercent(pUnit, -100);
|
||||
//me->getThreatManager().doAddThreat(pUnit, 10000000.0f * threatMod);
|
||||
if (HostileReference* ref = me->getThreatManager().getOnlineContainer().getReferenceByTarget(pUnit))
|
||||
me->getThreatMgr().modifyThreatPercent(pUnit, -100);
|
||||
//me->getThreatMgr().doAddThreat(pUnit, 10000000.0f * threatMod);
|
||||
if (HostileReference* ref = me->getThreatMgr().getOnlineContainer().getReferenceByTarget(pUnit))
|
||||
ref->addThreat(10000000.0f * threatMod);
|
||||
}
|
||||
}
|
||||
@@ -164,7 +164,7 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
|
||||
uint32 EnemiesInRange(float distance)
|
||||
{
|
||||
ThreatContainer::StorageType const& tList = me->getThreatManager().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 )
|
||||
@@ -178,7 +178,7 @@ struct boss_faction_championsAI : public ScriptedAI
|
||||
|
||||
Unit* SelectEnemyCaster(bool casting, float range)
|
||||
{
|
||||
ThreatContainer::StorageType const& tList = me->getThreatManager().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