aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
authorDanVS <33371360+DanVS@users.noreply.github.com>2019-01-05 00:54:33 +0000
committerShauren <shauren.trinity@gmail.com>2021-11-18 22:41:57 +0100
commit3b1ed434aeacfa57f392387c2176dfb4438b13f8 (patch)
treebbb61e9ed62f83de9f633da759a9a19854ebe019 /src/server/scripts/Kalimdor
parent19646a8363310c5371728fa7b50dcd33bb2278e2 (diff)
Core/Scripts: Move some spells to scripts (#22332)
(cherry picked from commit 8051ff13dfcf3819b58adfcec1608c08dcbcd080)
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);
}