mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
refactor(Core/ScriptedAI): few improvements with threat methods (#13146)
improve threat scripts Co-authored-by: Maelthyrr <lynethris@protonmail.ch>
This commit is contained in:
@@ -835,7 +835,7 @@ public:
|
||||
_flyTargetGUID.Clear();
|
||||
me->RemoveAura(SPELL_LIGHTNING_TENDRILS);
|
||||
me->RemoveAura(61883);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
break;
|
||||
case EVENT_ENRAGE:
|
||||
Talk(SAY_BRUNDIR_BERSERK);
|
||||
|
||||
@@ -412,7 +412,7 @@ public:
|
||||
|
||||
if (_feralRushTimer >= 6000)
|
||||
{
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
|
||||
@@ -1184,7 +1184,7 @@ public:
|
||||
break;
|
||||
case EVENT_DETONATING_LASHER_FLAME_LASH:
|
||||
me->CastSpell(me->GetVictim(), SPELL_FLAME_LASH, false);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
if (Unit* target = SelectTargetFromPlayerList(80))
|
||||
AttackStart(target);
|
||||
else
|
||||
|
||||
@@ -1033,7 +1033,7 @@ public:
|
||||
break;
|
||||
case 4:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
Phase = 4;
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
if (Unit* target = SelectTargetFromPlayerList(75.0f))
|
||||
@@ -1613,7 +1613,7 @@ public:
|
||||
break;
|
||||
case 4:
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
Phase = 4;
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
if (Unit* target = SelectTargetFromPlayerList(75.0f))
|
||||
|
||||
@@ -518,7 +518,7 @@ public:
|
||||
Talk(EMOTE_PERMA_GROUND);
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
me->DisableRotate(false);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
Unit* target = SelectTarget(SelectTargetMethod::MaxDistance, 0, 0.0, true);
|
||||
if (!target)
|
||||
target = me->SelectNearestPlayer(200.0f);
|
||||
|
||||
@@ -552,7 +552,7 @@ public:
|
||||
summons.DoAction(ACTION_SIF_JOIN_FIGHT, pred);
|
||||
}
|
||||
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
if (Player* player = GetArenaPlayer())
|
||||
me->AddThreat(player, 1000.0f);
|
||||
}
|
||||
|
||||
@@ -1511,7 +1511,7 @@ public:
|
||||
{
|
||||
if (who && damagetype == DIRECT_DAMAGE)
|
||||
{
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
me->AddThreat(who, 100000);
|
||||
AttackStart(who);
|
||||
me->InterruptNonMeleeSpells(false);
|
||||
@@ -1539,7 +1539,7 @@ public:
|
||||
return;
|
||||
|
||||
me->CastSpell(me, SPELL_DIMINISH_POWER, false);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user