mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-31 09:33:47 +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:
@@ -232,7 +232,7 @@ public:
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_UNEQUIP));
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 1, uint32(EQUIP_UNEQUIP));
|
||||
me->AttackStop();
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCastSelf(SPELL_VANISH_VISUAL);
|
||||
|
||||
@@ -91,7 +91,7 @@ public:
|
||||
}
|
||||
DoCast(me, SPELL_AVATAR);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
events.ScheduleEvent(EVENT_START_PURSUIT, 2s);
|
||||
events.ScheduleEvent(EVENT_STOP_PURSUIT, 15s);
|
||||
events.ScheduleEvent(EVENT_AVATAR, 45s, 50s);
|
||||
|
||||
@@ -164,7 +164,7 @@ struct boss_jeklik : public BossAI
|
||||
if (events.IsInPhase(PHASE_ONE) && !HealthAbovePct(50))
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_BAT_FORM);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
events.SetPhase(PHASE_TWO);
|
||||
events.CancelEventGroup(PHASE_ONE);
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ public:
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetStandState(UNIT_STAND_STATE_SLEEP);
|
||||
me->AttackStop();
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
WasDead = true;
|
||||
CheckPhaseTransition();
|
||||
Talk(EMOTE_THEKAL_DIES);
|
||||
@@ -245,7 +245,7 @@ public:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
DoCast(target, SPELL_CHARGE);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
AttackStart(target);
|
||||
}
|
||||
context.Repeat(15s, 22s);
|
||||
@@ -407,7 +407,7 @@ public:
|
||||
|
||||
if (DoGetThreat(me->GetVictim()))
|
||||
{
|
||||
DoModifyThreatPercent(me->GetVictim(), -100);
|
||||
DoModifyThreatByPercent(me->GetVictim(), -100);
|
||||
}
|
||||
|
||||
context.Repeat(17s, 27s);
|
||||
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
// shapeshift at 50% health
|
||||
DoCast(me, SPELL_VENOXIS_TRANSFORM);
|
||||
Talk(SAY_VENOXIS_TRANSFORM);
|
||||
DoResetThreat();
|
||||
DoResetThreatList();
|
||||
|
||||
// phase two events (snakeform)
|
||||
events.ScheduleEvent(EVENT_VENOM_SPIT, 5000, 0, PHASE_TWO);
|
||||
|
||||
Reference in New Issue
Block a user