mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
refactor(Core/Combat): Code style and improvement of ThreatMgr (#12992)
This commit is contained in:
@@ -320,7 +320,7 @@ public:
|
||||
{
|
||||
Talk(SAY_YSONDRE_SUMMON_DRUIDS);
|
||||
|
||||
auto const& attackers = me->GetThreatMgr().getThreatList();
|
||||
auto const& attackers = me->GetThreatMgr().GetThreatList();
|
||||
uint8 attackersCount = 0;
|
||||
|
||||
for (const auto attacker : attackers)
|
||||
|
||||
@@ -111,7 +111,7 @@ bool NPCStaveQuestAI::IsFairFight()
|
||||
{
|
||||
Unit* unit = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid());
|
||||
|
||||
if (!(*itr)->getThreat())
|
||||
if (!(*itr)->GetThreat())
|
||||
{
|
||||
// if target threat is 0 its fair, this prevents despawn in the case when
|
||||
// there is a bystander since UpdateVictim adds nearby enemies to the threatlist
|
||||
|
||||
@@ -138,7 +138,7 @@ struct NPCStaveQuestAI : public ScriptedAI
|
||||
ObjectGuid gossipPlayerGUID;
|
||||
ObjectGuid playerGUID;
|
||||
bool encounterStarted;
|
||||
ThreatContainer::StorageType const& threatList = me->GetThreatMgr().getThreatList();
|
||||
ThreatContainer::StorageType const& threatList = me->GetThreatMgr().GetThreatList();
|
||||
|
||||
std::map<int, int> entryKeys = {
|
||||
{ ARTORIUS_NORMAL_ENTRY, 1 },
|
||||
|
||||
Reference in New Issue
Block a user