fix(Scripts/ZulAman): Akilzon Gauntlet hyperspawn, handling Eagle Trash Triggers (#21129)
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `ScriptName` = 'npc_eagle_trash_aggro_trigger' WHERE (`entry` = 24223);
|
||||||
@@ -251,6 +251,23 @@ public:
|
|||||||
creature->Respawn(true);
|
creature->Respawn(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnUnitDeath(Unit* unit) override
|
||||||
|
{
|
||||||
|
Creature* creature = unit->ToCreature();
|
||||||
|
if (!creature)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (creature->GetEntry())
|
||||||
|
{
|
||||||
|
case NPC_AMINISHI_PROTECTOR:
|
||||||
|
case NPC_AMANISHI_WIND_WALKER:
|
||||||
|
if (_akilzonGauntlet == NOT_STARTED && AkilzonTrash.contains(creature->GetGUID()))
|
||||||
|
creature->DespawnOrUnsummon(30s, 1s);
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OnCreatureEvade(Creature* creature) override
|
void OnCreatureEvade(Creature* creature) override
|
||||||
{
|
{
|
||||||
switch (creature->GetEntry())
|
switch (creature->GetEntry())
|
||||||
|
|||||||
@@ -561,7 +561,7 @@ struct npc_amanishi_lookout : public NullCreatureAI
|
|||||||
|
|
||||||
void MoveInLineOfSight(Unit* who) override
|
void MoveInLineOfSight(Unit* who) override
|
||||||
{
|
{
|
||||||
if (!me->IsWithinDist(who, 25.0f, false)) // distance not confirmed
|
if (!me->IsWithinDist(who, me->GetAggroRange(who), false))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
|
Player* player = who->GetCharmerOrOwnerPlayerOrPlayerItself();
|
||||||
@@ -596,6 +596,29 @@ private:
|
|||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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 (who->GetLevel() > 70)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (!me->IsWithinDist(who, me->GetAggroRange(who), false))
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
|
||||||
enum AmanishiTempest
|
enum AmanishiTempest
|
||||||
{
|
{
|
||||||
GROUP_AKILZON_GAUNTLET = 1,
|
GROUP_AKILZON_GAUNTLET = 1,
|
||||||
@@ -845,6 +868,7 @@ void AddSC_zulaman()
|
|||||||
RegisterZulAmanCreatureAI(npc_harrison_jones);
|
RegisterZulAmanCreatureAI(npc_harrison_jones);
|
||||||
RegisterSpellScript(spell_ritual_of_power);
|
RegisterSpellScript(spell_ritual_of_power);
|
||||||
RegisterZulAmanCreatureAI(npc_amanishi_lookout);
|
RegisterZulAmanCreatureAI(npc_amanishi_lookout);
|
||||||
|
RegisterZulAmanCreatureAI(npc_eagle_trash_aggro_trigger);
|
||||||
RegisterZulAmanCreatureAI(npc_amanishi_tempest);
|
RegisterZulAmanCreatureAI(npc_amanishi_tempest);
|
||||||
RegisterZulAmanCreatureAI(npc_amanishi_scout);
|
RegisterZulAmanCreatureAI(npc_amanishi_scout);
|
||||||
RegisterSpellScript(spell_alert_drums);
|
RegisterSpellScript(spell_alert_drums);
|
||||||
|
|||||||
Reference in New Issue
Block a user