aboutsummaryrefslogtreecommitdiff
path: root/src/scripts/northrend
diff options
context:
space:
mode:
authorQAston <>2010-02-20 20:28:31 +0100
committerQAston <>2010-02-20 20:28:31 +0100
commit2e3f89b61fa33e83b8f70702777549e25e5fc481 (patch)
tree904060daaf9fb782a20e5b2aea3e9febe813de65 /src/scripts/northrend
parent4cd4c4170f70a0715daad52b2f1831b6017d647a (diff)
parent8e146c309de73160252ae538689d28660273d459 (diff)
*Move summon water elemental handler to correct place.
--HG-- branch : trunk
Diffstat (limited to 'src/scripts/northrend')
-rw-r--r--src/scripts/northrend/borean_tundra.cpp134
-rw-r--r--src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp6
-rw-r--r--src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp186
-rw-r--r--src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.h20
-rw-r--r--src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp21
-rw-r--r--src/scripts/northrend/frozen_halls/halls_of_reflection/halls_of_reflection.h16
-rw-r--r--src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp16
-rw-r--r--src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp16
-rw-r--r--src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.h16
-rw-r--r--src/scripts/northrend/grizzly_hills.cpp252
10 files changed, 681 insertions, 2 deletions
diff --git a/src/scripts/northrend/borean_tundra.cpp b/src/scripts/northrend/borean_tundra.cpp
index 0fb147d9d0b..6396b58c1ac 100644
--- a/src/scripts/northrend/borean_tundra.cpp
+++ b/src/scripts/northrend/borean_tundra.cpp
@@ -1987,6 +1987,135 @@ CreatureAI* GetAI_npc_bonker_togglevolt(Creature* pCreature)
return new npc_bonker_togglevoltAI(pCreature);
}
+/*######
+## Help Those That Cannot Help Themselves, Quest 11876
+######*/
+
+enum eHelpThemselves
+{
+ QUEST_CANNOT_HELP_THEMSELVES = 11876,
+ GO_MAMMOTH_TRAP_1 = 188022,
+ GO_MAMMOTH_TRAP_2 = 188024,
+ GO_MAMMOTH_TRAP_3 = 188025,
+ GO_MAMMOTH_TRAP_4 = 188026,
+ GO_MAMMOTH_TRAP_5 = 188027,
+ GO_MAMMOTH_TRAP_6 = 188028,
+ GO_MAMMOTH_TRAP_7 = 188029,
+ GO_MAMMOTH_TRAP_8 = 188030,
+ GO_MAMMOTH_TRAP_9 = 188031,
+ GO_MAMMOTH_TRAP_10 = 188032,
+ GO_MAMMOTH_TRAP_11 = 188033,
+ GO_MAMMOTH_TRAP_12 = 188034,
+ GO_MAMMOTH_TRAP_13 = 188035,
+ GO_MAMMOTH_TRAP_14 = 188036,
+ GO_MAMMOTH_TRAP_15 = 188037,
+ GO_MAMMOTH_TRAP_16 = 188038,
+ GO_MAMMOTH_TRAP_17 = 188039,
+ GO_MAMMOTH_TRAP_18 = 188040,
+ GO_MAMMOTH_TRAP_19 = 188041,
+ GO_MAMMOTH_TRAP_20 = 188042,
+ GO_MAMMOTH_TRAP_21 = 188043,
+ GO_MAMMOTH_TRAP_22 = 188044,
+};
+
+struct npc_trapped_mammoth_calfAI : public ScriptedAI
+{
+ npc_trapped_mammoth_calfAI(Creature* c) : ScriptedAI(c) {}
+
+ uint32 uiTimer;
+ bool bStarted;
+
+ void Reset()
+ {
+ GameObject *pTrap;
+
+ uiTimer = 1500;
+ bStarted = false;
+
+ if ((pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_1,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_2,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_3,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_4,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_5,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_6,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_7,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_8,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_9,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_10,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_11,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_12,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_13,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_14,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_15,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_16,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_17,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_18,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_19,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_20,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_21,1.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_22,1.0f)))
+ pTrap->SetGoState(GO_STATE_ACTIVE);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (bStarted)
+ {
+ if (uiTimer <= diff)
+ {
+ Position pos;
+ m_creature->GetRandomNearPosition(pos, 10.0f);
+ m_creature->GetMotionMaster()->MovePoint(0,pos);
+ bStarted = false;
+ }
+ else uiTimer -= diff;
+ }
+ }
+
+ void DoAction(const int32 param)
+ {
+ if (param == 1)
+ bStarted = true;
+ }
+
+ void MovementInform(uint32 uiType, uint32 uiId)
+ {
+ GameObject* pTrap;
+ if (uiType != POINT_MOTION_TYPE)
+ return;
+ m_creature->DisappearAndDie();
+
+ if ((pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_1,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_2,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_3,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_4,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_5,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_6,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_7,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_8,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_9,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_10,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_11,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_12,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_13,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_14,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_15,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_16,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_17,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_18,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_19,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_20,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_21,11.0f)) ||
+ (pTrap = m_creature->FindNearestGameObject(GO_MAMMOTH_TRAP_22,11.0f)))
+ pTrap->SetLootState(GO_JUST_DEACTIVATED);
+ }
+};
+
+CreatureAI* GetAI_npc_trapped_mammoth_calf(Creature* pCreature)
+{
+ return new npc_trapped_mammoth_calfAI(pCreature);
+}
+
void AddSC_borean_tundra()
{
Script *newscript;
@@ -2122,4 +2251,9 @@ void AddSC_borean_tundra()
newscript->GetAI = &GetAI_npc_bonker_togglevolt;
newscript->pQuestAccept=&QuestAccept_npc_bonker_togglevolt;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_trapped_mammoth_calf";
+ newscript->GetAI = &GetAI_npc_trapped_mammoth_calf;
+ newscript->RegisterSelf();
}
diff --git a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp
index 9d745c8775a..6fc53263ed1 100644
--- a/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp
+++ b/src/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp
@@ -261,6 +261,12 @@ struct generic_vehicleAI_toc5AI : public npc_escortAI
//dosen't work at all
if (uiShieldBreakerTimer <= uiDiff)
{
+ if (!pVehicle)
+ {
+ pVehicle = m_creature->GetVehicleKit();
+ return;
+ }
+
if (Unit* pPassenger = pVehicle->GetPassenger(SEAT_ID_0))
{
Map::PlayerList const& players = m_creature->GetMap()->GetPlayers();
diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
new file mode 100644
index 00000000000..fe515516a68
--- /dev/null
+++ b/src/scripts/northrend/frozen_halls/forge_of_souls/boss_bronjahm.cpp
@@ -0,0 +1,186 @@
+/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/>
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "ScriptedPch.h"
+#include "forge_of_souls.h"
+
+enum Spells
+{
+ SPELL_MAGIC_S_BANE = 68793,
+ SPELL_MAGIC_S_BANE_H = 69050,
+ SPELL_CORRUPT_SOUL = 68839,
+ SPELL_CONSUME_SOUL = 68858,
+ SPELL_CONSUME_SOUL_H = 69047,
+ SPELL_TELEPORT = 68988,
+ SPELL_FEAR = 68950,
+ SPELL_SOULSTORM = 68872,
+ SPELL_SOULSTORM_H = 69049,
+ SPELL_SHADOW_BOLT = 70043
+};
+enum CombatPhases
+{
+ PHASE_1,
+ PHASE_2
+};
+/*enum Adds
+{
+ CREATURE_CORRUPTED_SOUL_FRAGMENT = 36535
+};*/
+struct boss_bronjahmAI : public ScriptedAI
+{
+ boss_bronjahmAI(Creature *c) : ScriptedAI(c)
+ {
+ pInstance = m_creature->GetInstanceData();
+ }
+
+ uint32 uiFearTimer;
+ uint32 uiShadowBoltTimer;
+ uint32 uiMagicsBaneTimer;
+ uint32 uiCorruptSoulTimer;
+
+ CombatPhases Phase;
+
+ ScriptedInstance* pInstance;
+
+ void Reset()
+ {
+ Phase = PHASE_1;
+
+ uiFearTimer = urand(8000,12000);
+ uiShadowBoltTimer = 2000;
+ uiMagicsBaneTimer = urand(8000,15000);
+ uiCorruptSoulTimer = urand(15000,25000);
+
+ if (pInstance)
+ pInstance->SetData(DATA_BRONJAHM_EVENT, NOT_STARTED);
+ }
+
+ void EnterCombat(Unit* who)
+ {
+ //DoScriptText(SAY_AGGRO, m_creature);
+
+ if (pInstance)
+ pInstance->SetData(DATA_BRONJAHM_EVENT, IN_PROGRESS);
+ }
+
+ void JustDied(Unit* killer)
+ {
+ //DoScriptText(SAY_DEATH, m_creature);
+
+ if (pInstance)
+ pInstance->SetData(DATA_BRONJAHM_EVENT, DONE);
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ //Return since we have no target
+ if (!UpdateVictim())
+ return;
+
+ switch (Phase)
+ {
+ case PHASE_1:
+ if (uiCorruptSoulTimer <= diff)
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ DoCast(pTarget,SPELL_CORRUPT_SOUL);
+ uiCorruptSoulTimer = urand(15000,25000);
+ } else uiCorruptSoulTimer -= diff;
+ break;
+ case PHASE_2:
+ if (!me->HasAura(SPELL_SOULSTORM) || !me->HasAura(SPELL_SOULSTORM_H))
+ DoCast(m_creature, DUNGEON_MODE(SPELL_SOULSTORM,SPELL_SOULSTORM_H));
+ if (uiFearTimer <= diff)
+ {
+ if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,1))
+ DoCast(m_creature->getVictim(),SPELL_FEAR);
+ uiFearTimer = urand(8000,12000);
+ } else uiFearTimer -= diff;
+ break;
+ }
+
+ if (HealthBelowPct(30))
+ DoCast(m_creature,SPELL_TELEPORT);
+
+ if (uiShadowBoltTimer <= diff)
+ {
+ if (m_creature->IsWithinMeleeRange(m_creature->getVictim()))
+ DoCastVictim(SPELL_SHADOW_BOLT);
+ uiShadowBoltTimer = 2000;
+ } else uiShadowBoltTimer -= diff;
+
+ if (uiMagicsBaneTimer <= diff)
+ {
+ DoCastVictim(DUNGEON_MODE(SPELL_MAGIC_S_BANE,SPELL_MAGIC_S_BANE_H));
+ uiMagicsBaneTimer = urand(8000,15000);
+ } else uiMagicsBaneTimer -= diff;
+
+ DoMeleeAttackIfReady();
+ }
+};
+
+CreatureAI* GetAI_boss_bronjahm(Creature* pCreature)
+{
+ return new boss_bronjahmAI(pCreature);
+}
+
+struct mob_corrupted_soul_fragmentAI : public ScriptedAI
+{
+ mob_corrupted_soul_fragmentAI(Creature *c) : ScriptedAI(c)
+ {
+ pInstance = m_creature->GetInstanceData();
+ }
+
+ ScriptedInstance* pInstance;
+
+ void Reset()
+ {
+ SetCombatMovement(false);
+ if (pInstance)
+ if (Creature* pBronjham = Unit::GetCreature(*m_creature,pInstance->GetData64(DATA_BRONJAHM)))
+ m_creature->GetMotionMaster()->MoveChase(pBronjham);
+
+ }
+
+ void MovementInform(uint32 type, uint32 id)
+ {
+ if (pInstance)
+ if (Creature* pBronjham = Unit::GetCreature(*m_creature,pInstance->GetData64(DATA_BRONJAHM)))
+ DoCast(pBronjham,DUNGEON_MODE(SPELL_CONSUME_SOUL,SPELL_CONSUME_SOUL_H));
+ }
+
+ void UpdateAI(const uint32 diff) {}
+};
+
+CreatureAI* GetAI_mob_corrupted_soul_fragment(Creature* pCreature)
+{
+ return new mob_corrupted_soul_fragmentAI(pCreature);
+}
+
+void AddSC_boss_bronjahm()
+{
+ Script *newscript;
+
+ newscript = new Script;
+ newscript->Name = "mob_corruptel_soul_fragment";
+ newscript->GetAI = &GetAI_mob_corrupted_soul_fragment;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "boss_bronjahm";
+ newscript->GetAI = &GetAI_boss_bronjahm;
+ newscript->RegisterSelf();
+} \ No newline at end of file
diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.h b/src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.h
index d50716c9e39..6f7a3987cee 100644
--- a/src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.h
+++ b/src/scripts/northrend/frozen_halls/forge_of_souls/forge_of_souls.h
@@ -1,3 +1,19 @@
+/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/>
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#ifndef DEF_FORGE_OF_SOULS_H
#define DEF_FORGE_OF_SOULS_H
enum Data
@@ -5,6 +21,10 @@ enum Data
DATA_BRONJAHM_EVENT,
DATA_DEVOURER_EVENT
};
+enum Data64
+{
+ DATA_BRONJAHM
+};
enum Creatures
{
CREATURE_BRONJAHM = 36497,
diff --git a/src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp
index 2ac41f59c8f..2f038e178ca 100644
--- a/src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp
+++ b/src/scripts/northrend/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp
@@ -1,3 +1,19 @@
+/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/>
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include "ScriptedPch.h"
#include "forge_of_souls.h"
@@ -72,16 +88,17 @@ struct instance_forge_of_souls : public ScriptedInstance
return 0;
}
-/*
+
uint64 GetData64(uint32 identifier)
{
switch(identifier)
{
+ case DATA_BRONJAHM: return uiBronjahm;
}
return 0;
}
-*/
+
std::string GetSaveData()
{
OUT_SAVE_INST_DATA;
diff --git a/src/scripts/northrend/frozen_halls/halls_of_reflection/halls_of_reflection.h b/src/scripts/northrend/frozen_halls/halls_of_reflection/halls_of_reflection.h
index 8241c6bb608..ac7ddc09b6d 100644
--- a/src/scripts/northrend/frozen_halls/halls_of_reflection/halls_of_reflection.h
+++ b/src/scripts/northrend/frozen_halls/halls_of_reflection/halls_of_reflection.h
@@ -1,3 +1,19 @@
+/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/>
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#ifndef DEF_HALLS_OF_REFLECTION_H
#define DEF_HALLS_OF_REFLECTION_H
enum Data
diff --git a/src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp
index 45bd4cb7514..5caf2351843 100644
--- a/src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp
+++ b/src/scripts/northrend/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp
@@ -1,3 +1,19 @@
+/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/>
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include "ScriptedPch.h"
#include "halls_of_reflection.h"
diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp
index 55ee4b6cc3f..908eaf8f669 100644
--- a/src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp
+++ b/src/scripts/northrend/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp
@@ -1,3 +1,19 @@
+/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/>
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#include "ScriptedPch.h"
#include "pit_of_saron.h"
diff --git a/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.h b/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.h
index 7d61b30ac07..97a9ff7d8f0 100644
--- a/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.h
+++ b/src/scripts/northrend/frozen_halls/pit_of_saron/pit_of_saron.h
@@ -1,3 +1,19 @@
+/* Copyright (C) 2006 - 2010 TrinityCore <https://www.trinitycore.org/>
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
#ifndef DEF_PIT_OF_SARON_H
#define DEF_PIT_OF_SARON_H
enum Data
diff --git a/src/scripts/northrend/grizzly_hills.cpp b/src/scripts/northrend/grizzly_hills.cpp
index ca1301fe287..b057faf7e5f 100644
--- a/src/scripts/northrend/grizzly_hills.cpp
+++ b/src/scripts/northrend/grizzly_hills.cpp
@@ -26,6 +26,7 @@ npc_orsonn_and_kodian
EndContentData */
#include "ScriptedPch.h"
+#include "ScriptedEscortAI.h"
#define GOSSIP_ITEM1 "You're free to go Orsonn, but first tell me what's wrong with the furbolg."
#define GOSSIP_ITEM2 "What happened then?"
@@ -115,6 +116,246 @@ bool GossipSelect_npc_orsonn_and_kodian(Player* pPlayer, Creature* pCreature, ui
return true;
}
+/*######
+## Quest 12027: Mr. Floppy's Perilous Adventure
+######*/
+
+enum eFloppy
+{
+ NPC_MRFLOPPY = 26589,
+ NPC_HUNGRY_WORG = 26586,
+ NPC_RAVENOUS_WORG = 26590, //RWORG
+ NPC_EMILY = 26588,
+
+ QUEST_PERILOUS_ADVENTURE = 12027,
+
+ SPELL_MRFLOPPY = 47184, //vehicle aura
+
+ SAY_WORGHAGGRO1 = -1800001, //Um... I think one of those wolves is back...
+ SAY_WORGHAGGRO2 = -1800002, //He's going for Mr. Floppy!
+ SAY_WORGRAGGRO3 = -1800003, //Oh, no! Look, it's another wolf, and it's a biiiiiig one!
+ SAY_WORGRAGGRO4 = -1800004, //He's gonna eat Mr. Floppy! You gotta help Mr. Floppy! You just gotta!
+ SAY_RANDOMAGGRO = -1800005, //There's a big meanie attacking Mr. Floppy! Help!
+ SAY_VICTORY1 = -1800006, //Let's get out of here before more wolves find us!
+ SAY_VICTORY2 = -1800007, //Don't go toward the light, Mr. Floppy!
+ SAY_VICTORY3 = -1800008, //Mr. Floppy, you're ok! Thank you so much for saving Mr. Floppy!
+ SAY_VICTORY4 = -1800009, //I think I see the camp! We're almost home, Mr. Floppy! Let's go!
+ TEXT_EMOTE_WP1 = -1800010, //Mr. Floppy revives
+ TEXT_EMOTE_AGGRO = -1800011, //The Ravenous Worg chomps down on Mr. Floppy
+ SAY_QUEST_ACCEPT = -1800012, //Are you ready, Mr. Floppy? Stay close to me and watch out for those wolves!
+ SAY_QUEST_COMPLETE = -1800013 //Thank you for helping me get back to the camp. Go tell Walter that I'm safe now!
+};
+
+//emily
+struct npc_emilyAI : public npc_escortAI
+{
+ npc_emilyAI(Creature* pCreature) : npc_escortAI(pCreature) { }
+
+ uint32 m_uiChatTimer;
+
+ uint64 RWORGGUID;
+ uint64 MrfloppyGUID;
+
+ Creature* Mrfloppy;
+ Creature* RWORG;
+ bool Completed;
+
+
+ void JustSummoned(Creature* pSummoned)
+ {
+ if (Creature* Mrfloppy = GetClosestCreatureWithEntry(m_creature, NPC_MRFLOPPY, 50.0f))
+ pSummoned->AI()->AttackStart(Mrfloppy);
+ else
+ pSummoned->AI()->AttackStart(m_creature->getVictim());
+ }
+
+ void WaypointReached(uint32 i)
+ {
+ Player* pPlayer = GetPlayerForEscort();
+ if (!pPlayer)
+ return;
+ switch (i)
+ {
+ case 9:
+ Mrfloppy = GetClosestCreatureWithEntry(m_creature, NPC_MRFLOPPY, 100.0f);
+ break;
+ case 10:
+ if (Mrfloppy)
+ {
+ DoScriptText(SAY_WORGHAGGRO1, m_creature);
+ m_creature->SummonCreature(NPC_HUNGRY_WORG,m_creature->GetPositionX()+5,m_creature->GetPositionY()+2,m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
+ }
+ break;
+ case 11:
+ Mrfloppy->GetMotionMaster()->MoveFollow(m_creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ break;
+ case 17:
+ Mrfloppy->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
+ DoScriptText(SAY_WORGRAGGRO3, m_creature);
+ RWORG = m_creature->SummonCreature(NPC_RAVENOUS_WORG,m_creature->GetPositionX()+10,m_creature->GetPositionY()+8,m_creature->GetPositionZ()+2,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
+ RWORG->setFaction(35);
+ break;
+ case 18:
+ if (Mrfloppy)
+ {
+ RWORG->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
+ DoCast(Mrfloppy,SPELL_MRFLOPPY);
+ }
+ break;
+ case 19:
+ if (Mrfloppy->HasAura(SPELL_MRFLOPPY, 0))
+ Mrfloppy->EnterVehicle(RWORG);
+ break;
+ case 20:
+ if (Mrfloppy)
+ RWORG->HandleEmoteCommand(34);
+ break;
+ case 21:
+ if (Mrfloppy)
+ {
+ RWORG->Kill(Mrfloppy);
+ Mrfloppy->ExitVehicle();
+ RWORG->setFaction(14);
+ RWORG->GetMotionMaster()->MovePoint(0, RWORG->GetPositionX()+10,RWORG->GetPositionY()+80,RWORG->GetPositionZ());
+ DoScriptText(SAY_VICTORY2, m_creature);
+ }
+ break;
+ case 22:
+ if (Mrfloppy && Mrfloppy->isDead())
+ {
+ RWORG->DisappearAndDie();
+ m_creature->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
+ Mrfloppy->setDeathState(ALIVE);
+ Mrfloppy->GetMotionMaster()->MoveFollow(m_creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ DoScriptText(SAY_VICTORY3, m_creature);
+ }
+ break;
+ case 24:
+ if (pPlayer)
+ {
+ Completed = true;
+ pPlayer->GroupEventHappens(QUEST_PERILOUS_ADVENTURE, m_creature);
+ DoScriptText(SAY_QUEST_COMPLETE, m_creature, pPlayer);
+ }
+ m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ break;
+ case 25:
+ DoScriptText(SAY_VICTORY4, m_creature);
+ break;
+ case 27:
+ m_creature->DisappearAndDie();
+ if (Mrfloppy)
+ Mrfloppy->DisappearAndDie();
+ break;
+ }
+ }
+
+ void EnterCombat(Unit* Who)
+ {
+ DoScriptText(SAY_RANDOMAGGRO, m_creature);
+ }
+
+ void Reset()
+ {
+ m_uiChatTimer = 4000;
+ Mrfloppy = NULL;
+ RWORG = NULL;
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ npc_escortAI::UpdateAI(uiDiff);
+
+ if (HasEscortState(STATE_ESCORT_ESCORTING))
+ {
+ if (m_uiChatTimer <= uiDiff)
+ {
+ m_uiChatTimer = 12000;
+ }
+ else
+ m_uiChatTimer -= uiDiff;
+ }
+ }
+};
+
+
+bool QuestAccept_npc_emily(Player* pPlayer, Creature* pCreature, Quest const* quest)
+{
+ if (quest->GetQuestId() == QUEST_PERILOUS_ADVENTURE)
+ {
+ DoScriptText(SAY_QUEST_ACCEPT, pCreature);
+ if (Creature* Mrfloppy = GetClosestCreatureWithEntry(pCreature, NPC_MRFLOPPY, 180.0f))
+ {
+ Mrfloppy->GetMotionMaster()->MoveFollow(pCreature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
+ }
+
+ if (npc_escortAI* pEscortAI = CAST_AI(npc_emilyAI, (pCreature->AI())))
+ pEscortAI->Start(true, false, pPlayer->GetGUID());
+ }
+ return true;
+}
+
+CreatureAI* GetAI_npc_emily(Creature* pCreature)
+{
+ return new npc_emilyAI(pCreature);
+}
+
+//mrfloppy
+
+struct npc_mrfloppyAI : public ScriptedAI
+{
+ npc_mrfloppyAI(Creature *c) : ScriptedAI(c) {}
+
+ uint64 EmilyGUID;
+ uint64 RWORGGUID;
+ uint64 HWORGGUID;
+
+ Creature* HWORG;
+ Creature* RWORG;
+
+ Creature* Emily;
+
+ void Reset()
+ {
+ HWORG = NULL;
+ RWORG = NULL;
+ Emily = NULL;
+ }
+
+ void EnterCombat(Unit* Who)
+ {
+ if (Creature* Emily = GetClosestCreatureWithEntry(m_creature, NPC_EMILY, 50.0f))
+ {
+ switch(Who->GetEntry())
+ {
+ case NPC_HUNGRY_WORG:
+ DoScriptText(SAY_WORGHAGGRO2, Emily);
+ break;
+ case NPC_RAVENOUS_WORG:
+ DoScriptText(SAY_WORGRAGGRO4, Emily);
+ break;
+ default:
+ DoScriptText(SAY_RANDOMAGGRO, Emily);
+ }
+ }
+ }
+
+ void EnterEvadeMode() {}
+
+ void MoveInLineOfSight(Unit *who) {}
+
+ void UpdateAI(const uint32 diff)
+ {
+ if (!UpdateVictim())
+ return;
+ }
+};
+
+CreatureAI* GetAI_npc_mrfloppy(Creature* pCreature)
+{
+ return new npc_mrfloppyAI(pCreature);
+}
+
void AddSC_grizzly_hills()
{
Script* newscript;
@@ -124,4 +365,15 @@ void AddSC_grizzly_hills()
newscript->pGossipHello = &GossipHello_npc_orsonn_and_kodian;
newscript->pGossipSelect = &GossipSelect_npc_orsonn_and_kodian;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_emily";
+ newscript->GetAI = &GetAI_npc_emily;
+ newscript->pQuestAccept = &QuestAccept_npc_emily;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "npc_mrfloppy";
+ newscript->GetAI = &GetAI_npc_mrfloppy;
+ newscript->RegisterSelf();
}