aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms/ScarletMonastery
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2020-09-04 13:38:24 +0200
committerShauren <shauren.trinity@gmail.com>2020-09-04 13:38:24 +0200
commitb23190393248455f04d3a06def030a1ec7efad1e (patch)
tree1ce3772314492dcdb985641269a3114813d4b4dc /src/server/scripts/EasternKingdoms/ScarletMonastery
parentb20acfe701e6f5f995f2776f076d3c494c02e1aa (diff)
Core/Misc: Port all the refactors sneaked in master to 3.3.5 include cleanup port
Diffstat (limited to 'src/server/scripts/EasternKingdoms/ScarletMonastery')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp14
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp17
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h2
8 files changed, 15 insertions, 28 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
index 3b294a6811c..6daedfb4a29 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp
@@ -23,8 +23,8 @@ SDCategory: Scarlet Monastery
EndScriptData */
#include "ScriptMgr.h"
-#include "GameObjectAI.h"
#include "GameObject.h"
+#include "GameObjectAI.h"
#include "Group.h"
#include "InstanceScript.h"
#include "LFGMgr.h"
@@ -187,7 +187,7 @@ public:
DoCast(me, _spell);
}
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_WISP_FLIGHT_PORT && Creaturetype == 4)
me->SetDisplayId(2027);
@@ -302,7 +302,7 @@ public:
}
}
- void SpellHit(Unit* caster, const SpellInfo* spell) override
+ void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (!withbody)
return;
@@ -540,7 +540,7 @@ public:
Player* SelectRandomPlayer(float range = 0.0f, bool checkLoS = true)
{
- Map::PlayerList const &PlayerList = me->GetMap()->GetPlayers();
+ Map::PlayerList const& PlayerList = me->GetMap()->GetPlayers();
if (PlayerList.isEmpty())
return nullptr;
@@ -559,7 +559,7 @@ public:
return nullptr;
}
- void SpellHitTarget(Unit* unit, const SpellInfo* spell) override
+ void SpellHitTarget(Unit* unit, SpellInfo const* spell) override
{
if (spell->Id == SPELL_CONFLAGRATION && unit->HasAura(SPELL_CONFLAGRATION))
SaySound(SAY_CONFLAGRATION, unit);
@@ -585,7 +585,7 @@ public:
}
}
- void SpellHit(Unit* caster, const SpellInfo* spell) override
+ void SpellHit(Unit* caster, SpellInfo const* spell) override
{
if (withhead)
return;
@@ -816,7 +816,7 @@ public:
void EnterCombat(Unit* /*who*/) override { }
- void SpellHit(Unit* /*caster*/, const SpellInfo* spell) override
+ void SpellHit(Unit* /*caster*/, SpellInfo const* spell) override
{
if (spell->Id == SPELL_SPROUTING)
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
index 4e3a71bbe71..75c6ad43263 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
@@ -23,9 +23,9 @@ SDCategory: Scarlet Monastery
EndScriptData */
#include "ScriptMgr.h"
+#include "scarlet_monastery.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
-#include "scarlet_monastery.h"
enum Says
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
index fd0a8ec795f..7c5855b4b10 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_high_inquisitor_fairbanks.cpp
@@ -23,8 +23,8 @@ SDCategory: Scarlet Monastery
EndScriptData */
#include "ScriptMgr.h"
-#include "InstanceScript.h"
#include "scarlet_monastery.h"
+#include "InstanceScript.h"
#include "ScriptedCreature.h"
enum Spells
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
index 7e4b210f599..224bc488b03 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
@@ -16,8 +16,8 @@
*/
#include "ScriptMgr.h"
-#include "ScriptedCreature.h"
#include "scarlet_monastery.h"
+#include "ScriptedCreature.h"
enum Yells
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
index fbdad6dc712..4714bcb999e 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_interrogator_vishas.cpp
@@ -16,9 +16,9 @@
*/
#include "ScriptMgr.h"
+#include "scarlet_monastery.h"
#include "InstanceScript.h"
#include "ObjectAccessor.h"
-#include "scarlet_monastery.h"
#include "ScriptedCreature.h"
enum Says
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
index 5ae31c00d81..6d976481eca 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_mograine_and_whitemane.cpp
@@ -161,7 +161,7 @@ public:
}
}
- void SpellHit(Unit* /*who*/, const SpellInfo* spell) override
+ void SpellHit(Unit* /*who*/, SpellInfo const* spell) override
{
//When hit with resurrection say text
if (spell->Id == SPELL_SCARLETRESURRECTION)
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
index 6d70f5b762c..8be2b9a6269 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
@@ -46,26 +46,13 @@ class instance_scarlet_monastery : public InstanceMapScript
void OnGameObjectCreate(GameObject* go) override
{
+ InstanceScript::OnGameObjectCreate(go);
+
switch (go->GetEntry())
{
case GO_PUMPKIN_SHRINE:
PumpkinShrineGUID = go->GetGUID();
break;
- case GO_HIGH_INQUISITORS_DOOR:
- AddDoor(go, true);
- break;
- default:
- break;
- }
- }
-
- void OnGameObjectRemove(GameObject* go) override
- {
- switch (go->GetEntry())
- {
- case GO_HIGH_INQUISITORS_DOOR:
- AddDoor(go, false);
- break;
default:
break;
}
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
index c1ba06d446b..36d2569dbf3 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
@@ -62,7 +62,7 @@ enum SMGameObjectIds
GO_PUMPKIN_SHRINE = 186267
};
-template<class AI, class T>
+template <class AI, class T>
inline AI* GetScarletMonasteryAI(T* obj)
{
return GetInstanceAI<AI>(obj, SMScriptName);