mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 10:56:38 +01:00
Core/Spells: Convert/Update more spells in spell script for 4.3.4
This commit is contained in:
@@ -32,6 +32,7 @@ enum DeathKnightSpells
|
||||
SPELL_DK_BLACK_ICE_R1 = 49140,
|
||||
SPELL_DK_BLOOD_BOIL_TRIGGERED = 65658,
|
||||
SPELL_DK_BLOOD_GORGED_HEAL = 50454,
|
||||
SPELL_DK_BLOOD_PRESENCE = 48266,
|
||||
SPELL_DK_CORPSE_EXPLOSION_TRIGGERED = 43999,
|
||||
SPELL_DK_CORPSE_EXPLOSION_VISUAL = 51270,
|
||||
SPELL_DK_DEATH_COIL_DAMAGE = 47632,
|
||||
@@ -39,16 +40,16 @@ enum DeathKnightSpells
|
||||
SPELL_DK_DEATH_STRIKE_HEAL = 45470,
|
||||
SPELL_DK_GHOUL_EXPLODE = 47496,
|
||||
SPELL_DK_GLYPH_OF_ICEBOUND_FORTITUDE = 58625,
|
||||
SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED = 63611,
|
||||
SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED = 63622,
|
||||
SPELL_DK_ITEM_SIGIL_VENGEFUL_HEART = 64962,
|
||||
SPELL_DK_ITEM_T8_MELEE_4P_BONUS = 64736,
|
||||
SPELL_DK_RUNIC_POWER_ENERGIZE = 49088,
|
||||
SPELL_DK_SCENT_OF_BLOOD = 50422,
|
||||
SPELL_DK_SCOURGE_STRIKE_TRIGGERED = 70890,
|
||||
SPELL_DK_WILL_OF_THE_NECROPOLIS_TALENT_R1 = 49189,
|
||||
SPELL_DK_WILL_OF_THE_NECROPOLIS_AURA_R1 = 52284,
|
||||
SPELL_DK_BLOOD_PRESENCE = 48266,
|
||||
SPELL_DK_IMPROVED_BLOOD_PRESENCE_TRIGGERED = 63611,
|
||||
SPELL_DK_UNHOLY_PRESENCE = 48265,
|
||||
SPELL_DK_IMPROVED_UNHOLY_PRESENCE_TRIGGERED = 63622,
|
||||
SPELL_DK_ITEM_SIGIL_VENGEFUL_HEART = 64962,
|
||||
SPELL_DK_ITEM_T8_MELEE_4P_BONUS = 64736
|
||||
};
|
||||
|
||||
enum DeathKnightSpellIcons
|
||||
@@ -807,6 +808,42 @@ class spell_dk_rune_tap_party : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 50421 - Scent of Blood
|
||||
class spell_dk_scent_of_blood : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_dk_scent_of_blood() : SpellScriptLoader("spell_dk_scent_of_blood") { }
|
||||
|
||||
class spell_dk_scent_of_blood_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dk_scent_of_blood_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DK_SCENT_OF_BLOOD))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_DK_SCENT_OF_BLOOD, true, NULL, aurEff);
|
||||
GetTarget()->RemoveAuraFromStack(GetSpellInfo()->Id);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_dk_scent_of_blood_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_dk_scent_of_blood_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 55090 - Scourge Strike (55265, 55270, 55271)
|
||||
class spell_dk_scourge_strike : public SpellScriptLoader
|
||||
{
|
||||
@@ -1023,6 +1060,7 @@ void AddSC_deathknight_spell_scripts()
|
||||
new spell_dk_improved_blood_presence();
|
||||
new spell_dk_improved_unholy_presence();
|
||||
new spell_dk_rune_tap_party();
|
||||
new spell_dk_scent_of_blood();
|
||||
new spell_dk_scourge_strike();
|
||||
new spell_dk_spell_deflection();
|
||||
new spell_dk_vampiric_blood();
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
enum MageSpells
|
||||
{
|
||||
SPELL_MAGE_BLAZING_SPEED = 31643,
|
||||
SPELL_MAGE_BURNOUT = 29077,
|
||||
SPELL_MAGE_COLD_SNAP = 11958,
|
||||
SPELL_MAGE_FOCUS_MAGIC_PROC = 54648,
|
||||
@@ -162,6 +163,41 @@ class spell_mage_blast_wave : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// -31641 - Blazing Speed
|
||||
class spell_mage_blazing_speed : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mage_blazing_speed() : SpellScriptLoader("spell_mage_blazing_speed") { }
|
||||
|
||||
class spell_mage_blazing_speed_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_mage_blazing_speed_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_BLAZING_SPEED))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_MAGE_BLAZING_SPEED, true, NULL, aurEff);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_mage_blazing_speed_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_mage_blazing_speed_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// -44449 - Burnout
|
||||
class spell_mage_burnout : public SpellScriptLoader
|
||||
{
|
||||
@@ -1189,6 +1225,7 @@ class spell_mage_water_elemental_freeze : public SpellScriptLoader
|
||||
void AddSC_mage_spell_scripts()
|
||||
{
|
||||
new spell_mage_blast_wave();
|
||||
new spell_mage_blazing_speed();
|
||||
new spell_mage_blizzard();
|
||||
new spell_mage_burnout();
|
||||
new spell_mage_cold_snap();
|
||||
|
||||
@@ -49,6 +49,7 @@ enum ShamanSpells
|
||||
SPELL_SHAMAN_LAVA_FLOWS_TRIGGERED_R1 = 65264,
|
||||
SPELL_SHAMAN_LAVA_SURGE = 77762,
|
||||
SPELL_SHAMAN_LIGHTNING_SHIELD = 324,
|
||||
SPELL_SHAMAN_NATURE_GUARDIAN = 31616,
|
||||
SPELL_SHAMAN_SATED = 57724,
|
||||
SPELL_SHAMAN_STORM_EARTH_AND_FIRE = 51483,
|
||||
SPELL_SHAMAN_TELLURIC_CURRENTS = 82987,
|
||||
@@ -770,6 +771,60 @@ class spell_sha_mana_tide_totem : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// -30881 - Nature's Guardian
|
||||
class spell_sha_nature_guardian : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_sha_nature_guardian() : SpellScriptLoader("spell_sha_nature_guardian") { }
|
||||
|
||||
class spell_sha_nature_guardian_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_sha_nature_guardian_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_NATURE_GUARDIAN))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
//! HACK due to currenct proc system implementation
|
||||
if (Player* player = GetTarget()->ToPlayer())
|
||||
if (player->HasSpellCooldown(GetSpellInfo()->Id))
|
||||
return false;
|
||||
|
||||
return GetTarget()->HealthBelowPctDamaged(30, eventInfo.GetDamageInfo()->GetDamage());
|
||||
}
|
||||
|
||||
void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
int32 basePoints0 = GetTarget()->CountPctFromMaxHealth(aurEff->GetAmount());
|
||||
|
||||
GetTarget()->CastCustomSpell(GetTarget(), SPELL_SHAMAN_NATURE_GUARDIAN, &basePoints0, NULL, NULL, true);
|
||||
|
||||
if (eventInfo.GetProcTarget() && eventInfo.GetProcTarget()->IsAlive())
|
||||
eventInfo.GetProcTarget()->getThreatManager().modifyThreatPercent(GetTarget(), -10);
|
||||
|
||||
if (Player* player = GetTarget()->ToPlayer())
|
||||
player->AddSpellCooldown(GetSpellInfo()->Id, 0, time(NULL) + aurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue());
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_sha_nature_guardian_AuraScript::CheckProc);
|
||||
OnEffectProc += AuraEffectProcFn(spell_sha_nature_guardian_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_sha_nature_guardian_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 88756 - Rolling Thunder
|
||||
class spell_sha_rolling_thunder : public SpellScriptLoader
|
||||
{
|
||||
@@ -930,6 +985,7 @@ void AddSC_shaman_spell_scripts()
|
||||
new spell_sha_lava_surge();
|
||||
new spell_sha_lava_surge_proc();
|
||||
new spell_sha_mana_tide_totem();
|
||||
new spell_sha_nature_guardian();
|
||||
new spell_sha_rolling_thunder();
|
||||
new spell_sha_telluric_currents();
|
||||
new spell_sha_thunderstorm();
|
||||
|
||||
@@ -899,7 +899,7 @@ class spell_warl_seduction : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
void Register()
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_warl_seduction_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user