mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 14:46:24 +00:00
refactor(Core/Scripts): Spell To Scripts (#9718)
This commit is contained in:
committed by
GitHub
parent
838c88f45a
commit
11a734bf2b
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellScript.h"
|
||||
#include "ruins_of_ahnqiraj.h"
|
||||
|
||||
enum Yells
|
||||
@@ -124,7 +125,29 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user