From 7b9f34afc5fc5be53e71c40ef85e0f55824c60f7 Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Sat, 17 Aug 2013 14:59:49 +0300 Subject: Core/Scripts: Placeholder for instance The Stockade. It is needed for Random Dungeon Finder credit. Correct entry for last encounter in the instance. --- src/server/game/Scripting/ScriptLoader.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/server/game/Scripting/ScriptLoader.cpp') diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 76defc03da4..2510cb92f10 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -230,6 +230,7 @@ void AddSC_boss_archaedas(); //Uldaman void AddSC_boss_ironaya(); void AddSC_uldaman(); void AddSC_instance_uldaman(); +void AddSC_instance_the_stockade(); //The Stockade void AddSC_boss_akilzon(); //Zul'Aman void AddSC_boss_halazzi(); void AddSC_boss_hex_lord_malacrass(); @@ -881,6 +882,7 @@ void AddEasternKingdomsScripts() AddSC_boss_muru(); AddSC_boss_kiljaeden(); AddSC_sunwell_plateau(); + AddSC_instance_the_stockade(); //The Stockade AddSC_boss_archaedas(); //Uldaman AddSC_boss_ironaya(); AddSC_uldaman(); -- cgit v1.2.3 From 0333d22fe9454cf9382bdb81bf60b64e46abc72f Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Sat, 17 Aug 2013 15:25:09 +0300 Subject: Core/Scripts: Placeholder for instance Ragefire Chasm. It is needed for Random Dungeon Finder credit. --- sql/updates/world/2013_08_17_01_world_misc.sql | 1 + src/server/game/Scripting/ScriptLoader.cpp | 2 + .../TheStockade/instance_the_stockade.cpp | 1 + src/server/scripts/Kalimdor/CMakeLists.txt | 1 + .../RagefireChasm/instance_ragefire_chasm.cpp | 47 ++++++++++++++++++++++ 5 files changed, 52 insertions(+) create mode 100644 sql/updates/world/2013_08_17_01_world_misc.sql create mode 100644 src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp (limited to 'src/server/game/Scripting/ScriptLoader.cpp') diff --git a/sql/updates/world/2013_08_17_01_world_misc.sql b/sql/updates/world/2013_08_17_01_world_misc.sql new file mode 100644 index 00000000000..42555f591bf --- /dev/null +++ b/sql/updates/world/2013_08_17_01_world_misc.sql @@ -0,0 +1 @@ +UPDATE `instance_template` SET `script`='instance_ragefire_chasm' WHERE `map`=389; diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 2510cb92f10..d4bfabc46d5 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -172,6 +172,7 @@ void AddSC_boss_sulfuron(); void AddSC_boss_majordomo(); void AddSC_boss_ragnaros(); void AddSC_instance_molten_core(); +void AddSC_instance_ragefire_chasm(); //Ragefire Chasm void AddSC_the_scarlet_enclave(); //Scarlet Enclave void AddSC_the_scarlet_enclave_c1(); void AddSC_the_scarlet_enclave_c2(); @@ -828,6 +829,7 @@ void AddEasternKingdomsScripts() AddSC_boss_majordomo(); AddSC_boss_ragnaros(); AddSC_instance_molten_core(); + AddSC_instance_ragefire_chasm(); //Ragefire Chasm AddSC_the_scarlet_enclave(); //Scarlet Enclave AddSC_the_scarlet_enclave_c1(); AddSC_the_scarlet_enclave_c2(); diff --git a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp index 4bd1dc20dcd..9550ac13208 100644 --- a/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp +++ b/src/server/scripts/EasternKingdoms/TheStockade/instance_the_stockade.cpp @@ -21,6 +21,7 @@ to give credit after the boss defined in lastEncounterDungeon is killed. Without it, the party doing random dungeon won't get satchel of spoils and gets instead the deserter debuff. */ + #include "ScriptMgr.h" #include "InstanceScript.h" diff --git a/src/server/scripts/Kalimdor/CMakeLists.txt b/src/server/scripts/Kalimdor/CMakeLists.txt index 752f8d3a2af..f5a9db94a0e 100644 --- a/src/server/scripts/Kalimdor/CMakeLists.txt +++ b/src/server/scripts/Kalimdor/CMakeLists.txt @@ -112,6 +112,7 @@ set(scripts_STAT_SRCS Kalimdor/OnyxiasLair/boss_onyxia.cpp Kalimdor/OnyxiasLair/onyxias_lair.h Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp + Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp ) message(" -> Prepared: Kalimdor") diff --git a/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp new file mode 100644 index 00000000000..6b13fecb26a --- /dev/null +++ b/src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* +This placeholder for the instance is needed for dungeon finding to be able +to give credit after the boss defined in lastEncounterDungeon is killed. +Without it, the party doing random dungeon won't get satchel of spoils and +gets instead the deserter debuff. +*/ + +#include "ScriptMgr.h" +#include "InstanceScript.h" + +class instance_ragefire_chasm : public InstanceMapScript +{ +public: + instance_ragefire_chasm() : InstanceMapScript("instance_ragefire_chasm", 389) { } + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_ragefire_chasm_InstanceMapScript(map); + } + + struct instance_ragefire_chasm_InstanceMapScript : public InstanceScript + { + instance_ragefire_chasm_InstanceMapScript(Map* map) : InstanceScript(map) {} + }; +}; + +void AddSC_instance_ragefire_chasm() +{ + new instance_ragefire_chasm(); +} -- cgit v1.2.3 From 7c7f19228e7a562f225c717215fd34dfcaf5b35a Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Sat, 17 Aug 2013 17:50:33 +0300 Subject: Core/Scripts: Placeholders for instances The Slave Pens and The Underbog. It is needed for Random Dungeon Finder credit. --- sql/updates/world/2013_08_17_03_world_misc.sql | 2 + src/server/game/Scripting/ScriptLoader.cpp | 4 + src/server/scripts/Outland/CMakeLists.txt | 6 +- .../TheSlavePens/instance_the_slave_pens.cpp | 47 +++++ .../TheUnderbog/boss_hungarfen.cpp | 167 ++++++++++++++++++ .../TheUnderbog/boss_the_black_stalker.cpp | 195 +++++++++++++++++++++ .../TheUnderbog/instance_the_underbog.cpp | 47 +++++ .../CoilfangReservoir/underbog/boss_hungarfen.cpp | 167 ------------------ .../underbog/boss_the_black_stalker.cpp | 195 --------------------- 9 files changed, 466 insertions(+), 364 deletions(-) create mode 100644 sql/updates/world/2013_08_17_03_world_misc.sql create mode 100644 src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp create mode 100644 src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp create mode 100644 src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp create mode 100644 src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp delete mode 100644 src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp delete mode 100644 src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp (limited to 'src/server/game/Scripting/ScriptLoader.cpp') diff --git a/sql/updates/world/2013_08_17_03_world_misc.sql b/sql/updates/world/2013_08_17_03_world_misc.sql new file mode 100644 index 00000000000..649c40efdfc --- /dev/null +++ b/sql/updates/world/2013_08_17_03_world_misc.sql @@ -0,0 +1,2 @@ +UPDATE `instance_template` SET `script`='instance_underbog' WHERE `map`=546; +UPDATE `instance_template` SET `script`='instance_the_slave_pens' WHERE `map`=547; diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index d4bfabc46d5..82537816d44 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -567,8 +567,10 @@ void AddSC_boss_hydromancer_thespia(); //CR Steam Vault void AddSC_boss_mekgineer_steamrigger(); void AddSC_boss_warlord_kalithresh(); void AddSC_instance_steam_vault(); +void AddSC_instance_the_slave_pens(); //The Slave Pens void AddSC_boss_hungarfen(); //CR Underbog void AddSC_boss_the_black_stalker(); +void AddSC_instance_the_underbog(); void AddSC_boss_gruul(); //Gruul's Lair void AddSC_boss_high_king_maulgar(); void AddSC_instance_gruuls_lair(); @@ -1071,8 +1073,10 @@ void AddOutlandScripts() AddSC_boss_mekgineer_steamrigger(); AddSC_boss_warlord_kalithresh(); AddSC_instance_steam_vault(); + AddSC_instance_the_slave_pens(); //The Slave Pens AddSC_boss_hungarfen(); //CR Underbog AddSC_boss_the_black_stalker(); + AddSC_instance_the_underbog(); AddSC_boss_gruul(); //Gruul's Lair AddSC_boss_high_king_maulgar(); AddSC_instance_gruuls_lair(); diff --git a/src/server/scripts/Outland/CMakeLists.txt b/src/server/scripts/Outland/CMakeLists.txt index d7b863da0db..c828c6dfbcf 100644 --- a/src/server/scripts/Outland/CMakeLists.txt +++ b/src/server/scripts/Outland/CMakeLists.txt @@ -42,8 +42,10 @@ set(scripts_STAT_SRCS Outland/CoilfangReservoir/SerpentShrine/boss_leotheras_the_blind.cpp Outland/CoilfangReservoir/SerpentShrine/boss_lurker_below.cpp Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp - Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp - Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp + Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp + Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp + Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp + Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp Outland/zone_shattrath_city.cpp Outland/TempestKeep/Mechanar/boss_mechano_lord_capacitus.cpp Outland/TempestKeep/Mechanar/boss_pathaleon_the_calculator.cpp diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp new file mode 100644 index 00000000000..3475e83f02c --- /dev/null +++ b/src/server/scripts/Outland/CoilfangReservoir/TheSlavePens/instance_the_slave_pens.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* +This placeholder for the instance is needed for dungeon finding to be able +to give credit after the boss defined in lastEncounterDungeon is killed. +Without it, the party doing random dungeon won't get satchel of spoils and +gets instead the deserter debuff. +*/ + +#include "ScriptMgr.h" +#include "InstanceScript.h" + +class instance_the_slave_pens : public InstanceMapScript +{ +public: + instance_the_slave_pens() : InstanceMapScript("instance_the_slave_pens", 547) { } + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_the_slave_pens_InstanceMapScript(map); + } + + struct instance_the_slave_pens_InstanceMapScript : public InstanceScript + { + instance_the_slave_pens_InstanceMapScript(Map* map) : InstanceScript(map) {} + }; +}; + +void AddSC_instance_the_slave_pens() +{ + new instance_the_slave_pens(); +} diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp new file mode 100644 index 00000000000..0db48d83ebb --- /dev/null +++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_hungarfen.cpp @@ -0,0 +1,167 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_Hungarfen +SD%Complete: 95 +SDComment: Need confirmation if spell data are same in both modes. Summons should have faster rate in heroic +SDCategory: Coilfang Resevoir, Underbog +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + +enum Spells +{ + SPELL_FOUL_SPORES = 31673, + SPELL_ACID_GEYSER = 38739, + + SPELL_SPORE_CLOUD = 34168, + SPELL_PUTRID_MUSHROOM = 31690, + SPELL_GROW = 31698 +}; + +class boss_hungarfen : public CreatureScript +{ +public: + boss_hungarfen() : CreatureScript("boss_hungarfen") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_hungarfenAI(creature); + } + + struct boss_hungarfenAI : public ScriptedAI + { + boss_hungarfenAI(Creature* creature) : ScriptedAI(creature) + { + } + + bool Root; + uint32 Mushroom_Timer; + uint32 AcidGeyser_Timer; + + void Reset() OVERRIDE + { + Root = false; + Mushroom_Timer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode + AcidGeyser_Timer = 10000; + } + + void EnterCombat(Unit* /*who*/) OVERRIDE + { + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + if (!HealthAbovePct(20)) + { + if (!Root) + { + DoCast(me, SPELL_FOUL_SPORES); + Root = true; + } + } + + if (Mushroom_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + me->SummonCreature(17990, target->GetPositionX()+(rand()%8), target->GetPositionY()+(rand()%8), target->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); + else + me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); + + Mushroom_Timer = 10000; + } else Mushroom_Timer -= diff; + + if (AcidGeyser_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_ACID_GEYSER); + AcidGeyser_Timer = 10000+rand()%7500; + } else AcidGeyser_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + +}; + +class npc_underbog_mushroom : public CreatureScript +{ +public: + npc_underbog_mushroom() : CreatureScript("npc_underbog_mushroom") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new npc_underbog_mushroomAI(creature); + } + + struct npc_underbog_mushroomAI : public ScriptedAI + { + npc_underbog_mushroomAI(Creature* creature) : ScriptedAI(creature) {} + + bool Stop; + uint32 Grow_Timer; + uint32 Shrink_Timer; + + void Reset() OVERRIDE + { + Stop = false; + Grow_Timer = 0; + Shrink_Timer = 20000; + + DoCast(me, SPELL_PUTRID_MUSHROOM, true); + DoCast(me, SPELL_SPORE_CLOUD, true); + } + + void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {} + + + void AttackStart(Unit* /*who*/) OVERRIDE {} + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void UpdateAI(uint32 diff) OVERRIDE + { + if (Stop) + return; + + if (Grow_Timer <= diff) + { + DoCast(me, SPELL_GROW); + Grow_Timer = 3000; + } else Grow_Timer -= diff; + + if (Shrink_Timer <= diff) + { + me->RemoveAurasDueToSpell(SPELL_GROW); + Stop = true; + } else Shrink_Timer -= diff; + } + }; + +}; + +void AddSC_boss_hungarfen() +{ + new boss_hungarfen(); + new npc_underbog_mushroom(); +} diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp new file mode 100644 index 00000000000..c22dedd269e --- /dev/null +++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/boss_the_black_stalker.cpp @@ -0,0 +1,195 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * Copyright (C) 2006-2009 ScriptDev2 + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* ScriptData +SDName: Boss_the_black_stalker +SD%Complete: 95 +SDComment: Timers may be incorrect +SDCategory: Coilfang Resevoir, Underbog +EndScriptData */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + +enum Spells +{ + SPELL_LEVITATE = 31704, + SPELL_SUSPENSION = 31719, + SPELL_LEVITATION_PULSE = 31701, + SPELL_MAGNETIC_PULL = 31705, + SPELL_CHAIN_LIGHTNING = 31717, + SPELL_STATIC_CHARGE = 31715, + SPELL_SUMMON_SPORE_STRIDER = 38755 +}; + +enum CreatureIdS +{ + ENTRY_SPORE_STRIDER = 22299 +}; + +class boss_the_black_stalker : public CreatureScript +{ +public: + boss_the_black_stalker() : CreatureScript("boss_the_black_stalker") { } + + CreatureAI* GetAI(Creature* creature) const OVERRIDE + { + return new boss_the_black_stalkerAI(creature); + } + + struct boss_the_black_stalkerAI : public ScriptedAI + { + boss_the_black_stalkerAI(Creature* creature) : ScriptedAI(creature) + { + } + + uint32 SporeStriders_Timer; + uint32 Levitate_Timer; + uint32 ChainLightning_Timer; + uint32 StaticCharge_Timer; + uint64 LevitatedTarget; + uint32 LevitatedTarget_Timer; + bool InAir; + uint32 check_Timer; + std::list Striders; + + void Reset() OVERRIDE + { + Levitate_Timer = 12000; + ChainLightning_Timer = 6000; + StaticCharge_Timer = 10000; + SporeStriders_Timer = 10000+rand()%5000; + check_Timer = 5000; + LevitatedTarget = 0; + LevitatedTarget_Timer = 0; + Striders.clear(); + } + + void EnterCombat(Unit* /*who*/) OVERRIDE {} + + void JustSummoned(Creature* summon) OVERRIDE + { + if (summon && summon->GetEntry() == ENTRY_SPORE_STRIDER) + { + Striders.push_back(summon->GetGUID()); + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) + summon->AI()->AttackStart(target); + else + if (me->GetVictim()) + summon->AI()->AttackStart(me->GetVictim()); + } + } + + void JustDied(Unit* /*killer*/) OVERRIDE + { + for (std::list::const_iterator i = Striders.begin(); i != Striders.end(); ++i) + if (Creature* strider = Unit::GetCreature(*me, *i)) + strider->DisappearAndDie(); + } + + void UpdateAI(uint32 diff) OVERRIDE + { + if (!UpdateVictim()) + return; + + // Evade if too far + if (check_Timer <= diff) + { + float x, y, z, o; + me->GetHomePosition(x, y, z, o); + if (!me->IsWithinDist3d(x, y, z, 60)) + { + EnterEvadeMode(); + return; + } + check_Timer = 1000; + } else check_Timer -= diff; + + // Spore Striders + if (IsHeroic() && SporeStriders_Timer <= diff) + { + DoCast(me, SPELL_SUMMON_SPORE_STRIDER); + SporeStriders_Timer = 10000+rand()%5000; + } else SporeStriders_Timer -= diff; + + // Levitate + if (LevitatedTarget) + { + if (LevitatedTarget_Timer <= diff) + { + if (Unit* target = Unit::GetUnit(*me, LevitatedTarget)) + { + if (!target->HasAura(SPELL_LEVITATE)) + { + LevitatedTarget = 0; + return; + } + if (InAir) + { + target->AddAura(SPELL_SUSPENSION, target); + LevitatedTarget = 0; + } + else + { + target->CastSpell(target, SPELL_MAGNETIC_PULL, true); + InAir = true; + LevitatedTarget_Timer = 1500; + } + } + else + LevitatedTarget = 0; + } else LevitatedTarget_Timer -= diff; + } + if (Levitate_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) + { + DoCast(target, SPELL_LEVITATE); + LevitatedTarget = target->GetGUID(); + LevitatedTarget_Timer = 2000; + InAir = false; + } + Levitate_Timer = 12000+rand()%3000; + } else Levitate_Timer -= diff; + + // Chain Lightning + if (ChainLightning_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) + DoCast(target, SPELL_CHAIN_LIGHTNING); + ChainLightning_Timer = 7000; + } else ChainLightning_Timer -= diff; + + // Static Charge + if (StaticCharge_Timer <= diff) + { + if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true)) + DoCast(target, SPELL_STATIC_CHARGE); + StaticCharge_Timer = 10000; + } else StaticCharge_Timer -= diff; + + DoMeleeAttackIfReady(); + } + }; + +}; + +void AddSC_boss_the_black_stalker() +{ + new boss_the_black_stalker(); +} diff --git a/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp new file mode 100644 index 00000000000..0a305edf23f --- /dev/null +++ b/src/server/scripts/Outland/CoilfangReservoir/TheUnderbog/instance_the_underbog.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* +This placeholder for the instance is needed for dungeon finding to be able +to give credit after the boss defined in lastEncounterDungeon is killed. +Without it, the party doing random dungeon won't get satchel of spoils and +gets instead the deserter debuff. +*/ + +#include "ScriptMgr.h" +#include "InstanceScript.h" + +class instance_the_underbog : public InstanceMapScript +{ +public: + instance_the_underbog() : InstanceMapScript("instance_the_underbog", 546) { } + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_the_underbog_InstanceMapScript(map); + } + + struct instance_the_underbog_InstanceMapScript : public InstanceScript + { + instance_the_underbog_InstanceMapScript(Map* map) : InstanceScript(map) {} + }; +}; + +void AddSC_instance_the_underbog() +{ + new instance_the_underbog(); +} diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp deleted file mode 100644 index 0db48d83ebb..00000000000 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_hungarfen.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * Copyright (C) 2006-2009 ScriptDev2 - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -/* ScriptData -SDName: Boss_Hungarfen -SD%Complete: 95 -SDComment: Need confirmation if spell data are same in both modes. Summons should have faster rate in heroic -SDCategory: Coilfang Resevoir, Underbog -EndScriptData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" - -enum Spells -{ - SPELL_FOUL_SPORES = 31673, - SPELL_ACID_GEYSER = 38739, - - SPELL_SPORE_CLOUD = 34168, - SPELL_PUTRID_MUSHROOM = 31690, - SPELL_GROW = 31698 -}; - -class boss_hungarfen : public CreatureScript -{ -public: - boss_hungarfen() : CreatureScript("boss_hungarfen") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_hungarfenAI(creature); - } - - struct boss_hungarfenAI : public ScriptedAI - { - boss_hungarfenAI(Creature* creature) : ScriptedAI(creature) - { - } - - bool Root; - uint32 Mushroom_Timer; - uint32 AcidGeyser_Timer; - - void Reset() OVERRIDE - { - Root = false; - Mushroom_Timer = 5000; // 1 mushroom after 5s, then one per 10s. This should be different in heroic mode - AcidGeyser_Timer = 10000; - } - - void EnterCombat(Unit* /*who*/) OVERRIDE - { - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - if (!HealthAbovePct(20)) - { - if (!Root) - { - DoCast(me, SPELL_FOUL_SPORES); - Root = true; - } - } - - if (Mushroom_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - me->SummonCreature(17990, target->GetPositionX()+(rand()%8), target->GetPositionY()+(rand()%8), target->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); - else - me->SummonCreature(17990, me->GetPositionX()+(rand()%8), me->GetPositionY()+(rand()%8), me->GetPositionZ(), float(rand()%5), TEMPSUMMON_TIMED_DESPAWN, 22000); - - Mushroom_Timer = 10000; - } else Mushroom_Timer -= diff; - - if (AcidGeyser_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_ACID_GEYSER); - AcidGeyser_Timer = 10000+rand()%7500; - } else AcidGeyser_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; - -}; - -class npc_underbog_mushroom : public CreatureScript -{ -public: - npc_underbog_mushroom() : CreatureScript("npc_underbog_mushroom") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_underbog_mushroomAI(creature); - } - - struct npc_underbog_mushroomAI : public ScriptedAI - { - npc_underbog_mushroomAI(Creature* creature) : ScriptedAI(creature) {} - - bool Stop; - uint32 Grow_Timer; - uint32 Shrink_Timer; - - void Reset() OVERRIDE - { - Stop = false; - Grow_Timer = 0; - Shrink_Timer = 20000; - - DoCast(me, SPELL_PUTRID_MUSHROOM, true); - DoCast(me, SPELL_SPORE_CLOUD, true); - } - - void MoveInLineOfSight(Unit* /*who*/) OVERRIDE {} - - - void AttackStart(Unit* /*who*/) OVERRIDE {} - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void UpdateAI(uint32 diff) OVERRIDE - { - if (Stop) - return; - - if (Grow_Timer <= diff) - { - DoCast(me, SPELL_GROW); - Grow_Timer = 3000; - } else Grow_Timer -= diff; - - if (Shrink_Timer <= diff) - { - me->RemoveAurasDueToSpell(SPELL_GROW); - Stop = true; - } else Shrink_Timer -= diff; - } - }; - -}; - -void AddSC_boss_hungarfen() -{ - new boss_hungarfen(); - new npc_underbog_mushroom(); -} diff --git a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp deleted file mode 100644 index c22dedd269e..00000000000 --- a/src/server/scripts/Outland/CoilfangReservoir/underbog/boss_the_black_stalker.cpp +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (C) 2008-2013 TrinityCore - * Copyright (C) 2006-2009 ScriptDev2 - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along - * with this program. If not, see . - */ - -/* ScriptData -SDName: Boss_the_black_stalker -SD%Complete: 95 -SDComment: Timers may be incorrect -SDCategory: Coilfang Resevoir, Underbog -EndScriptData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" - -enum Spells -{ - SPELL_LEVITATE = 31704, - SPELL_SUSPENSION = 31719, - SPELL_LEVITATION_PULSE = 31701, - SPELL_MAGNETIC_PULL = 31705, - SPELL_CHAIN_LIGHTNING = 31717, - SPELL_STATIC_CHARGE = 31715, - SPELL_SUMMON_SPORE_STRIDER = 38755 -}; - -enum CreatureIdS -{ - ENTRY_SPORE_STRIDER = 22299 -}; - -class boss_the_black_stalker : public CreatureScript -{ -public: - boss_the_black_stalker() : CreatureScript("boss_the_black_stalker") { } - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new boss_the_black_stalkerAI(creature); - } - - struct boss_the_black_stalkerAI : public ScriptedAI - { - boss_the_black_stalkerAI(Creature* creature) : ScriptedAI(creature) - { - } - - uint32 SporeStriders_Timer; - uint32 Levitate_Timer; - uint32 ChainLightning_Timer; - uint32 StaticCharge_Timer; - uint64 LevitatedTarget; - uint32 LevitatedTarget_Timer; - bool InAir; - uint32 check_Timer; - std::list Striders; - - void Reset() OVERRIDE - { - Levitate_Timer = 12000; - ChainLightning_Timer = 6000; - StaticCharge_Timer = 10000; - SporeStriders_Timer = 10000+rand()%5000; - check_Timer = 5000; - LevitatedTarget = 0; - LevitatedTarget_Timer = 0; - Striders.clear(); - } - - void EnterCombat(Unit* /*who*/) OVERRIDE {} - - void JustSummoned(Creature* summon) OVERRIDE - { - if (summon && summon->GetEntry() == ENTRY_SPORE_STRIDER) - { - Striders.push_back(summon->GetGUID()); - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) - summon->AI()->AttackStart(target); - else - if (me->GetVictim()) - summon->AI()->AttackStart(me->GetVictim()); - } - } - - void JustDied(Unit* /*killer*/) OVERRIDE - { - for (std::list::const_iterator i = Striders.begin(); i != Striders.end(); ++i) - if (Creature* strider = Unit::GetCreature(*me, *i)) - strider->DisappearAndDie(); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - // Evade if too far - if (check_Timer <= diff) - { - float x, y, z, o; - me->GetHomePosition(x, y, z, o); - if (!me->IsWithinDist3d(x, y, z, 60)) - { - EnterEvadeMode(); - return; - } - check_Timer = 1000; - } else check_Timer -= diff; - - // Spore Striders - if (IsHeroic() && SporeStriders_Timer <= diff) - { - DoCast(me, SPELL_SUMMON_SPORE_STRIDER); - SporeStriders_Timer = 10000+rand()%5000; - } else SporeStriders_Timer -= diff; - - // Levitate - if (LevitatedTarget) - { - if (LevitatedTarget_Timer <= diff) - { - if (Unit* target = Unit::GetUnit(*me, LevitatedTarget)) - { - if (!target->HasAura(SPELL_LEVITATE)) - { - LevitatedTarget = 0; - return; - } - if (InAir) - { - target->AddAura(SPELL_SUSPENSION, target); - LevitatedTarget = 0; - } - else - { - target->CastSpell(target, SPELL_MAGNETIC_PULL, true); - InAir = true; - LevitatedTarget_Timer = 1500; - } - } - else - LevitatedTarget = 0; - } else LevitatedTarget_Timer -= diff; - } - if (Levitate_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1)) - { - DoCast(target, SPELL_LEVITATE); - LevitatedTarget = target->GetGUID(); - LevitatedTarget_Timer = 2000; - InAir = false; - } - Levitate_Timer = 12000+rand()%3000; - } else Levitate_Timer -= diff; - - // Chain Lightning - if (ChainLightning_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0)) - DoCast(target, SPELL_CHAIN_LIGHTNING); - ChainLightning_Timer = 7000; - } else ChainLightning_Timer -= diff; - - // Static Charge - if (StaticCharge_Timer <= diff) - { - if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 30, true)) - DoCast(target, SPELL_STATIC_CHARGE); - StaticCharge_Timer = 10000; - } else StaticCharge_Timer -= diff; - - DoMeleeAttackIfReady(); - } - }; - -}; - -void AddSC_boss_the_black_stalker() -{ - new boss_the_black_stalker(); -} -- cgit v1.2.3 From 1ad954e215faa04784806a01774a70900439e952 Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Sat, 17 Aug 2013 19:14:48 +0300 Subject: Core/Scripts: Placeholders for instances Maraudon and Dire Maul. It is needed for Random Dungeon Finder credit. --- sql/updates/world/2013_08_17_04_world_misc.sql | 2 + src/server/game/Scripting/ScriptLoader.cpp | 4 ++ src/server/scripts/Kalimdor/CMakeLists.txt | 2 + .../Kalimdor/DireMaul/instance_dire_maul.cpp | 47 ++++++++++++++++++++++ .../Kalimdor/Maraudon/instance_maraudon.cpp | 47 ++++++++++++++++++++++ 5 files changed, 102 insertions(+) create mode 100644 sql/updates/world/2013_08_17_04_world_misc.sql create mode 100644 src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp create mode 100644 src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp (limited to 'src/server/game/Scripting/ScriptLoader.cpp') diff --git a/sql/updates/world/2013_08_17_04_world_misc.sql b/sql/updates/world/2013_08_17_04_world_misc.sql new file mode 100644 index 00000000000..0ecc2ada335 --- /dev/null +++ b/sql/updates/world/2013_08_17_04_world_misc.sql @@ -0,0 +1,2 @@ +UPDATE `instance_template` SET `script`='instance_maraudon' WHERE `map`=349; +UPDATE `instance_template` SET `script`='instance_dire_maul' WHERE `map`=429; diff --git a/src/server/game/Scripting/ScriptLoader.cpp b/src/server/game/Scripting/ScriptLoader.cpp index 82537816d44..ed0972c3301 100644 --- a/src/server/game/Scripting/ScriptLoader.cpp +++ b/src/server/game/Scripting/ScriptLoader.cpp @@ -311,10 +311,12 @@ void AddSC_boss_mal_ganis(); void AddSC_boss_meathook(); void AddSC_culling_of_stratholme(); void AddSC_instance_culling_of_stratholme(); +void AddSC_instance_dire_maul(); //Dire Maul void AddSC_boss_celebras_the_cursed(); //Maraudon void AddSC_boss_landslide(); void AddSC_boss_noxxion(); void AddSC_boss_ptheradras(); +void AddSC_instance_maraudon(); void AddSC_boss_onyxia(); //Onyxia's Lair void AddSC_instance_onyxias_lair(); void AddSC_boss_amnennar_the_coldbringer(); //Razorfen Downs @@ -974,10 +976,12 @@ void AddKalimdorScripts() AddSC_boss_meathook(); AddSC_culling_of_stratholme(); AddSC_instance_culling_of_stratholme(); + AddSC_instance_dire_maul(); //Dire Maul AddSC_boss_celebras_the_cursed(); //Maraudon AddSC_boss_landslide(); AddSC_boss_noxxion(); AddSC_boss_ptheradras(); + AddSC_instance_maraudon(); AddSC_boss_onyxia(); //Onyxia's Lair AddSC_instance_onyxias_lair(); AddSC_boss_amnennar_the_coldbringer(); //Razorfen Downs diff --git a/src/server/scripts/Kalimdor/CMakeLists.txt b/src/server/scripts/Kalimdor/CMakeLists.txt index f5a9db94a0e..17c360a54b2 100644 --- a/src/server/scripts/Kalimdor/CMakeLists.txt +++ b/src/server/scripts/Kalimdor/CMakeLists.txt @@ -67,6 +67,7 @@ set(scripts_STAT_SRCS Kalimdor/Maraudon/boss_landslide.cpp Kalimdor/Maraudon/boss_celebras_the_cursed.cpp Kalimdor/Maraudon/boss_noxxion.cpp + Kalimdor/Maraudon/instance_maraudon.cpp Kalimdor/TempleOfAhnQiraj/boss_fankriss.cpp Kalimdor/TempleOfAhnQiraj/boss_huhuran.cpp Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -113,6 +114,7 @@ set(scripts_STAT_SRCS Kalimdor/OnyxiasLair/onyxias_lair.h Kalimdor/OnyxiasLair/instance_onyxias_lair.cpp Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp + Kalimdor/DireMaul/instance_dire_maul.cpp ) message(" -> Prepared: Kalimdor") diff --git a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp new file mode 100644 index 00000000000..a478d7aea25 --- /dev/null +++ b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* +This placeholder for the instance is needed for dungeon finding to be able +to give credit after the boss defined in lastEncounterDungeon is killed. +Without it, the party doing random dungeon won't get satchel of spoils and +gets instead the deserter debuff. +*/ + +#include "ScriptMgr.h" +#include "InstanceScript.h" + +class instance_dire_maul : public InstanceMapScript +{ +public: + instance_dire_maul() : InstanceMapScript("instance_dire_maul", 429) { } + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_dire_maul_InstanceMapScript(map); + } + + struct instance_dire_maul_InstanceMapScript : public InstanceScript + { + instance_dire_maul_InstanceMapScript(Map* map) : InstanceScript(map) {} + }; +}; + +void AddSC_instance_dire_maul() +{ + new instance_dire_maul(); +} diff --git a/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp new file mode 100644 index 00000000000..a44f4078a9b --- /dev/null +++ b/src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2008-2013 TrinityCore + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +/* +This placeholder for the instance is needed for dungeon finding to be able +to give credit after the boss defined in lastEncounterDungeon is killed. +Without it, the party doing random dungeon won't get satchel of spoils and +gets instead the deserter debuff. +*/ + +#include "ScriptMgr.h" +#include "InstanceScript.h" + +class instance_maraudon : public InstanceMapScript +{ +public: + instance_maraudon() : InstanceMapScript("instance_maraudon", 349) { } + + InstanceScript* GetInstanceScript(InstanceMap* map) const OVERRIDE + { + return new instance_maraudon_InstanceMapScript(map); + } + + struct instance_maraudon_InstanceMapScript : public InstanceScript + { + instance_maraudon_InstanceMapScript(Map* map) : InstanceScript(map) {} + }; +}; + +void AddSC_instance_maraudon() +{ + new instance_maraudon(); +} -- cgit v1.2.3