aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rw-r--r--src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
index f8810940af6..2b6283d980b 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
@@ -18,6 +18,7 @@
#include "ruins_of_ahnqiraj.h"
#include "ScriptedCreature.h"
#include "ScriptMgr.h"
+#include "SpellScript.h"
enum Yells
{
@@ -133,7 +134,27 @@ class boss_rajaxx : public CreatureScript
}
};
+class spell_rajaxx_thundercrash : public SpellScript
+{
+ PrepareSpellScript(spell_rajaxx_thundercrash);
+
+ void HandleDamageCalc(SpellEffIndex /*effIndex*/)
+ {
+ int32 damage = GetHitUnit()->GetHealth() / 2;
+ if (damage < 200)
+ damage = 200;
+
+ SetHitDamage(damage);
+ }
+
+ void Register() override
+ {
+ OnEffectHitTarget += SpellEffectFn(spell_rajaxx_thundercrash::HandleDamageCalc, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
+ }
+};
+
void AddSC_boss_rajaxx()
{
new boss_rajaxx();
+ RegisterSpellScript(spell_rajaxx_thundercrash);
}