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
committerAokromes <Aokromes@users.noreply.github.com>2019-01-05 01:54:33 +0100
commit8051ff13dfcf3819b58adfcec1608c08dcbcd080 (patch)
treeeb9748ef4fcee4b45c6c419f4137d26f3c244d23 /src/server/scripts/Kalimdor
parent030f5d54d015f42a09c731c81135ab791b528f1c (diff)
Core/Scripts: Move some spells to scripts (#22332)
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 1416fcd0105..019c7c2647e 100644
--- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
+++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp
@@ -19,6 +19,7 @@
#include "ruins_of_ahnqiraj.h"
#include "ScriptedCreature.h"
#include "ScriptMgr.h"
+#include "SpellScript.h"
enum Yells
{
@@ -134,7 +135,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);
}