mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
fix(Scripts/ZulGurub): Improvements to Jindo the Hexxer (#12395)
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
--
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_brain_wash_totem' WHERE `entry`=15112;
|
||||
@@ -68,6 +68,9 @@ struct boss_jindo : public BossAI
|
||||
events.ScheduleEvent(EVENT_TELEPORT, 5000);
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
_scheduler.CancelAll();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
@@ -76,14 +79,15 @@ struct boss_jindo : public BossAI
|
||||
|
||||
switch (summon->GetEntry())
|
||||
{
|
||||
case NPC_BRAIN_WASH_TOTEM:
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 1))
|
||||
{
|
||||
summon->CastSpell(target, summon->m_spells[0], true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
case NPC_BRAIN_WASH_TOTEM:
|
||||
summon->SetReactState(REACT_PASSIVE);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, me->GetThreatMgr().getThreatList().size() > 1 ? 1 : 0))
|
||||
{
|
||||
summon->CastSpell(target, summon->m_spells[0], true);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -91,20 +95,22 @@ struct boss_jindo : public BossAI
|
||||
{
|
||||
if (_EnterEvadeMode(evadeReason))
|
||||
{
|
||||
me->AddUnitState(UNIT_STATE_EVADE);
|
||||
Reset();
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCE);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&]()
|
||||
_scheduler.Schedule(4s, [this](TaskContext /*context*/)
|
||||
{
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE);
|
||||
me->AddUnitState(UNIT_STATE_EVADE);
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
}, 4s);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
@@ -153,6 +159,9 @@ struct boss_jindo : public BossAI
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
TaskScheduler _scheduler;
|
||||
};
|
||||
|
||||
//Healing Ward
|
||||
@@ -282,11 +291,23 @@ class spell_delusions_of_jindo : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
struct npc_brain_wash_totem : public ScriptedAI
|
||||
{
|
||||
npc_brain_wash_totem(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
}
|
||||
|
||||
void EnterEvadeMode(EvadeReason /*evadeReason*/) override
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_jindo()
|
||||
{
|
||||
RegisterZulGurubCreatureAI(boss_jindo);
|
||||
RegisterZulGurubCreatureAI(npc_healing_ward);
|
||||
RegisterZulGurubCreatureAI(npc_shade_of_jindo);
|
||||
RegisterZulGurubCreatureAI(npc_brain_wash_totem);
|
||||
RegisterSpellScript(spell_random_aggro);
|
||||
RegisterSpellScript(spell_delusions_of_jindo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user