From 4e29cf74b30dd675bc26bcd2d2897f535a844193 Mon Sep 17 00:00:00 2001 From: Vincent-Michael Date: Sun, 20 Jul 2014 19:44:26 +0200 Subject: Scripts/EasternKingdoms: Burn with fire (hihi) --- src/server/scripts/EasternKingdoms/CMakeLists.txt | 3 - .../EasternKingdoms/zone_alterac_mountains.cpp | 35 ---- .../scripts/EasternKingdoms/zone_ironforge.cpp | 23 --- .../scripts/EasternKingdoms/zone_westfall.cpp | 207 --------------------- 4 files changed, 268 deletions(-) delete mode 100644 src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp delete mode 100644 src/server/scripts/EasternKingdoms/zone_ironforge.cpp delete mode 100644 src/server/scripts/EasternKingdoms/zone_westfall.cpp (limited to 'src/server/scripts') diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt index ef2e9fceb21..61a5037fa00 100644 --- a/src/server/scripts/EasternKingdoms/CMakeLists.txt +++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt @@ -106,7 +106,6 @@ set(scripts_STAT_SRCS EasternKingdoms/Gnomeregan/gnomeregan.cpp EasternKingdoms/Gnomeregan/gnomeregan.h EasternKingdoms/zone_redridge_mountains.cpp - EasternKingdoms/zone_ironforge.cpp EasternKingdoms/ScarletEnclave/chapter2.cpp EasternKingdoms/ScarletEnclave/chapter5.cpp EasternKingdoms/ScarletEnclave/chapter1.cpp @@ -189,8 +188,6 @@ set(scripts_STAT_SRCS EasternKingdoms/ZulAman/zulaman.h EasternKingdoms/zone_hinterlands.cpp EasternKingdoms/zone_western_plaguelands.cpp - EasternKingdoms/zone_alterac_mountains.cpp - EasternKingdoms/zone_westfall.cpp EasternKingdoms/zone_silverpine_forest.cpp EasternKingdoms/Karazhan/instance_karazhan.cpp EasternKingdoms/Karazhan/boss_nightbane.cpp diff --git a/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp b/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp deleted file mode 100644 index 3df4fddf69f..00000000000 --- a/src/server/scripts/EasternKingdoms/zone_alterac_mountains.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2008-2014 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: Alterac_Mountains -SD%Complete: 0 -SDComment: Placeholder -SDCategory: Alterac Mountains -EndScriptData */ - -/* ContentData -EndContentData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" - -/*void AddSC_alterac_mountains() -{ - Script* newscript; -}*/ diff --git a/src/server/scripts/EasternKingdoms/zone_ironforge.cpp b/src/server/scripts/EasternKingdoms/zone_ironforge.cpp deleted file mode 100644 index e50bbb9f3e0..00000000000 --- a/src/server/scripts/EasternKingdoms/zone_ironforge.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (C) 2008-2014 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 . - */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedGossip.h" -#include "Player.h" - -void AddSC_ironforge() { } diff --git a/src/server/scripts/EasternKingdoms/zone_westfall.cpp b/src/server/scripts/EasternKingdoms/zone_westfall.cpp deleted file mode 100644 index 7f0fbd8f97b..00000000000 --- a/src/server/scripts/EasternKingdoms/zone_westfall.cpp +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Copyright (C) 2008-2014 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: Westfall -SD%Complete: 90 -SDComment: Quest support: 1651 -SDCategory: Westfall -EndScriptData */ - -/* ContentData -npc_daphne_stilwell -EndContentData */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "ScriptedEscortAI.h" -#include "Player.h" - -/*###### -## npc_daphne_stilwell -######*/ - -enum DaphneStilwell -{ - // Yells - SAY_DS_START = 0, - SAY_DS_DOWN_1 = 1, - SAY_DS_DOWN_2 = 2, - SAY_DS_DOWN_3 = 3, - SAY_DS_PROLOGUE = 4, - - // Spells - SPELL_SHOOT = 6660, - - // Quests - QUEST_TOME_VALOR = 1651, - - // Creatures - NPC_DEFIAS_RAIDER = 6180, - - // Equips - EQUIP_ID_RIFLE = 2511 -}; - -class npc_daphne_stilwell : public CreatureScript -{ -public: - npc_daphne_stilwell() : CreatureScript("npc_daphne_stilwell") { } - - bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest) override - { - if (quest->GetQuestId() == QUEST_TOME_VALOR) - { - creature->AI()->Talk(SAY_DS_START); - - if (npc_escortAI* pEscortAI = CAST_AI(npc_daphne_stilwell::npc_daphne_stilwellAI, creature->AI())) - pEscortAI->Start(true, true, player->GetGUID()); - } - - return true; - } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_daphne_stilwellAI(creature); - } - - struct npc_daphne_stilwellAI : public npc_escortAI - { - npc_daphne_stilwellAI(Creature* creature) : npc_escortAI(creature) { } - - uint32 uiWPHolder; - uint32 uiShootTimer; - - void Reset() override - { - if (HasEscortState(STATE_ESCORT_ESCORTING)) - { - switch (uiWPHolder) - { - case 7: - Talk(SAY_DS_DOWN_1); - break; - case 8: - Talk(SAY_DS_DOWN_2); - break; - case 9: - Talk(SAY_DS_DOWN_3); - break; - } - } - else - uiWPHolder = 0; - - uiShootTimer = 0; - } - - void WaypointReached(uint32 waypointId) override - { - Player* player = GetPlayerForEscort(); - if (!player) - return; - - uiWPHolder = waypointId; - - switch (waypointId) - { - case 4: - SetEquipmentSlots(false, EQUIP_NO_CHANGE, EQUIP_NO_CHANGE, EQUIP_ID_RIFLE); - me->SetSheath(SHEATH_STATE_RANGED); - me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING_NO_SHEATHE); - break; - case 7: - me->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 8: - me->SetSheath(SHEATH_STATE_RANGED); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037f, 1570.213f, 54.961f, 4.283f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 9: - me->SetSheath(SHEATH_STATE_RANGED); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11450.836f, 1569.755f, 54.267f, 4.230f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11449.697f, 1569.124f, 54.421f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11448.237f, 1568.307f, 54.620f, 4.206f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11448.037f, 1570.213f, 54.961f, 4.283f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - me->SummonCreature(NPC_DEFIAS_RAIDER, -11449.018f, 1570.738f, 54.828f, 4.220f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); - break; - case 10: - SetRun(false); - break; - case 11: - Talk(SAY_DS_PROLOGUE); - break; - case 13: - SetEquipmentSlots(true); - me->SetSheath(SHEATH_STATE_UNARMED); - me->HandleEmoteCommand(EMOTE_STATE_USE_STANDING_NO_SHEATHE); - break; - case 17: - player->GroupEventHappens(QUEST_TOME_VALOR, me); - break; - } - } - - void AttackStart(Unit* who) override - { - if (!who) - return; - - if (me->Attack(who, false)) - { - me->AddThreat(who, 0.0f); - me->SetInCombatWith(who); - who->SetInCombatWith(me); - - me->GetMotionMaster()->MoveChase(who, 30.0f); - } - } - - void JustSummoned(Creature* summoned) override - { - summoned->AI()->AttackStart(me); - } - - void Update(const uint32 diff) - { - npc_escortAI::UpdateAI(diff); - - if (!UpdateVictim()) - return; - - if (uiShootTimer <= diff) - { - uiShootTimer = 1500; - - if (!me->IsWithinDist(me->GetVictim(), ATTACK_DISTANCE)) - DoCastVictim(SPELL_SHOOT); - } else uiShootTimer -= diff; - } - }; -}; - -void AddSC_westfall() -{ - new npc_daphne_stilwell(); -} -- cgit v1.2.3 From 1a391e9fbdfe6e0d3faf7a362e6250ece75204b9 Mon Sep 17 00:00:00 2001 From: Golrag Date: Mon, 21 Jul 2014 03:05:27 +0100 Subject: Scripts/ICC: Added Orange/Green Blight Residue Closes #5920 Closes #12464 (PR) Signed-off-by: DDuarte --- .../2014_07_21_04_world_spell_script_names.sql | 6 +++ .../Northrend/IcecrownCitadel/boss_festergut.cpp | 30 +++++++++++++- .../Northrend/IcecrownCitadel/boss_rotface.cpp | 48 ++++++++++++++++++++++ 3 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 sql/updates/world/2014_07_21_04_world_spell_script_names.sql (limited to 'src/server/scripts') diff --git a/sql/updates/world/2014_07_21_04_world_spell_script_names.sql b/sql/updates/world/2014_07_21_04_world_spell_script_names.sql new file mode 100644 index 00000000000..c7080adb88e --- /dev/null +++ b/sql/updates/world/2014_07_21_04_world_spell_script_names.sql @@ -0,0 +1,6 @@ +DELETE FROM spell_script_names WHERE spell_id IN (69507, 71213, 73189, 73190); +INSERT INTO spell_script_names VALUES +(69507, 'spell_rotface_slime_spray'), +(71213, 'spell_rotface_slime_spray'), +(73189, 'spell_rotface_slime_spray'), +(73190, 'spell_rotface_slime_spray'); diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index 4e45d72cadf..96cc16fda8c 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -457,11 +457,39 @@ class spell_festergut_blighted_spores : public SpellScriptLoader if (InstanceScript* instance = GetTarget()->GetInstanceScript()) if (Creature* festergut = ObjectAccessor::GetCreature(*GetTarget(), instance->GetData64(DATA_FESTERGUT))) festergut->AI()->SetData(DATA_INOCULATED_STACK, GetStackAmount()); + + HandleResidue(); + } + + void HandleResidue() + { + Player* target = GetUnitOwner()->ToPlayer(); + if (!target) + return; + + if (target->HasAura(SPELL_ORANGE_BLIGHT_RESIDUE)) + return; + + if (target->GetMap() && !target->GetMap()->Is25ManRaid()) + { + if (target->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) != QUEST_STATUS_INCOMPLETE) + return; + + target->CastSpell(target, SPELL_ORANGE_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK); + } + + if (target->GetMap() && target->GetMap()->Is25ManRaid()) + { + if (target->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) != QUEST_STATUS_INCOMPLETE) + return; + + target->CastSpell(target, SPELL_ORANGE_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK); + } } void Register() override { - AfterEffectApply += AuraEffectApplyFn(spell_festergut_blighted_spores_AuraScript::ExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); + OnEffectRemove += AuraEffectApplyFn(spell_festergut_blighted_spores_AuraScript::ExtraEffect, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK); } }; diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp index c1ee616218c..2f2889a9cf3 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_rotface.cpp @@ -862,6 +862,53 @@ class spell_rotface_vile_gas_trigger : public SpellScriptLoader } }; +class spell_rotface_slime_spray : public SpellScriptLoader +{ + public: + spell_rotface_slime_spray() : SpellScriptLoader("spell_rotface_slime_spray") { } + + class spell_rotface_slime_spray_SpellScript : public SpellScript + { + PrepareSpellScript(spell_rotface_slime_spray_SpellScript); + + void HandleResidue() + { + Player* target = GetHitPlayer(); + if (!target) + return; + + if (target->HasAura(SPELL_GREEN_BLIGHT_RESIDUE)) + return; + + if (target->GetMap() && !target->GetMap()->Is25ManRaid()) + { + if (target->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_10) != QUEST_STATUS_INCOMPLETE) + return; + + target->CastSpell(target, SPELL_GREEN_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK); + } + + if (target->GetMap() && target->GetMap()->Is25ManRaid()) + { + if (target->GetQuestStatus(QUEST_RESIDUE_RENDEZVOUS_25) != QUEST_STATUS_INCOMPLETE) + return; + + target->CastSpell(target, SPELL_GREEN_BLIGHT_RESIDUE, TRIGGERED_FULL_MASK); + } + } + + void Register() override + { + OnHit += SpellHitFn(spell_rotface_slime_spray_SpellScript::HandleResidue); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_rotface_slime_spray_SpellScript(); + } +}; + void AddSC_boss_rotface() { new boss_rotface(); @@ -877,4 +924,5 @@ void AddSC_boss_rotface() new spell_rotface_unstable_ooze_explosion(); new spell_rotface_unstable_ooze_explosion_suicide(); new spell_rotface_vile_gas_trigger(); + new spell_rotface_slime_spray(); } -- cgit v1.2.3 From 1b6ac4ac3a3af494d618f7e4ed3a5439877f80c7 Mon Sep 17 00:00:00 2001 From: Duarte Duarte Date: Mon, 21 Jul 2014 23:25:14 +0100 Subject: Scripts/ICC: Fix non-pch build --- src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/server/scripts') diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp index 96cc16fda8c..90d91199e7a 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_festergut.cpp @@ -20,6 +20,7 @@ #include "ScriptedCreature.h" #include "SpellAuras.h" #include "icecrown_citadel.h" +#include "Player.h" enum ScriptTexts { -- cgit v1.2.3