refactor(Core/Combat): DeleteThreatLists() become ClearAllThreat() (#11824)

refactor(Chore/Combat): DeleteThreatLists() become ClearAllThreat()
This commit is contained in:
Maelthyr
2022-05-23 10:51:52 +02:00
committed by GitHub
parent ae3ecb0f1a
commit dfc6adb081
40 changed files with 62 additions and 63 deletions

View File

@@ -523,7 +523,7 @@ public:
if (TeamIdInInstance == TEAM_ALLIANCE)
c->UpdateEntry(NPC_JAINA_PART2);
}
c->DeleteThreatList();
c->GetThreatMgr().ClearAllThreat();
c->CombatStop(true);
c->InterruptNonMeleeSpells(true);
c->GetMotionMaster()->Clear();
@@ -540,7 +540,7 @@ public:
}
if (Creature* c = instance->GetCreature(NPC_LichKingGUID))
{
c->DeleteThreatList();
c->GetThreatMgr().ClearAllThreat();
c->CombatStop(true);
c->InterruptNonMeleeSpells(true);
c->GetMotionMaster()->Clear();
@@ -915,7 +915,7 @@ public:
if (TrashActive[i])
if (Creature* c = instance->GetCreature(NPC_TrashGUID[i]))
{
c->DeleteThreatList();
c->GetThreatMgr().ClearAllThreat();
c->CombatStop(true);
c->InterruptNonMeleeSpells(true);
c->SetUnitFlag(UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NOT_SELECTABLE);
@@ -1126,7 +1126,7 @@ public:
if (Creature* c = instance->GetCreature(NPC_LichKingGUID))
{
c->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
c->DeleteThreatList();
c->GetThreatMgr().ClearAllThreat();
c->CombatStop(true);
c->InterruptNonMeleeSpells(true);
c->SetVisible(false);

View File

@@ -1123,7 +1123,7 @@ public:
return;
me->RemoveEvadeAuras();
me->DeleteThreatList();
me->GetThreatMgr().ClearAllThreat();
me->CombatStop(true);
me->LoadCreaturesAddon(true);
me->SetLootRecipient(nullptr);