mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-13 23:43:44 +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:
@@ -429,7 +429,7 @@ public:
|
||||
{
|
||||
case SPELL_CLAW_N:
|
||||
case SPELL_CLAW_H:
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 30.0f))
|
||||
{
|
||||
me->AddThreat(target, 100.0f);
|
||||
|
||||
@@ -927,7 +927,7 @@ public:
|
||||
Player* player = itr->GetSource();
|
||||
if( player && me->IsInRange(player, 8.0f, 25.0f, false) )
|
||||
{
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
me->AddThreat(player, 5.0f);
|
||||
me->CastSpell(player, SPELL_INTERCEPT, false);
|
||||
break;
|
||||
|
||||
@@ -767,7 +767,7 @@ public:
|
||||
me->RemoveAllAuras();
|
||||
}
|
||||
DoZoneInCombat();
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 250.0f, true) )
|
||||
{
|
||||
if (!next)
|
||||
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
case EVENT_SPELL_FEL_STEAK:
|
||||
if( Unit* target = SelectTarget(SelectTargetMethod::Random, 0, 44.0f, true) )
|
||||
{
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
me->AddThreat(target, 50000.0f);
|
||||
me->CastSpell(target, SPELL_FEL_STEAK_MORPH, true);
|
||||
me->CastSpell(target, SPELL_FEL_STEAK, true);
|
||||
|
||||
@@ -593,7 +593,7 @@ struct boss_jormungarAI : public ScriptedAI
|
||||
}
|
||||
me->UpdatePosition(Locs[LOC_CENTER].GetPositionX() + cos(angle)*dist, Locs[LOC_CENTER].GetPositionY() + std::sin(angle)*dist, me->GetPositionZ(), me->GetOrientation(), true);
|
||||
me->StopMovingOnCurrentPos();
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
|
||||
events.RescheduleEvent(EVENT_EMERGE, 6000);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user