From dbfc4b83aa64425cf14e8c40cc5605ca91d5b8f4 Mon Sep 17 00:00:00 2001 From: Malcrom Date: Wed, 2 Jan 2013 15:08:13 -0330 Subject: Core/Scripting: Some file name updates. --- src/server/scripts/EasternKingdoms/CMakeLists.txt | 2 +- .../ScarletEnclave/the_scarlet_enclave.cpp | 124 --------------------- .../ScarletEnclave/zone_the_scarlet_enclave.cpp | 124 +++++++++++++++++++++ src/server/scripts/Northrend/CMakeLists.txt | 4 +- .../Nexus/Nexus/boss_commander_kolurg.cpp | 75 +++++++++++++ .../Nexus/Nexus/boss_commander_stoutbeard.cpp | 71 ++++++++++++ .../Northrend/Nexus/Nexus/commander_kolurg.cpp | 75 ------------- .../Northrend/Nexus/Nexus/commander_stoutbeard.cpp | 71 ------------ 8 files changed, 273 insertions(+), 273 deletions(-) delete mode 100644 src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp create mode 100644 src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp create mode 100644 src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp create mode 100644 src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp delete mode 100644 src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp delete mode 100644 src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp (limited to 'src') diff --git a/src/server/scripts/EasternKingdoms/CMakeLists.txt b/src/server/scripts/EasternKingdoms/CMakeLists.txt index bbdbe396a95..15faf9dfb83 100644 --- a/src/server/scripts/EasternKingdoms/CMakeLists.txt +++ b/src/server/scripts/EasternKingdoms/CMakeLists.txt @@ -71,7 +71,7 @@ set(scripts_STAT_SRCS EasternKingdoms/ScarletEnclave/chapter2.cpp EasternKingdoms/ScarletEnclave/chapter5.cpp EasternKingdoms/ScarletEnclave/chapter1.cpp - EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp + EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp EasternKingdoms/zone_eastern_plaguelands.cpp EasternKingdoms/MoltenCore/boss_gehennas.cpp EasternKingdoms/MoltenCore/boss_lucifron.cpp diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp deleted file mode 100644 index a86b15a7f5c..00000000000 --- a/src/server/scripts/EasternKingdoms/ScarletEnclave/the_scarlet_enclave.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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 . - */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" -#include "PassiveAI.h" -#include "Player.h" - -/*#### -## npc_valkyr_battle_maiden -####*/ -#define SPELL_REVIVE 51918 -#define VALK_WHISPER "It is not yet your time, champion. Rise! Rise and fight once more!" - -class npc_valkyr_battle_maiden : public CreatureScript -{ -public: - npc_valkyr_battle_maiden() : CreatureScript("npc_valkyr_battle_maiden") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_valkyr_battle_maidenAI (creature); - } - - struct npc_valkyr_battle_maidenAI : public PassiveAI - { - npc_valkyr_battle_maidenAI(Creature* creature) : PassiveAI(creature) {} - - uint32 FlyBackTimer; - float x, y, z; - uint32 phase; - - void Reset() - { - me->setActive(true); - me->SetVisible(false); - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - me->SetCanFly(true); - FlyBackTimer = 500; - phase = 0; - - me->GetPosition(x, y, z); - z += 4.0f; - x -= 3.5f; - y -= 5.0f; - me->GetMotionMaster()->Clear(false); - me->SetPosition(x, y, z, 0.0f); - } - - void UpdateAI(const uint32 diff) - { - if (FlyBackTimer <= diff) - { - Player* player = NULL; - if (me->isSummon()) - if (Unit* summoner = me->ToTempSummon()->GetSummoner()) - if (summoner->GetTypeId() == TYPEID_PLAYER) - player = CAST_PLR(summoner); - - if (!player) - phase = 3; - - switch (phase) - { - case 0: - me->SetWalk(false); - me->HandleEmoteCommand(EMOTE_STATE_FLYGRABCLOSED); - FlyBackTimer = 500; - break; - case 1: - player->GetClosePoint(x, y, z, me->GetObjectSize()); - z += 2.5f; - x -= 2.0f; - y -= 1.5f; - me->GetMotionMaster()->MovePoint(0, x, y, z); - me->SetTarget(player->GetGUID()); - me->SetVisible(true); - FlyBackTimer = 4500; - break; - case 2: - if (!player->isRessurectRequested()) - { - me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_01); - DoCast(player, SPELL_REVIVE, true); - me->MonsterWhisper(VALK_WHISPER, player->GetGUID()); - } - FlyBackTimer = 5000; - break; - case 3: - me->SetVisible(false); - FlyBackTimer = 3000; - break; - case 4: - me->DisappearAndDie(); - break; - default: - //Nothing To DO - break; - } - ++phase; - } else FlyBackTimer-=diff; - } - }; - -}; - -void AddSC_the_scarlet_enclave() -{ - new npc_valkyr_battle_maiden(); -} diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp new file mode 100644 index 00000000000..a86b15a7f5c --- /dev/null +++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/zone_the_scarlet_enclave.cpp @@ -0,0 +1,124 @@ +/* + * 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 . + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "PassiveAI.h" +#include "Player.h" + +/*#### +## npc_valkyr_battle_maiden +####*/ +#define SPELL_REVIVE 51918 +#define VALK_WHISPER "It is not yet your time, champion. Rise! Rise and fight once more!" + +class npc_valkyr_battle_maiden : public CreatureScript +{ +public: + npc_valkyr_battle_maiden() : CreatureScript("npc_valkyr_battle_maiden") { } + + CreatureAI* GetAI(Creature* creature) const + { + return new npc_valkyr_battle_maidenAI (creature); + } + + struct npc_valkyr_battle_maidenAI : public PassiveAI + { + npc_valkyr_battle_maidenAI(Creature* creature) : PassiveAI(creature) {} + + uint32 FlyBackTimer; + float x, y, z; + uint32 phase; + + void Reset() + { + me->setActive(true); + me->SetVisible(false); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + me->SetCanFly(true); + FlyBackTimer = 500; + phase = 0; + + me->GetPosition(x, y, z); + z += 4.0f; + x -= 3.5f; + y -= 5.0f; + me->GetMotionMaster()->Clear(false); + me->SetPosition(x, y, z, 0.0f); + } + + void UpdateAI(const uint32 diff) + { + if (FlyBackTimer <= diff) + { + Player* player = NULL; + if (me->isSummon()) + if (Unit* summoner = me->ToTempSummon()->GetSummoner()) + if (summoner->GetTypeId() == TYPEID_PLAYER) + player = CAST_PLR(summoner); + + if (!player) + phase = 3; + + switch (phase) + { + case 0: + me->SetWalk(false); + me->HandleEmoteCommand(EMOTE_STATE_FLYGRABCLOSED); + FlyBackTimer = 500; + break; + case 1: + player->GetClosePoint(x, y, z, me->GetObjectSize()); + z += 2.5f; + x -= 2.0f; + y -= 1.5f; + me->GetMotionMaster()->MovePoint(0, x, y, z); + me->SetTarget(player->GetGUID()); + me->SetVisible(true); + FlyBackTimer = 4500; + break; + case 2: + if (!player->isRessurectRequested()) + { + me->HandleEmoteCommand(EMOTE_ONESHOT_CUSTOM_SPELL_01); + DoCast(player, SPELL_REVIVE, true); + me->MonsterWhisper(VALK_WHISPER, player->GetGUID()); + } + FlyBackTimer = 5000; + break; + case 3: + me->SetVisible(false); + FlyBackTimer = 3000; + break; + case 4: + me->DisappearAndDie(); + break; + default: + //Nothing To DO + break; + } + ++phase; + } else FlyBackTimer-=diff; + } + }; + +}; + +void AddSC_the_scarlet_enclave() +{ + new npc_valkyr_battle_maiden(); +} diff --git a/src/server/scripts/Northrend/CMakeLists.txt b/src/server/scripts/Northrend/CMakeLists.txt index 18549a1bf70..1da1e4ab178 100644 --- a/src/server/scripts/Northrend/CMakeLists.txt +++ b/src/server/scripts/Northrend/CMakeLists.txt @@ -78,8 +78,8 @@ set(scripts_STAT_SRCS Northrend/Nexus/Oculus/boss_urom.cpp Northrend/Nexus/Oculus/oculus.cpp Northrend/Nexus/Oculus/instance_oculus.cpp - Northrend/Nexus/Nexus/commander_kolurg.cpp - Northrend/Nexus/Nexus/commander_stoutbeard.cpp + Northrend/Nexus/Nexus/boss_commander_kolurg.cpp + Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp Northrend/Nexus/Nexus/boss_ormorok.cpp Northrend/Nexus/Nexus/boss_magus_telestra.cpp Northrend/Nexus/Nexus/instance_nexus.cpp diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp new file mode 100644 index 00000000000..fedb1f5cebc --- /dev/null +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_kolurg.cpp @@ -0,0 +1,75 @@ +/* + * 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 . + */ + +/* Script Data Start +SDName: Boss Commander Kolurg +SDAuthor: LordVanMartin +SD%Complete: +SDComment: Only Alliance Heroic +SDCategory: +Script Data End */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + +#define SPELL_BATTLE_SHOUT 31403 +#define SPELL_CHARGE 60067 +#define SPELL_FRIGHTENING_SHOUT 19134 +#define SPELL_WHIRLWIND_1 38619 +#define SPELL_WHIRLWIND_2 38618 + +//not used +//Yell +#define SAY_AGGRO -1576024 +#define SAY_KILL -1576025 +#define SAY_DEATH -1576026 + +class boss_commander_kolurg : public CreatureScript +{ +public: + boss_commander_kolurg() : CreatureScript("boss_commander_kolurg") { } + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_commander_kolurgAI (creature); + } + + struct boss_commander_kolurgAI : public ScriptedAI + { + boss_commander_kolurgAI(Creature* creature) : ScriptedAI(creature) {} + + void Reset() {} + void EnterCombat(Unit* /*who*/) {} + void AttackStart(Unit* /*who*/) {} + void MoveInLineOfSight(Unit* /*who*/) {} + void UpdateAI(const uint32 /*diff*/) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + void JustDied(Unit* /*killer*/) {} + }; + +}; + +void AddSC_boss_commander_kolurg() +{ + new boss_commander_kolurg(); +} diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp new file mode 100644 index 00000000000..39c93f15d6f --- /dev/null +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_commander_stoutbeard.cpp @@ -0,0 +1,71 @@ +/* + * 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 . + */ + +/* Script Data Start +SDName: Boss Commander Stoutbeard +SDAuthor: LordVanMartin +SD%Complete: +SDComment: Only Horde Heroic +SDCategory: +Script Data End */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" + +enum CommanderStoutbeard +{ + SPELL_BATTLE_SHOUT = 31403, + SPELL_CHARGE = 60067, + SPELL_FRIGHTENING_SHOUT = 19134, + SPELL_WHIRLWIND_1 = 38619, + SPELL_WHIRLWIND_2 = 38618 +}; + + +class boss_commander_stoutbeard : public CreatureScript +{ +public: + boss_commander_stoutbeard() : CreatureScript("boss_commander_stoutbeard") { } + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_commander_stoutbeardAI (creature); + } + + struct boss_commander_stoutbeardAI : public ScriptedAI + { + boss_commander_stoutbeardAI(Creature* creature) : ScriptedAI(creature) {} + + void Reset() {} + void AttackStart(Unit* /*who*/) {} + void MoveInLineOfSight(Unit* /*who*/) {} + void UpdateAI(const uint32 /*diff*/) + { + //Return since we have no target + if (!UpdateVictim()) + return; + + DoMeleeAttackIfReady(); + } + }; + +}; + +void AddSC_boss_commander_stoutbeard() +{ + new boss_commander_stoutbeard(); +} diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp deleted file mode 100644 index fedb1f5cebc..00000000000 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp +++ /dev/null @@ -1,75 +0,0 @@ -/* - * 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 . - */ - -/* Script Data Start -SDName: Boss Commander Kolurg -SDAuthor: LordVanMartin -SD%Complete: -SDComment: Only Alliance Heroic -SDCategory: -Script Data End */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" - -#define SPELL_BATTLE_SHOUT 31403 -#define SPELL_CHARGE 60067 -#define SPELL_FRIGHTENING_SHOUT 19134 -#define SPELL_WHIRLWIND_1 38619 -#define SPELL_WHIRLWIND_2 38618 - -//not used -//Yell -#define SAY_AGGRO -1576024 -#define SAY_KILL -1576025 -#define SAY_DEATH -1576026 - -class boss_commander_kolurg : public CreatureScript -{ -public: - boss_commander_kolurg() : CreatureScript("boss_commander_kolurg") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new boss_commander_kolurgAI (creature); - } - - struct boss_commander_kolurgAI : public ScriptedAI - { - boss_commander_kolurgAI(Creature* creature) : ScriptedAI(creature) {} - - void Reset() {} - void EnterCombat(Unit* /*who*/) {} - void AttackStart(Unit* /*who*/) {} - void MoveInLineOfSight(Unit* /*who*/) {} - void UpdateAI(const uint32 /*diff*/) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - void JustDied(Unit* /*killer*/) {} - }; - -}; - -void AddSC_boss_commander_kolurg() -{ - new boss_commander_kolurg(); -} diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp deleted file mode 100644 index 39c93f15d6f..00000000000 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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 . - */ - -/* Script Data Start -SDName: Boss Commander Stoutbeard -SDAuthor: LordVanMartin -SD%Complete: -SDComment: Only Horde Heroic -SDCategory: -Script Data End */ - -#include "ScriptMgr.h" -#include "ScriptedCreature.h" - -enum CommanderStoutbeard -{ - SPELL_BATTLE_SHOUT = 31403, - SPELL_CHARGE = 60067, - SPELL_FRIGHTENING_SHOUT = 19134, - SPELL_WHIRLWIND_1 = 38619, - SPELL_WHIRLWIND_2 = 38618 -}; - - -class boss_commander_stoutbeard : public CreatureScript -{ -public: - boss_commander_stoutbeard() : CreatureScript("boss_commander_stoutbeard") { } - - CreatureAI* GetAI(Creature* creature) const - { - return new boss_commander_stoutbeardAI (creature); - } - - struct boss_commander_stoutbeardAI : public ScriptedAI - { - boss_commander_stoutbeardAI(Creature* creature) : ScriptedAI(creature) {} - - void Reset() {} - void AttackStart(Unit* /*who*/) {} - void MoveInLineOfSight(Unit* /*who*/) {} - void UpdateAI(const uint32 /*diff*/) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - }; - -}; - -void AddSC_boss_commander_stoutbeard() -{ - new boss_commander_stoutbeard(); -} -- cgit v1.2.3