refactor(Core/Combat): implement compatiblity layer for ResetAllThreat() (#11778)

* implement ResetAllThreat()

* .
This commit is contained in:
Maelthyr
2022-05-17 17:01:25 +02:00
committed by GitHub
parent 758463ffe1
commit 5ede1177c5
17 changed files with 23 additions and 20 deletions

View File

@@ -619,7 +619,7 @@ public:
me->SetDisableGravity(false);
break;
case EVENT_START_PHASE_3_LAND:
me->getThreatMgr().resetAllAggro();
me->getThreatMgr().ResetAllThreat();
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
me->SetTarget(me->GetVictim()->GetGUID());
AttackStart(me->GetVictim());
@@ -632,7 +632,7 @@ public:
// ///////////////////////////
case EVENT_PHASE_4_START:
me->CastSpell(me, SPELL_DEMON_TRANSFORM_1, true);
me->getThreatMgr().resetAllAggro();
me->getThreatMgr().ResetAllThreat();
me->GetMotionMaster()->MoveChase(me->GetVictim(), 35.0f);
events.Reset();
events.ScheduleEvent(EVENT_SPELL_SHADOW_BLAST, 11000);
@@ -655,7 +655,7 @@ public:
break;
case EVENT_REMOVE_DEMON_FORM:
me->CastSpell(me, SPELL_DEMON_TRANSFORM_1, true);
me->getThreatMgr().resetAllAggro();
me->getThreatMgr().ResetAllThreat();
events.Reset();
if (summons.HasEntry(NPC_MAIEV_SHADOWSONG))
{

View File

@@ -355,7 +355,7 @@ public:
void HandleScriptEffect(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
GetCaster()->getThreatMgr().resetAllAggro();
GetCaster()->getThreatMgr().ResetAllThreat();
if (roll_chance_i(33))
if (Unit* target = GetCaster()->GetAI()->SelectTarget(SelectTargetMethod::Random, 0, 30.0f, true))