fix(Scripts/EoE): Remove useless Focusing Iris script (#24804)
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
UPDATE `gameobject_template` SET `ScriptName` = '' WHERE `entry` IN (193958, 193960) AND `ScriptName` = 'go_the_focusing_iris';
|
||||||
@@ -1137,19 +1137,6 @@ struct npc_eoe_wyrmrest_skytalon : public VehicleAI
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct go_the_focusing_iris : public GameObjectAI
|
|
||||||
{
|
|
||||||
go_the_focusing_iris(GameObject* go) : GameObjectAI(go) { }
|
|
||||||
|
|
||||||
bool GossipHello(Player* /*user*/, bool /*reportUse*/) override
|
|
||||||
{
|
|
||||||
if (InstanceScript* instance = me->GetInstanceScript())
|
|
||||||
instance->SetData(DATA_IRIS_ACTIVATED, 0);
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 56105 - Vortex
|
// 56105 - Vortex
|
||||||
class spell_malygos_vortex_dummy : public SpellScript
|
class spell_malygos_vortex_dummy : public SpellScript
|
||||||
{
|
{
|
||||||
@@ -1315,7 +1302,6 @@ void AddSC_boss_malygos()
|
|||||||
RegisterEoECreatureAI(boss_malygos);
|
RegisterEoECreatureAI(boss_malygos);
|
||||||
RegisterEoECreatureAI(npc_power_spark);
|
RegisterEoECreatureAI(npc_power_spark);
|
||||||
RegisterEoECreatureAI(npc_alexstrasza);
|
RegisterEoECreatureAI(npc_alexstrasza);
|
||||||
RegisterGameObjectAI(go_the_focusing_iris);
|
|
||||||
RegisterEoECreatureAI(npc_nexus_lord);
|
RegisterEoECreatureAI(npc_nexus_lord);
|
||||||
RegisterEoECreatureAI(npc_scion_of_eternity);
|
RegisterEoECreatureAI(npc_scion_of_eternity);
|
||||||
RegisterEoECreatureAI(npc_hover_disk);
|
RegisterEoECreatureAI(npc_hover_disk);
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ enum eAchiev
|
|||||||
enum EoEMisc : uint32
|
enum EoEMisc : uint32
|
||||||
{
|
{
|
||||||
AREA_EYE_OF_ETERNITY = 4500,
|
AREA_EYE_OF_ETERNITY = 4500,
|
||||||
EVENT_IRIS_ACTIVATED = 20158,
|
EVENT_DESTROY_PLATFORM = 20158,
|
||||||
|
EVENT_IRIS_ACTIVATED = 20711,
|
||||||
PLATFORM_DESTROY_DAMAGE = 6500000,
|
PLATFORM_DESTROY_DAMAGE = 6500000,
|
||||||
INTRO_MOVEMENT_INTERVAL = 25000,
|
INTRO_MOVEMENT_INTERVAL = 25000,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -97,15 +97,7 @@ struct instance_eye_of_eternity : public InstanceScript
|
|||||||
|
|
||||||
void OnPlayerEnter(Player* player) override
|
void OnPlayerEnter(Player* player) override
|
||||||
{
|
{
|
||||||
if (GetBossState(DATA_MALYGOS) != DONE)
|
if (player && player->IsAlive() && IsBossDone(DATA_MALYGOS))
|
||||||
return;
|
|
||||||
|
|
||||||
ProcessEvent(nullptr, EVENT_IRIS_ACTIVATED);
|
|
||||||
if (GameObject* iris = GetGameObject(DATA_IRIS))
|
|
||||||
if (iris->GetPhaseMask() != 2)
|
|
||||||
iris->SetPhaseMask(2, true);
|
|
||||||
|
|
||||||
if (player && player->IsAlive())
|
|
||||||
player->CastSpell(player, SPELL_SUMMON_RED_DRAGON_BUDDY, true);
|
player->CastSpell(player, SPELL_SUMMON_RED_DRAGON_BUDDY, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,13 +106,16 @@ struct instance_eye_of_eternity : public InstanceScript
|
|||||||
InstanceScript::OnGameObjectCreate(gameobject);
|
InstanceScript::OnGameObjectCreate(gameobject);
|
||||||
|
|
||||||
uint32 entry = gameobject->GetEntry();
|
uint32 entry = gameobject->GetEntry();
|
||||||
if ((entry == GO_IRIS_N || entry == GO_IRIS_H) && GetBossState(DATA_MALYGOS) == DONE)
|
|
||||||
gameobject->SetPhaseMask(2, true);
|
|
||||||
|
|
||||||
if (entry == GO_NEXUS_PLATFORM && GetBossState(DATA_MALYGOS) == DONE)
|
if (IsBossDone(DATA_MALYGOS))
|
||||||
{
|
{
|
||||||
gameobject->ModifyHealth(-int32(PLATFORM_DESTROY_DAMAGE));
|
if (entry == GO_IRIS_N || entry == GO_IRIS_H)
|
||||||
gameobject->EnableCollision(false);
|
gameobject->SetPhaseMask(2, true);
|
||||||
|
else if (entry == GO_NEXUS_PLATFORM)
|
||||||
|
{
|
||||||
|
gameobject->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED, nullptr, true);
|
||||||
|
gameobject->EnableCollision(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,16 +123,6 @@ struct instance_eye_of_eternity : public InstanceScript
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case DATA_IRIS_ACTIVATED:
|
|
||||||
if (GetBossState(DATA_MALYGOS) == NOT_STARTED)
|
|
||||||
{
|
|
||||||
if (Creature* malygos = GetCreature(DATA_MALYGOS))
|
|
||||||
{
|
|
||||||
if (Player* player = malygos->SelectNearestPlayer(250.0f))
|
|
||||||
malygos->AI()->AttackStart(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case DATA_SET_IRIS_INACTIVE:
|
case DATA_SET_IRIS_INACTIVE:
|
||||||
{
|
{
|
||||||
if (GameObject* iris = GetGameObject(DATA_IRIS))
|
if (GameObject* iris = GetGameObject(DATA_IRIS))
|
||||||
@@ -204,15 +189,20 @@ struct instance_eye_of_eternity : public InstanceScript
|
|||||||
|
|
||||||
void ProcessEvent(WorldObject* /*unit*/, uint32 eventId) override
|
void ProcessEvent(WorldObject* /*unit*/, uint32 eventId) override
|
||||||
{
|
{
|
||||||
if (eventId != EVENT_IRIS_ACTIVATED)
|
if (eventId == EVENT_IRIS_ACTIVATED)
|
||||||
return;
|
{
|
||||||
|
|
||||||
if (GameObject* platform = GetGameObject(DATA_NEXUS_PLATFORM))
|
|
||||||
if (Creature* malygos = GetCreature(DATA_MALYGOS))
|
if (Creature* malygos = GetCreature(DATA_MALYGOS))
|
||||||
|
if (Player* player = malygos->SelectNearestPlayer(250.0f))
|
||||||
|
malygos->AI()->AttackStart(player);
|
||||||
|
}
|
||||||
|
else if (eventId == EVENT_DESTROY_PLATFORM)
|
||||||
|
{
|
||||||
|
if (GameObject* platform = GetGameObject(DATA_NEXUS_PLATFORM))
|
||||||
{
|
{
|
||||||
platform->ModifyHealth(-int32(PLATFORM_DESTROY_DAMAGE), malygos);
|
platform->SetDestructibleState(GO_DESTRUCTIBLE_DESTROYED, nullptr, true);
|
||||||
platform->EnableCollision(false);
|
platform->EnableCollision(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* source, Unit const* /*target*/, uint32 /*miscvalue1*/) override
|
bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* source, Unit const* /*target*/, uint32 /*miscvalue1*/) override
|
||||||
|
|||||||
Reference in New Issue
Block a user