Core/Spells: Convert/Update more spells in spell script for 4.3.4
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN (-31641,50421,-30881);
|
||||
INSERT INTO `spell_script_names`(`spell_id`, `ScriptName`) VALUES
|
||||
(-31641,'spell_mage_blazing_speed'),
|
||||
(50421,'spell_dk_scent_of_blood'),
|
||||
(-30881,'spell_sha_nature_guardian');
|
||||
|
||||
DELETE FROM `spell_ranks` WHERE `first_spell_id` IN (31641,30881);
|
||||
INSERT INTO `spell_ranks` (`first_spell_id`, `spell_id`, `rank`) VALUES
|
||||
(31641, 31641, 1),
|
||||
(31641, 31642, 2),
|
||||
(30881, 30881, 1),
|
||||
(30881, 30883, 2),
|
||||
(30881, 30884, 3);
|
||||
|
||||
DELETE FROM `spell_proc_event` WHERE `entry` IN (30881,30883,30884);
|
||||
@@ -7086,29 +7086,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_MAGE:
|
||||
if (auraSpellInfo->SpellIconID == 2127) // Blazing Speed
|
||||
{
|
||||
switch (auraSpellInfo->Id)
|
||||
{
|
||||
case 31641: // Rank 1
|
||||
case 31642: // Rank 2
|
||||
trigger_spell_id = 31643;
|
||||
break;
|
||||
default:
|
||||
TC_LOG_ERROR(LOG_FILTER_UNITS, "Unit::HandleProcTriggerSpell: Spell %u miss posibly Blazing Speed", auraSpellInfo->Id);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
if (auraSpellInfo->Id == 50421) // Scent of Blood
|
||||
{
|
||||
CastSpell(this, 50422, true);
|
||||
RemoveAuraFromStack(auraSpellInfo->Id);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_PRIEST:
|
||||
{
|
||||
// Greater Heal Refund
|
||||
@@ -7288,22 +7265,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
case 30881: // Nature's Guardian Rank 1
|
||||
case 30883: // Nature's Guardian Rank 2
|
||||
case 30884: // Nature's Guardian Rank 3
|
||||
{
|
||||
if (!HealthBelowPctDamaged(30, damage))
|
||||
{
|
||||
basepoints0 = int32(CountPctFromMaxHealth(triggerAmount));
|
||||
target = this;
|
||||
trigger_spell_id = 31616;
|
||||
if (victim && victim->IsAlive())
|
||||
victim->getThreatManager().modifyThreatPercent(this, -10);
|
||||
}
|
||||
else
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -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