fix(Scripts/ZulAman): Eagle Gauntlet behavior (#20947)
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
--
|
||||||
|
-- Eagle Trash Aggro Trigger
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = '' WHERE (`entry` = 24223);
|
||||||
|
-- set spawntime to 30min Amani'shi Tempest
|
||||||
|
UPDATE `creature` SET `spawntimesecs` = 1800 WHERE (`id1` = 24549) AND (`guid` IN (89283));
|
||||||
|
-- delete Amani'shi Wind Walker #5 next to Tempest
|
||||||
|
DELETE FROM `creature` WHERE (`id1` = 24179) AND (`guid` IN (1107));
|
||||||
|
-- delete Amani'shi Protector #5 next to Tempest
|
||||||
|
DELETE FROM `creature` WHERE (`id1` = 24180) AND (`guid` IN (89311));
|
||||||
|
DELETE FROM `creature_addon` WHERE `guid` IN (1107, 89311);
|
||||||
|
DELETE FROM `linked_respawn` WHERE `guid` IN (1107, 89311);
|
||||||
@@ -238,8 +238,12 @@ public:
|
|||||||
_akilzonGauntlet = NOT_STARTED;
|
_akilzonGauntlet = NOT_STARTED;
|
||||||
for (ObjectGuid guid : AkilzonTrash)
|
for (ObjectGuid guid : AkilzonTrash)
|
||||||
if (Creature* creature = instance->GetCreature(guid))
|
if (Creature* creature = instance->GetCreature(guid))
|
||||||
|
{
|
||||||
if (!creature->IsAlive())
|
if (!creature->IsAlive())
|
||||||
creature->Respawn();
|
creature->Respawn();
|
||||||
|
else if (creature->GetEntry() == NPC_AMINISHI_TEMPEST)
|
||||||
|
creature->AI()->DoAction(ACTION_RESET_AKILZON_GAUNTLET);
|
||||||
|
}
|
||||||
if (Creature* creature = GetCreature(DATA_LOOKOUT))
|
if (Creature* creature = GetCreature(DATA_LOOKOUT))
|
||||||
if (creature->isMoving())
|
if (creature->isMoving())
|
||||||
creature->Respawn(true);
|
creature->Respawn(true);
|
||||||
|
|||||||
@@ -590,7 +590,6 @@ private:
|
|||||||
|
|
||||||
enum AmanishiTempest
|
enum AmanishiTempest
|
||||||
{
|
{
|
||||||
ACTION_START_GAUNTLET = 1,
|
|
||||||
GROUP_AKILZON_GAUNTLET = 1,
|
GROUP_AKILZON_GAUNTLET = 1,
|
||||||
SPELL_SUMMON_EAGLE = 43487,
|
SPELL_SUMMON_EAGLE = 43487,
|
||||||
SPELL_SUMMON_WARRIOR = 43486,
|
SPELL_SUMMON_WARRIOR = 43486,
|
||||||
@@ -605,6 +604,11 @@ struct npc_amanishi_tempest : public ScriptedAI
|
|||||||
{
|
{
|
||||||
_summons.DespawnAll();
|
_summons.DespawnAll();
|
||||||
scheduler.CancelAll();
|
scheduler.CancelAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
void JustEngagedWith(Unit* /*who*/) override
|
||||||
|
{
|
||||||
|
scheduler.CancelGroup(GROUP_AKILZON_GAUNTLET);
|
||||||
scheduler.Schedule(9s, 11s, [this](TaskContext context)
|
scheduler.Schedule(9s, 11s, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
DoCastVictim(SPELL_THUNDERCLAP);
|
DoCastVictim(SPELL_THUNDERCLAP);
|
||||||
@@ -627,8 +631,15 @@ struct npc_amanishi_tempest : public ScriptedAI
|
|||||||
|
|
||||||
void DoAction(int32 action) override
|
void DoAction(int32 action) override
|
||||||
{
|
{
|
||||||
if (action == ACTION_START_GAUNTLET)
|
if (action == ACTION_START_AKILZON_GAUNTLET)
|
||||||
ScheduleEvents();
|
ScheduleEvents();
|
||||||
|
else if (action == ACTION_RESET_AKILZON_GAUNTLET)
|
||||||
|
Reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SummonedCreatureEvade(Creature* /*summon*/) override
|
||||||
|
{
|
||||||
|
EnterEvadeMode(EVADE_REASON_OTHER);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterEvadeMode(EvadeReason why) override
|
void EnterEvadeMode(EvadeReason why) override
|
||||||
@@ -639,7 +650,6 @@ struct npc_amanishi_tempest : public ScriptedAI
|
|||||||
|
|
||||||
void ScheduleEvents()
|
void ScheduleEvents()
|
||||||
{
|
{
|
||||||
me->SetInCombatWithZone();
|
|
||||||
scheduler.Schedule(29s, 53s, GROUP_AKILZON_GAUNTLET, [this](TaskContext context)
|
scheduler.Schedule(29s, 53s, GROUP_AKILZON_GAUNTLET, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
for (uint8 i = 0; i < 5; ++i)
|
for (uint8 i = 0; i < 5; ++i)
|
||||||
@@ -656,11 +666,6 @@ struct npc_amanishi_tempest : public ScriptedAI
|
|||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
scheduler.Update(diff);
|
scheduler.Update(diff);
|
||||||
if (!me->IsEngaged())
|
|
||||||
return;
|
|
||||||
Unit* victim = me->SelectVictim();
|
|
||||||
if (!victim || me->GetExactDist(victim) > me->GetAggroRange(victim))
|
|
||||||
return;
|
|
||||||
ScriptedAI::UpdateAI(diff);
|
ScriptedAI::UpdateAI(diff);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -669,26 +674,6 @@ private:
|
|||||||
SummonList _summons;
|
SummonList _summons;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct npc_eagle_trash_aggro_trigger : public ScriptedAI
|
|
||||||
{
|
|
||||||
npc_eagle_trash_aggro_trigger(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) {}
|
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
|
||||||
{
|
|
||||||
if (!me->IsWithinDist(who, 10.0f, false)) // distance not confirmed
|
|
||||||
return;
|
|
||||||
|
|
||||||
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
|
|
||||||
if (!player || player->IsGameMaster())
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (_instance->GetData(TYPE_AKILZON_GAUNTLET) == NOT_STARTED)
|
|
||||||
_instance->SetData(TYPE_AKILZON_GAUNTLET, IN_PROGRESS);
|
|
||||||
}
|
|
||||||
private:
|
|
||||||
InstanceScript* _instance;
|
|
||||||
};
|
|
||||||
|
|
||||||
void AddSC_zulaman()
|
void AddSC_zulaman()
|
||||||
{
|
{
|
||||||
RegisterZulAmanCreatureAI(npc_forest_frog);
|
RegisterZulAmanCreatureAI(npc_forest_frog);
|
||||||
@@ -697,5 +682,4 @@ void AddSC_zulaman()
|
|||||||
RegisterSpellScript(spell_ritual_of_power);
|
RegisterSpellScript(spell_ritual_of_power);
|
||||||
RegisterZulAmanCreatureAI(npc_amanishi_lookout);
|
RegisterZulAmanCreatureAI(npc_amanishi_lookout);
|
||||||
RegisterZulAmanCreatureAI(npc_amanishi_tempest);
|
RegisterZulAmanCreatureAI(npc_amanishi_tempest);
|
||||||
RegisterZulAmanCreatureAI(npc_eagle_trash_aggro_trigger);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,6 +92,7 @@ enum MiscIds
|
|||||||
DATA_TIMED_RUN = 0,
|
DATA_TIMED_RUN = 0,
|
||||||
ACTION_START_TIMED_RUN = 0,
|
ACTION_START_TIMED_RUN = 0,
|
||||||
ACTION_START_AKILZON_GAUNTLET = 1,
|
ACTION_START_AKILZON_GAUNTLET = 1,
|
||||||
|
ACTION_RESET_AKILZON_GAUNTLET = 2,
|
||||||
GROUP_TIMED_RUN = 1
|
GROUP_TIMED_RUN = 1
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user