aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2014-08-29 21:18:23 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2014-08-29 21:18:23 +0200
commit06daf22e1ea31d240456fdd05f899b92231458d3 (patch)
tree6c250d96c47058940b7b94e95bfc1f088de9351f /src/server/scripts/EasternKingdoms
parente8d0de67782eb7773d6c10172ba0ab0b458d777f (diff)
parentf5115328c5ced39a5b223c7a5ad555d191eee3ff (diff)
Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Battlegrounds/Battleground.cpp src/server/scripts/Commands/cs_guild.cpp
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp13
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp11
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp11
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp7
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp15
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h7
8 files changed, 20 insertions, 48 deletions
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
index 26937a83e63..cdfcede1c93 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_arcanist_doan.cpp
@@ -124,7 +124,7 @@ class boss_arcanist_doan : public CreatureScript
CreatureAI* GetAI(Creature* creature) const override
{
- return GetInstanceAI<boss_arcanist_doanAI>(creature);
+ return GetScarletMonasteryAI<boss_arcanist_doanAI>(creature);
}
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
index 71a5343d160..c3c74e4c83d 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_azshir_the_sleepless.cpp
@@ -15,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Azshir_the_Sleepless
-SD%Complete: 80
-SDComment:
-SDCategory: Scarlet Monastery
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "scarlet_monastery.h"
@@ -70,9 +63,9 @@ class boss_azshir_the_sleepless : public CreatureScript
_JustDied();
}
- void DamageTaken(Unit* /*done_by*/, uint32& /*damage*/) override
+ void DamageTaken(Unit* /*attacker*/, uint32& damage) override
{
- if (HealthBelowPct(50) && !_siphon)
+ if (!_siphon && me->HealthBelowPctDamaged(50, damage))
{
DoCastVictim(SPELL_SOUL_SIPHON);
events.ScheduleEvent(EVENT_SOUL_SIPHON, 20000);
@@ -120,7 +113,7 @@ class boss_azshir_the_sleepless : public CreatureScript
CreatureAI* GetAI(Creature* creature) const override
{
- return GetInstanceAI<boss_azshir_the_sleeplessAI>(creature);
+ return GetScarletMonasteryAI<boss_azshir_the_sleeplessAI>(creature);
}
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
index 18369c7adfc..14698faaa97 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_bloodmage_thalnos.cpp
@@ -80,9 +80,9 @@ class boss_bloodmage_thalnos : public CreatureScript
Talk(SAY_KILL);
}
- void DamageTaken(Unit* /*done_by*/, uint32& /*damage*/) override
+ void DamageTaken(Unit* /*attacker*/, uint32& damage) override
{
- if (HealthBelowPct(35) && !_hpYell)
+ if (!_hpYell && me->HealthBelowPctDamaged(35, damage))
{
Talk(SAY_HEALTH);
_hpYell = true;
@@ -114,18 +114,13 @@ class boss_bloodmage_thalnos : public CreatureScript
}
}
- void UpdateAI(uint32 diff) override
- {
- BossAI::UpdateAI(diff);
- }
-
private:
bool _hpYell;
};
CreatureAI* GetAI(Creature* creature) const override
{
- return GetInstanceAI<boss_bloodmage_thalnosAI>(creature);
+ return GetScarletMonasteryAI<boss_bloodmage_thalnosAI>(creature);
}
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
index d1d25dd2ba6..d77334785ef 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_herod.cpp
@@ -100,9 +100,9 @@ class boss_herod : public CreatureScript
me->SummonCreature(NPC_SCARLET_TRAINEE, ScarletTraineePos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
}
- void DamageTaken(Unit* /*done_by*/, uint32& /*damage*/) override
+ void DamageTaken(Unit* /*attacker*/, uint32& damage) override
{
- if (HealthBelowPct(30) && !_enrage)
+ if (!_enrage && me->HealthBelowPctDamaged(30, damage))
{
Talk(EMOTE_ENRAGE);
Talk(SAY_ENRAGE);
@@ -129,18 +129,13 @@ class boss_herod : public CreatureScript
}
}
- void UpdateAI(uint32 diff) override
- {
- BossAI::UpdateAI(diff);
- }
-
private:
bool _enrage;
};
CreatureAI* GetAI(Creature* creature) const override
{
- return GetInstanceAI<boss_herodAI>(creature);
+ return GetScarletMonasteryAI<boss_herodAI>(creature);
}
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
index 40c7667843b..0e1b51f9a83 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_houndmaster_loksey.cpp
@@ -73,16 +73,11 @@ class boss_houndmaster_loksey : public CreatureScript
break;
}
}
-
- void UpdateAI(uint32 diff) override
- {
- BossAI::UpdateAI(diff);
- }
};
CreatureAI* GetAI(Creature* creature) const override
{
- return GetInstanceAI<boss_houndmaster_lokseyAI>(creature);
+ return GetScarletMonasteryAI<boss_houndmaster_lokseyAI>(creature);
}
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
index 24efd7017ec..d64e556c011 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_scorn.cpp
@@ -1,6 +1,5 @@
/*
* Copyright (C) 2008-2014 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,13 +15,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: Boss_Scorn
-SD%Complete: 100
-SDComment:
-SDCategory: Scarlet Monastery
-EndScriptData */
-
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "scarlet_monastery.h"
@@ -95,16 +87,11 @@ class boss_scorn : public CreatureScript
break;
}
}
-
- void UpdateAI(uint32 diff) override
- {
- BossAI::UpdateAI(diff);
- }
};
CreatureAI* GetAI(Creature* creature) const override
{
- return GetInstanceAI<boss_scornAI>(creature);
+ return GetScarletMonasteryAI<boss_scornAI>(creature);
}
};
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
index 78837912688..dc65bd42bf4 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp
@@ -28,7 +28,7 @@ DoorData const doorData[] =
class instance_scarlet_monastery : public InstanceMapScript
{
public:
- instance_scarlet_monastery() : InstanceMapScript("instance_scarlet_monastery", 189) { }
+ instance_scarlet_monastery() : InstanceMapScript(SMScriptName, 189) { }
struct instance_scarlet_monastery_InstanceMapScript : public InstanceScript
{
diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
index d4ce3f1614f..a74efba751f 100644
--- a/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
+++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/scarlet_monastery.h
@@ -18,6 +18,7 @@
#ifndef SCARLET_M_
#define SCARLET_M_
+#define SMScriptName "instance_scarlet_monastery"
uint32 const EncounterCount = 10;
enum DataTypes
@@ -57,4 +58,10 @@ enum GameObjectIds
GO_PUMPKIN_SHRINE = 186267
};
+template<class AI>
+inline AI* GetScarletMonasteryAI(Creature* creature)
+{
+ return GetInstanceAI<AI>(creature, SMScriptName);
+}
+
#endif // SCARLET_M_