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:
@@ -0,0 +1,61 @@
|
||||
UPDATE `creature_template` SET `InhabitType`=4,`flags_extra`=128,`unit_flags`=0x2000000,`ScriptName`='npc_arthas_teleport_visual' WHERE `entry`=30298; -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_icc_soul_missile';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(72585,'spell_icc_soul_missile');
|
||||
|
||||
DELETE FROM `creature_template_addon` WHERE `entry`=30298;
|
||||
INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES
|
||||
(30298,0,0x0,0x1,''); -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
|
||||
SET @CGUID:=88653;
|
||||
DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+47;
|
||||
INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`MovementType`) VALUES
|
||||
(@CGUID+00,30298,631,15,1,4357.052,2769.421,356.1364,3.141593,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+01,30298,631,15,1,4308.511,2788.476,312.6750,3.263766,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+02,30298,631,15,1,4292.898,2793.981,310.8101,1.640610,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+03,30298,631,15,1,4306.854,2752.771,299.1382,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+04,30298,631,15,1,4317.904,2743.047,299.1328,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+05,30298,631,15,1,4319.273,2799.125,299.1442,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+06,30298,631,15,1,4312.229,2735.825,299.1255,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+07,30298,631,15,1,4295.093,2743.372,299.1294,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+08,30298,631,15,1,4342.194,2719.366,312.6750,4.799655,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+09,30298,631,15,1,4284.044,2753.073,299.1465,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+10,30298,631,15,1,4331.980,2730.547,299.1442,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+11,30298,631,15,1,4331.183,2813.701,299.1328,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+12,30298,631,15,1,4292.952,2807.547,299.1372,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+13,30298,631,15,1,4284.188,2735.236,299.1377,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+14,30298,631,15,1,4323.733,2819.085,299.1255,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+15,30298,631,15,1,4308.430,2717.113,299.1333,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+16,30298,631,15,1,4304.886,2822.116,299.1333,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+17,30298,631,15,1,4336.049,2703.986,310.8101,3.176499,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+18,30298,631,15,1,4430.367,2800.603,299.1377,3.909538,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+19,30298,631,15,1,4432.948,2749.438,307.1431,4.799655,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+20,30298,631,15,1,4340.452,2825.148,299.1382,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+21,30298,631,15,1,4322.498,2704.592,299.1372,0.820304,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+22,30298,631,15,1,4380.124,2816.074,312.6750,6.265732,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+23,30298,631,15,1,4330.582,2836.512,299.1294,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+24,30298,631,15,1,4418.384,2734.435,299.1372,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+25,30298,631,15,1,4429.439,2782.781,299.1465,3.909538,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+26,30298,631,15,1,4380.205,2727.930,299.1328,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+27,30298,631,15,1,4371.056,2716.414,299.1382,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+28,30298,631,15,1,4399.571,2746.277,312.6750,4.799655,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+29,30298,631,15,1,4382.944,2808.139,299.1442,3.909538,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+30,30298,631,15,1,4389.698,2694.647,299.1377,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+31,30298,631,15,1,4336.760,2689.307,307.1431,3.176499,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+32,30298,631,15,1,4391.995,2742.610,299.1442,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+33,30298,631,15,1,4322.008,2847.075,299.1377,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+34,30298,631,15,1,4396.241,2794.807,299.1328,3.909538,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+35,30298,631,15,1,4380.467,2834.892,310.8101,6.265732,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+36,30298,631,15,1,4337.707,2850.425,299.1465,5.567600,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+37,30298,631,15,1,4392.823,2719.806,299.1255,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+38,30298,631,15,1,4406.686,2784.457,299.1382,3.909538,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+39,30298,631,15,1,4381.028,2705.133,299.1294,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+40,30298,631,15,1,4371.884,2693.614,299.1465,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+41,30298,631,15,1,4405.702,2806.464,299.1255,3.909538,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+42,30298,631,15,1,4418.314,2747.997,310.8101,4.799655,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+43,30298,631,15,1,4380.639,2849.595,307.1431,6.265732,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+44,30298,631,15,1,4393.958,2833.470,299.1372,3.909538,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+45,30298,631,15,1,4406.588,2719.758,299.1333,2.443461,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+46,30298,631,15,1,4407.252,2820.139,299.1333,3.909538,7200,0,0), -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
(@CGUID+47,30298,631,15,1,4418.995,2793.132,299.1294,3.909538,7200,0,0); -- Invisible Stalker (Float, Uninteractible, LargeAOI)
|
||||
@@ -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