mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Scripts/TheEye): fix Kael progress bug and some other issues (#18580)
* init * some fixes
This commit is contained in:
2
data/sql/updates/pending_db_world/weapons_flags.sql
Normal file
2
data/sql/updates/pending_db_world/weapons_flags.sql
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `unit_flags` = `unit_flags`& ~33554432 & ~2 WHERE `entry` BETWEEN 21268 AND 21274;
|
||||||
@@ -151,8 +151,9 @@ enum Misc
|
|||||||
PHASE_NONE = 0,
|
PHASE_NONE = 0,
|
||||||
PHASE_SINGLE_ADVISOR = 1,
|
PHASE_SINGLE_ADVISOR = 1,
|
||||||
PHASE_WEAPONS = 2,
|
PHASE_WEAPONS = 2,
|
||||||
PHASE_ALL_ADVISORS = 3,
|
PHASE_TRANSITION = 3,
|
||||||
PHASE_FINAL = 4,
|
PHASE_ALL_ADVISORS = 4,
|
||||||
|
PHASE_FINAL = 5,
|
||||||
|
|
||||||
EVENT_PREFIGHT_PHASE11 = 1,
|
EVENT_PREFIGHT_PHASE11 = 1,
|
||||||
EVENT_PREFIGHT_PHASE12 = 2,
|
EVENT_PREFIGHT_PHASE12 = 2,
|
||||||
@@ -352,6 +353,8 @@ struct boss_kaelthas : public BossAI
|
|||||||
summons.Summon(summon);
|
summons.Summon(summon);
|
||||||
if (summon->GetEntry() == NPC_NETHER_VAPOR)
|
if (summon->GetEntry() == NPC_NETHER_VAPOR)
|
||||||
summon->GetMotionMaster()->MoveRandom(20.0f);
|
summon->GetMotionMaster()->MoveRandom(20.0f);
|
||||||
|
if (summon->GetEntry() >= NPC_NETHERSTRAND_LONGBOW && summon->GetEntry() <= NPC_STAFF_OF_DISINTEGRATION)
|
||||||
|
summon->SetReactState(REACT_PASSIVE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoAction(int32 action) override
|
void DoAction(int32 action) override
|
||||||
@@ -380,7 +383,7 @@ struct boss_kaelthas : public BossAI
|
|||||||
{
|
{
|
||||||
if (!summonedCreature->GetSpawnId())
|
if (!summonedCreature->GetSpawnId())
|
||||||
{
|
{
|
||||||
summonedCreature->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE);
|
summonedCreature->SetReactState(REACT_AGGRESSIVE);
|
||||||
summonedCreature->SetInCombatWithZone();
|
summonedCreature->SetInCombatWithZone();
|
||||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||||
{
|
{
|
||||||
@@ -678,13 +681,14 @@ struct boss_kaelthas : public BossAI
|
|||||||
|
|
||||||
void PhaseAllAdvisorsExecute()
|
void PhaseAllAdvisorsExecute()
|
||||||
{
|
{
|
||||||
|
_phase = PHASE_TRANSITION;
|
||||||
scheduler.CancelGroup(GROUP_PROGRESS_PHASE);
|
scheduler.CancelGroup(GROUP_PROGRESS_PHASE);
|
||||||
_phase = PHASE_ALL_ADVISORS;
|
|
||||||
Talk(SAY_PHASE3_ADVANCE);
|
Talk(SAY_PHASE3_ADVANCE);
|
||||||
ScheduleUniqueTimedEvent(6s, [&]{
|
ScheduleUniqueTimedEvent(6s, [&]{
|
||||||
DoCastSelf(SPELL_RESURRECTION);
|
DoCastSelf(SPELL_RESURRECTION);
|
||||||
}, EVENT_PREFIGHT_PHASE62);
|
}, EVENT_PREFIGHT_PHASE62);
|
||||||
ScheduleUniqueTimedEvent(12s, [&]{
|
ScheduleUniqueTimedEvent(12s, [&]{
|
||||||
|
_phase = PHASE_ALL_ADVISORS;
|
||||||
summons.DoForAllSummons([&](WorldObject* summon)
|
summons.DoForAllSummons([&](WorldObject* summon)
|
||||||
{
|
{
|
||||||
if (Creature* summonedCreature = summon->ToCreature())
|
if (Creature* summonedCreature = summon->ToCreature())
|
||||||
@@ -743,18 +747,16 @@ struct boss_kaelthas : public BossAI
|
|||||||
DoCastSelf(SPELL_ARCANE_DISRUPTION);
|
DoCastSelf(SPELL_ARCANE_DISRUPTION);
|
||||||
});
|
});
|
||||||
}, 50s);
|
}, 50s);
|
||||||
ScheduleTimedEvent(40s, [&]
|
ScheduleTimedEvent(43s, [&]
|
||||||
{
|
{
|
||||||
|
if (roll_chance_i(50))
|
||||||
|
Talk(SAY_MINDCONTROL);
|
||||||
|
me->CastCustomSpell(SPELL_MIND_CONTROL, SPELLVALUE_MAX_TARGETS, 3, me, false);
|
||||||
scheduler.Schedule(3s, [this](TaskContext)
|
scheduler.Schedule(3s, [this](TaskContext)
|
||||||
{
|
|
||||||
if (roll_chance_i(50))
|
|
||||||
Talk(SAY_MINDCONTROL);
|
|
||||||
me->CastCustomSpell(SPELL_MIND_CONTROL, SPELLVALUE_MAX_TARGETS, 3, me, false);
|
|
||||||
}).Schedule(6s, [this](TaskContext)
|
|
||||||
{
|
{
|
||||||
DoCastSelf(SPELL_ARCANE_DISRUPTION);
|
DoCastSelf(SPELL_ARCANE_DISRUPTION);
|
||||||
});
|
});
|
||||||
}, 50s);
|
}, 53s);
|
||||||
ScheduleTimedEvent(60s, [&]
|
ScheduleTimedEvent(60s, [&]
|
||||||
{
|
{
|
||||||
Talk(SAY_PYROBLAST);
|
Talk(SAY_PYROBLAST);
|
||||||
@@ -1041,7 +1043,7 @@ struct npc_thaladred : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoCastVictim(SPELL_REND);
|
DoCastVictim(SPELL_REND);
|
||||||
}, 15700ms, 48900ms);
|
}, 15700ms, 48900ms);
|
||||||
ScheduleTimedEvent(3000ms,6050ms, [&]
|
ScheduleTimedEvent(3000ms, 6050ms, [&]
|
||||||
{
|
{
|
||||||
if (Unit* victim = me->GetVictim())
|
if (Unit* victim = me->GetVictim())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user