Scripts/Icecrown Citadel: Added floating souls visual in The Spire after teleport to The Lich King becomes available (killing 11/12 bosses)
This commit is contained in:
@@ -158,6 +158,9 @@ enum Spells
|
||||
SPELL_FEL_IRON_BOMB_UNDEAD = 71787,
|
||||
SPELL_MACHINE_GUN_UNDEAD = 71788,
|
||||
SPELL_ROCKET_LAUNCH_UNDEAD = 71786,
|
||||
|
||||
// Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
SPELL_SOUL_MISSILE = 72585,
|
||||
};
|
||||
|
||||
// Helper defines
|
||||
@@ -248,6 +251,9 @@ enum EventTypes
|
||||
EVENT_RUPERT_FEL_IRON_BOMB = 52,
|
||||
EVENT_RUPERT_MACHINE_GUN = 53,
|
||||
EVENT_RUPERT_ROCKET_LAUNCH = 54,
|
||||
|
||||
// Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
EVENT_SOUL_MISSILE = 55,
|
||||
};
|
||||
|
||||
enum DataTypesICC
|
||||
@@ -1668,6 +1674,56 @@ class npc_impaling_spear : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
class npc_arthas_teleport_visual : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_arthas_teleport_visual() : CreatureScript("npc_arthas_teleport_visual") { }
|
||||
|
||||
struct npc_arthas_teleport_visualAI : public NullCreatureAI
|
||||
{
|
||||
npc_arthas_teleport_visualAI(Creature* creature) : NullCreatureAI(creature), _instance(creature->GetInstanceScript())
|
||||
{
|
||||
}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
_events.Reset();
|
||||
if (_instance->GetBossState(DATA_PROFESSOR_PUTRICIDE) == DONE &&
|
||||
_instance->GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) == DONE &&
|
||||
_instance->GetBossState(DATA_SINDRAGOSA) == DONE)
|
||||
_events.ScheduleEvent(EVENT_SOUL_MISSILE, urand(1000, 6000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 const diff)
|
||||
{
|
||||
if (_events.Empty())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (_events.ExecuteEvent() == EVENT_SOUL_MISSILE)
|
||||
{
|
||||
DoCastAOE(SPELL_SOUL_MISSILE);
|
||||
_events.ScheduleEvent(EVENT_SOUL_MISSILE, urand(5000, 7000));
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
// Distance from the center of the spire
|
||||
if (creature->GetExactDist2d(4357.052f, 2769.421f) < 100.0f && creature->GetHomePosition().GetPositionZ() < 315.0f)
|
||||
return GetIcecrownCitadelAI<npc_arthas_teleport_visualAI>(creature);
|
||||
|
||||
// Default to no script
|
||||
return NULL;
|
||||
}
|
||||
};
|
||||
|
||||
class spell_icc_stoneform : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -1974,6 +2030,33 @@ class spell_svalna_remove_spear : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_icc_soul_missile : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_icc_soul_missile() : SpellScriptLoader("spell_icc_soul_missile") { }
|
||||
|
||||
class spell_icc_soul_missile_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_icc_soul_missile_SpellScript);
|
||||
|
||||
void RelocateDest()
|
||||
{
|
||||
static Position const offset = {0.0f, 0.0f, 200.0f, 0.0f};
|
||||
const_cast<WorldLocation*>(GetExplTargetDest())->RelocateOffset(offset);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnCast += SpellCastFn(spell_icc_soul_missile_SpellScript::RelocateDest);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const
|
||||
{
|
||||
return new spell_icc_soul_missile_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class at_icc_saurfang_portal : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
@@ -2063,6 +2146,7 @@ void AddSC_icecrown_citadel()
|
||||
new npc_captain_rupert();
|
||||
new npc_frostwing_vrykul();
|
||||
new npc_impaling_spear();
|
||||
new npc_arthas_teleport_visual();
|
||||
new spell_icc_stoneform();
|
||||
new spell_icc_sprit_alarm();
|
||||
new spell_frost_giant_death_plague();
|
||||
@@ -2070,6 +2154,7 @@ void AddSC_icecrown_citadel()
|
||||
new spell_trigger_spell_from_caster("spell_svalna_caress_of_death", SPELL_IMPALING_SPEAR_KILL);
|
||||
new spell_svalna_revive_champion();
|
||||
new spell_svalna_remove_spear();
|
||||
new spell_icc_soul_missile();
|
||||
new at_icc_saurfang_portal();
|
||||
new at_icc_shutdown_traps();
|
||||
new at_icc_start_blood_quickening();
|
||||
|
||||
@@ -51,6 +51,7 @@ enum SharedSpells
|
||||
SPELL_GREEN_BLIGHT_RESIDUE = 72145,
|
||||
|
||||
// The Lich King
|
||||
SPELL_ARTHAS_TELEPORTER_CEREMONY = 72915,
|
||||
SPELL_FROSTMOURNE_TELEPORT_VISUAL = 73078,
|
||||
};
|
||||
|
||||
@@ -275,6 +276,9 @@ enum CreaturesIds
|
||||
NPC_WORLD_TRIGGER_INFINITE_AOI = 36171,
|
||||
NPC_SPIRIT_BOMB = 39189,
|
||||
NPC_FROSTMOURNE_TRIGGER = 38584,
|
||||
|
||||
// Generic
|
||||
NPC_INVISIBLE_STALKER = 30298,
|
||||
};
|
||||
|
||||
enum GameObjectsIds
|
||||
@@ -345,6 +349,7 @@ enum GameObjectsIds
|
||||
GO_SIGIL_OF_THE_FROSTWING = 202181,
|
||||
|
||||
// The Lich King
|
||||
GO_SCOURGE_TRANSPORTER_LK = 202223,
|
||||
GO_ARTHAS_PLATFORM = 202161,
|
||||
GO_ARTHAS_PRECIPICE = 202078,
|
||||
GO_DOODAD_ICECROWN_THRONEFROSTYWIND01 = 202188,
|
||||
|
||||
@@ -130,6 +130,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
SindragosaGUID = 0;
|
||||
SpinestalkerGUID = 0;
|
||||
RimefangGUID = 0;
|
||||
TheLichKingTeleportGUID = 0;
|
||||
TheLichKingGUID = 0;
|
||||
HighlordTirionFordringGUID = 0;
|
||||
TerenasMenethilGUID = 0;
|
||||
@@ -280,6 +281,11 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
case NPC_RIMEFANG:
|
||||
RimefangGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_INVISIBLE_STALKER:
|
||||
// Teleporter visual at center
|
||||
if (creature->GetExactDist2d(4357.052f, 2769.421f) < 10.0f)
|
||||
creature->CastSpell(creature, SPELL_ARTHAS_TELEPORTER_CEREMONY, false);
|
||||
break;
|
||||
case NPC_THE_LICH_KING:
|
||||
TheLichKingGUID = creature->GetGUID();
|
||||
break;
|
||||
@@ -505,6 +511,11 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
go->SetLootRecipient(valithria->GetLootRecipient());
|
||||
go->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
break;
|
||||
case GO_SCOURGE_TRANSPORTER_LK:
|
||||
TheLichKingTeleportGUID = go->GetGUID();
|
||||
if (GetBossState(DATA_PROFESSOR_PUTRICIDE) == DONE && GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) == DONE && GetBossState(DATA_SINDRAGOSA) == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case GO_ARTHAS_PLATFORM:
|
||||
// this enables movement at The Frozen Throne, when printed this value is 0.000000f
|
||||
// however, when represented as integer client will accept only this value
|
||||
@@ -743,6 +754,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
break;
|
||||
case DATA_PROFESSOR_PUTRICIDE:
|
||||
HandleGameObject(PlagueSigilGUID, state != DONE);
|
||||
if (state == DONE)
|
||||
CheckLichKingAvailability();
|
||||
if (instance->IsHeroic())
|
||||
{
|
||||
if (state == FAIL && HeroicAttempts)
|
||||
@@ -757,6 +770,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
break;
|
||||
case DATA_BLOOD_QUEEN_LANA_THEL:
|
||||
HandleGameObject(BloodwingSigilGUID, state != DONE);
|
||||
if (state == DONE)
|
||||
CheckLichKingAvailability();
|
||||
if (instance->IsHeroic())
|
||||
{
|
||||
if (state == FAIL && HeroicAttempts)
|
||||
@@ -775,6 +790,8 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
break;
|
||||
case DATA_SINDRAGOSA:
|
||||
HandleGameObject(FrostwingSigilGUID, state != DONE);
|
||||
if (state == DONE)
|
||||
CheckLichKingAvailability();
|
||||
if (instance->IsHeroic())
|
||||
{
|
||||
if (state == FAIL && HeroicAttempts)
|
||||
@@ -1065,6 +1082,28 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
void CheckLichKingAvailability()
|
||||
{
|
||||
if (GetBossState(DATA_PROFESSOR_PUTRICIDE) == DONE && GetBossState(DATA_BLOOD_QUEEN_LANA_THEL) == DONE && GetBossState(DATA_SINDRAGOSA) == DONE)
|
||||
{
|
||||
if (GameObject* teleporter = instance->GetGameObject(TheLichKingTeleportGUID))
|
||||
{
|
||||
teleporter->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
std::list<Creature*> stalkers;
|
||||
GetCreatureListWithEntryInGrid(stalkers, teleporter, NPC_INVISIBLE_STALKER, 100.0f);
|
||||
if (stalkers.empty())
|
||||
return;
|
||||
|
||||
stalkers.sort(Trinity::ObjectDistanceOrderPred(teleporter));
|
||||
stalkers.front()->CastSpell((Unit*)NULL, SPELL_ARTHAS_TELEPORTER_CEREMONY, false);
|
||||
stalkers.pop_front();
|
||||
for (std::list<Creature*>::iterator itr = stalkers.begin(); itr != stalkers.end(); ++itr)
|
||||
(*itr)->AI()->Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::string GetSaveData()
|
||||
{
|
||||
OUT_SAVE_INST_DATA;
|
||||
@@ -1246,6 +1285,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
uint64 SindragosaGUID;
|
||||
uint64 SpinestalkerGUID;
|
||||
uint64 RimefangGUID;
|
||||
uint64 TheLichKingTeleportGUID;
|
||||
uint64 TheLichKingGUID;
|
||||
uint64 HighlordTirionFordringGUID;
|
||||
uint64 TerenasMenethilGUID;
|
||||
|
||||
Reference in New Issue
Block a user