Scripts/Spells: Fix damage on primart target of mage talent Supernova
Port From (https://github.com/TrinityCore/TrinityCore/commit/19a627b23ee2fb00d48fdf24fbdcefeae775455e)
This commit is contained in:
@@ -1123,6 +1123,25 @@ namespace Scripts.Spells.Mage
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 157980 - Supernova
|
||||
class spell_mage_supernova : SpellScript
|
||||
{
|
||||
void HandleDamage(uint effIndex)
|
||||
{
|
||||
if (GetExplTargetUnit() == GetHitUnit())
|
||||
{
|
||||
int damage = GetHitDamage();
|
||||
MathFunctions.AddPct(ref damage, GetEffectInfo(0).CalcValue());
|
||||
SetHitDamage(damage);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Register()
|
||||
{
|
||||
OnEffectHitTarget.Add(new EffectHandler(HandleDamage, 1, SpellEffectName.SchoolDamage));
|
||||
}
|
||||
}
|
||||
|
||||
[Script] // 80353 - Time Warp
|
||||
class spell_mage_time_warp : SpellScript
|
||||
{
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 157980;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(157980, 'spell_mage_supernova');
|
||||
Reference in New Issue
Block a user