aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-08-18 18:13:14 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-08-18 18:13:14 +0200
commitf16f427c48cb7fb9a62b75066f831af541d0ca02 (patch)
treecef1f28b26e234ad088169eb0d83132f0754af52 /src/server/scripts/Kalimdor
parent74689b1d93c2150130907b6baac861bfbcc47dd3 (diff)
parent19343ddd557fd03aecf7a19d310f46c62a8f336f (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Unit/Unit.h src/server/game/Handlers/CharacterHandler.cpp src/server/game/Server/WorldSocket.cpp src/server/game/Spells/Spell.cpp src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp src/server/scripts/Kalimdor/CMakeLists.txt src/server/scripts/Kalimdor/zone_azshara.cpp src/server/scripts/Kalimdor/zone_moonglade.cpp src/server/scripts/Kalimdor/zone_orgrimmar.cpp src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_anzu.cpp src/server/scripts/Spells/spell_hunter.cpp
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r--src/server/scripts/Kalimdor/CMakeLists.txt3
-rw-r--r--src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp47
-rw-r--r--src/server/scripts/Kalimdor/Maraudon/instance_maraudon.cpp47
-rw-r--r--src/server/scripts/Kalimdor/RagefireChasm/instance_ragefire_chasm.cpp47
-rw-r--r--src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_azshara.cpp1
-rw-r--r--src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp2
-rw-r--r--src/server/scripts/Kalimdor/zone_mulgore.cpp4
-rw-r--r--src/server/scripts/Kalimdor/zone_orgrimmar.cpp11
-rw-r--r--src/server/scripts/Kalimdor/zone_silithus.cpp9
-rw-r--r--src/server/scripts/Kalimdor/zone_the_barrens.cpp32
11 files changed, 170 insertions, 35 deletions
diff --git a/src/server/scripts/Kalimdor/CMakeLists.txt b/src/server/scripts/Kalimdor/CMakeLists.txt
index 67082631c4e..b21c20d3d5a 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
@@ -112,6 +113,8 @@ 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
+ Kalimdor/DireMaul/instance_dire_maul.cpp
Kalimdor/HallsOfOrigination/halls_of_origination.h
Kalimdor/HallsOfOrigination/instance_halls_of_origination.cpp
Kalimdor/HallsOfOrigination/boss_temple_guardian_anhuur.cpp
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 <http://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, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+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 <http://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, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+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();
+}
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 <http://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, see <http://www.gnu.org/licenses/>.
+ */
+
+/*
+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();
+}
diff --git a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
index c8d83a54e1e..a2f98b21589 100644
--- a/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
+++ b/src/server/scripts/Kalimdor/ZulFarrak/zulfarrak.cpp
@@ -145,7 +145,7 @@ public:
break;
case 3:
me->setFaction(FACTION_HOSTILE);
- if (Player* target = Player::GetPlayer(*me, PlayerGUID))
+ if (Player* target = ObjectAccessor::GetPlayer(*me, PlayerGUID))
AttackStart(target);
if (instance)
diff --git a/src/server/scripts/Kalimdor/zone_azshara.cpp b/src/server/scripts/Kalimdor/zone_azshara.cpp
index a44568e0472..9896807776e 100644
--- a/src/server/scripts/Kalimdor/zone_azshara.cpp
+++ b/src/server/scripts/Kalimdor/zone_azshara.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* 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
diff --git a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
index cb3b8d6d01a..79e0755a40a 100644
--- a/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/zone_azuremyst_isle.cpp
@@ -133,7 +133,7 @@ public:
{
me->RemoveAurasDueToSpell(SPELL_IRRIDATION);
- if (Player* player = Unit::GetPlayer(*me, pCaster))
+ if (Player* player = ObjectAccessor::GetPlayer(*me, pCaster))
{
Talk(SAY_HEAL, player->GetGUID());
diff --git a/src/server/scripts/Kalimdor/zone_mulgore.cpp b/src/server/scripts/Kalimdor/zone_mulgore.cpp
index 217c8e43382..75bb2e9dbab 100644
--- a/src/server/scripts/Kalimdor/zone_mulgore.cpp
+++ b/src/server/scripts/Kalimdor/zone_mulgore.cpp
@@ -161,7 +161,7 @@ public:
switch (EventPhase)
{
case 1:
- if (Unit* unit = Unit::GetUnit(*me, PlayerGUID))
+ if (Unit* unit = ObjectAccessor::GetUnit(*me, PlayerGUID))
{
if (GameObject* go = unit->GetGameObject(SPELL_LUNCH))
{
@@ -175,7 +175,7 @@ public:
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USE_STANDING);
break;
case 3:
- if (Player* unit = Unit::GetPlayer(*me, PlayerGUID))
+ if (Player* unit = ObjectAccessor::GetPlayer(*me, PlayerGUID))
unit->TalkedToCreature(me->GetEntry(), me->GetGUID());
me->UpdateEntry(NPC_KYLE_FRIENDLY);
diff --git a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
index ccc8bdc257a..8cf84de20ec 100644
--- a/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
+++ b/src/server/scripts/Kalimdor/zone_orgrimmar.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2013 TrinityCore <http://www.trinitycore.org/>
- * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
*
* 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
@@ -16,16 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Orgrimmar
-SD%Complete: 0
-SDComment: Quest support:
-SDCategory: Orgrimmar
-EndScriptData */
-
-/* ContentData
-EndContentData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp
index 8120686a0aa..80ca6975316 100644
--- a/src/server/scripts/Kalimdor/zone_silithus.cpp
+++ b/src/server/scripts/Kalimdor/zone_silithus.cpp
@@ -526,7 +526,7 @@ public:
void HandleAnimation()
{
- Player* player = Unit::GetPlayer(*me, PlayerGUID);
+ Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
if (!player)
return;
@@ -1002,14 +1002,13 @@ public:
void CheckEventFail()
{
- Player* player = Unit::GetPlayer(*me, PlayerGUID);
-
+ Player* player = ObjectAccessor::GetPlayer(*me, PlayerGUID);
if (!player)
return;
if (Group* EventGroup = player->GetGroup())
{
- Player* groupMember;
+ Player* groupMember = NULL;
uint8 GroupMemberCount = 0;
uint8 DeadMemberCount = 0;
@@ -1019,7 +1018,7 @@ public:
for (Group::member_citerator itr = members.begin(); itr!= members.end(); ++itr)
{
- groupMember = (Unit::GetPlayer(*me, itr->guid));
+ groupMember = ObjectAccessor::GetPlayer(*me, itr->guid);
if (!groupMember)
continue;
if (!groupMember->IsWithinDistInMap(me, EVENT_AREA_RADIUS) && groupMember->GetQuestStatus(QUEST_A_PAWN_ON_THE_ETERNAL_BOARD) == QUEST_STATUS_INCOMPLETE)
diff --git a/src/server/scripts/Kalimdor/zone_the_barrens.cpp b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
index 79299d1b03c..c991f760605 100644
--- a/src/server/scripts/Kalimdor/zone_the_barrens.cpp
+++ b/src/server/scripts/Kalimdor/zone_the_barrens.cpp
@@ -361,18 +361,20 @@ public:
void UpdateAI(uint32 diff) OVERRIDE
{
- if (EventInProgress) {
- Player* pWarrior = NULL;
+ if (EventInProgress)
+ {
+ Player* warrior = NULL;
if (PlayerGUID)
- pWarrior = Unit::GetPlayer(*me, PlayerGUID);
+ warrior = ObjectAccessor::GetPlayer(*me, PlayerGUID);
- if (!pWarrior)
+ if (!warrior)
return;
- if (!pWarrior->IsAlive() && pWarrior->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE) {
+ if (!warrior->IsAlive() && warrior->GetQuestStatus(1719) == QUEST_STATUS_INCOMPLETE)
+ {
Talk(SAY_TWIGGY_FLATHEAD_DOWN);
- pWarrior->FailQuest(1719);
+ warrior->FailQuest(1719);
for (uint8 i = 0; i < 6; ++i) // unsummon challengers
{
@@ -396,11 +398,12 @@ public:
if (!EventGrate && EventInProgress)
{
float x, y, z;
- pWarrior->GetPosition(x, y, z);
+ warrior->GetPosition(x, y, z);
- if (x >= -1684 && x <= -1674 && y >= -4334 && y <= -4324) {
- pWarrior->AreaExploredOrEventHappens(1719);
- Talk(SAY_TWIGGY_FLATHEAD_BEGIN, pWarrior->GetGUID());
+ if (x >= -1684 && x <= -1674 && y >= -4334 && y <= -4324)
+ {
+ warrior->AreaExploredOrEventHappens(1719);
+ Talk(SAY_TWIGGY_FLATHEAD_BEGIN, warrior->GetGUID());
for (uint8 i = 0; i < 6; ++i)
{
@@ -442,19 +445,20 @@ public:
if (Wave < 6 && AffrayChallenger[Wave] && !EventBigWill)
{
Talk(SAY_TWIGGY_FLATHEAD_FRAY);
- Creature* creature = Unit::GetCreature((*me), AffrayChallenger[Wave]);
+ Creature* creature = ObjectAccessor::GetCreature(*me, AffrayChallenger[Wave]);
if (creature && (creature->IsAlive()))
{
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
creature->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
creature->setFaction(14);
- creature->AI()->AttackStart(pWarrior);
+ creature->AI()->AttackStart(warrior);
++Wave;
WaveTimer = 20000;
}
}
- else if (Wave >= 6 && !EventBigWill) {
+ else if (Wave >= 6 && !EventBigWill)
+ {
if (Creature* creature = me->SummonCreature(NPC_BIG_WILL, -1722, -4341, 6.12f, 6.26f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 480000))
{
BigWill = creature->GetGUID();
@@ -468,7 +472,7 @@ public:
}
else if (Wave >= 6 && EventBigWill && BigWill)
{
- Creature* creature = Unit::GetCreature((*me), BigWill);
+ Creature* creature = ObjectAccessor::GetCreature(*me, BigWill);
if (!creature || !creature->IsAlive())
{
Talk(SAY_TWIGGY_FLATHEAD_OVER);