diff options
| author | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-18 15:23:09 +0200 |
|---|---|---|
| committer | Vincent-Michael <Vincent_Michael@gmx.de> | 2013-07-18 15:23:09 +0200 |
| commit | 0b94293dba4a3fa202ec1fe24f16f76d0aef7496 (patch) | |
| tree | 071bbf6bba120a1a3579d11b5681cd5f5c1a64c0 /src | |
| parent | 98c8dc346ad5c84e548a966daba77a5e0098ee59 (diff) | |
Core/Spells: Convert/Update more spells for 4.3.4
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 66 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 82 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_paladin.cpp | 38 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 37 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 114 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_warrior.cpp | 45 |
6 files changed, 314 insertions, 68 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 52f624f0f30..d372f66293e 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -7013,12 +7013,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg case SPELLFAMILY_GENERIC: switch (auraSpellInfo->Id) { - case 23780: // Aegis of Preservation (Aegis of Preservation trinket) - trigger_spell_id = 23781; - break; - case 33896: // Desperate Defense (Stonescythe Whelp, Stonescythe Alpha, Stonescythe Ambusher) - trigger_spell_id = 33898; - break; case 43820: // Charm of the Witch Doctor (Amani Charm of the Witch Doctor trinket) // Pct value stored in dummy basepoints0 = victim->GetCreateHealth() * auraSpellInfo->Effects[1].CalcValue() / 100; @@ -7086,13 +7080,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg } } break; - case SPELLFAMILY_PRIEST: - { - // Greater Heal Refund - if (auraSpellInfo->Id == 37594) - trigger_spell_id = 37595; - break; - } case SPELLFAMILY_DRUID: { switch (auraSpellInfo->Id) @@ -7165,13 +7152,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg { switch (auraSpellInfo->Id) { - // Healing Discount - case 37705: - { - trigger_spell_id = 37706; - target = this; - break; - } // Soul Preserver case 60510: { @@ -7238,36 +7218,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg } break; } - case SPELLFAMILY_SHAMAN: - { - switch (auraSpellInfo->Id) - { - // Lightning Shield (The Ten Storms set) - case 23551: - { - trigger_spell_id = 23552; - target = victim; - break; - } - // Damage from Lightning Shield (The Ten Storms set) - case 23552: - { - trigger_spell_id = 27635; - break; - } - // Mana Surge (The Earthfury set) - case 23572: - { - if (!procSpell) - return false; - basepoints0 = int32(CalculatePct(procSpell->ManaCost, 35)); - trigger_spell_id = 23571; - target = this; - break; - } - } - break; - } case SPELLFAMILY_DEATHKNIGHT: { // Item - Death Knight T10 Melee 4P Bonus @@ -7496,14 +7446,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg } break; } - // Sword and Board - case 50227: - { - // Remove cooldown on Shield Slam - if (GetTypeId() == TYPEID_PLAYER) - ToPlayer()->RemoveSpellCategoryCooldown(1209, true); - break; - } // Maelstrom Weapon case 53817: { @@ -7528,14 +7470,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg return false; break; } - // Glyph of Death Grip - case 58628: - { - // remove cooldown of Death Grip - if (GetTypeId() == TYPEID_PLAYER) - ToPlayer()->RemoveSpellCooldown(49576, true); - return true; - } // Savage Defense case 62606: { diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 9b8e7d489ce..f1ca88a3cf9 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -2466,6 +2466,86 @@ public: } }; +enum AegisOfPreservation +{ + SPELL_AEGIS_HEAL = 23781 +}; + +// 23780 - Blazing Speed +class spell_item_aegis_of_preservation : public SpellScriptLoader +{ + public: + spell_item_aegis_of_preservation() : SpellScriptLoader("spell_item_aegis_of_preservation") { } + + class spell_item_aegis_of_preservation_AuraScript : public AuraScript + { + PrepareAuraScript(spell_item_aegis_of_preservation_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_AEGIS_HEAL)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(GetTarget(), SPELL_AEGIS_HEAL, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_item_aegis_of_preservation_AuraScript::OnProc, EFFECT_1, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_item_aegis_of_preservation_AuraScript(); + } +}; + +enum DesperateDefense +{ + SPELL_DESPERATE_RAGE = 33898 +}; + +// 33896 - Desperate Defense +class spell_item_desperate_defense : public SpellScriptLoader +{ + public: + spell_item_desperate_defense() : SpellScriptLoader("spell_item_desperate_defense") { } + + class spell_item_desperate_defense_AuraScript : public AuraScript + { + PrepareAuraScript(spell_item_desperate_defense_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_DESPERATE_RAGE)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(GetTarget(), SPELL_DESPERATE_RAGE, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_item_desperate_defense_AuraScript::OnProc, EFFECT_2, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_item_desperate_defense_AuraScript(); + } +}; + void AddSC_item_spell_scripts() { // 23074 Arcanite Dragonling @@ -2530,4 +2610,6 @@ void AddSC_item_spell_scripts() new spell_item_chicken_cover(); new spell_item_muisek_vessel(); new spell_item_greatmothers_soulcatcher(); + new spell_item_aegis_of_preservation(); + new spell_item_desperate_defense(); } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 5a5023661d5..eca66832dfe 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -58,6 +58,8 @@ enum PaladinSpells SPELL_PALADIN_DIVINE_PURPOSE_PROC = 90174, + SPELL_PALADIN_ITEM_HEALING_TRANCE = 37706, + SPELL_PALADIN_GLYPH_OF_SALVATION = 63225, SPELL_PALADIN_RIGHTEOUS_DEFENSE_TAUNT = 31790, @@ -589,6 +591,41 @@ class spell_pal_hand_of_salvation : public SpellScriptLoader } }; +// 37705 - Greater Heal Refund +class spell_pri_item_greater_heal_refund : public SpellScriptLoader +{ + public: + spell_pri_item_greater_heal_refund() : SpellScriptLoader("spell_pri_item_greater_heal_refund") { } + + class spell_pri_item_greater_heal_refund_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pri_item_greater_heal_refund_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_ITEM_HEALING_TRANCE)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(GetTarget(), SPELL_PALADIN_ITEM_HEALING_TRANCE, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_pri_item_greater_heal_refund_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_pri_item_greater_heal_refund_AuraScript(); + } +}; + // -20473 - Holy Shock class spell_pal_holy_shock : public SpellScriptLoader { @@ -971,6 +1008,7 @@ void AddSC_paladin_spell_scripts() new spell_pal_guarded_by_the_light(); new spell_pal_hand_of_sacrifice(); new spell_pal_hand_of_salvation(); + new spell_pri_item_greater_heal_refund(); new spell_pal_holy_shock(); new spell_pal_judgement_of_command(); new spell_pal_lay_on_hands(); diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 4e08dd2e431..6b4b8a0451d 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -40,6 +40,7 @@ enum PriestSpells SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL = 56161, SPELL_PRIEST_GLYPH_OF_SHADOW = 107906, SPELL_PRIEST_GUARDIAN_SPIRIT_HEAL = 48153, + SPELL_PRIEST_ITEM_EFFICIENCY = 37595, SPELL_PRIEST_LEAP_OF_FAITH = 73325, SPELL_PRIEST_LEAP_OF_FAITH_EFFECT = 92832, SPELL_PRIEST_LEAP_OF_FAITH_EFFECT_TRIGGER = 92833, @@ -211,6 +212,41 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader } }; +// 37594 - Greater Heal Refund +class spell_pri_item_greater_heal_refund : public SpellScriptLoader +{ + public: + spell_pri_item_greater_heal_refund() : SpellScriptLoader("spell_pri_item_greater_heal_refund") { } + + class spell_pri_item_greater_heal_refund_AuraScript : public AuraScript + { + PrepareAuraScript(spell_pri_item_greater_heal_refund_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_ITEM_EFFICIENCY)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(GetTarget(), SPELL_PRIEST_ITEM_EFFICIENCY, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_pri_item_greater_heal_refund_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_pri_item_greater_heal_refund_AuraScript(); + } +}; + // 47788 - Guardian Spirit class spell_pri_guardian_spirit : public SpellScriptLoader { @@ -870,6 +906,7 @@ void AddSC_priest_spell_scripts() new spell_pri_dispel_magic(); new spell_pri_divine_aegis(); new spell_pri_glyph_of_prayer_of_healing(); + new spell_pri_item_greater_heal_refund(); new spell_pri_guardian_spirit(); new spell_pri_leap_of_faith_effect_trigger(); new spell_pri_lightwell_renew(); diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index c26f9b360dc..078baf97814 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -48,6 +48,9 @@ enum ShamanSpells SPELL_SHAMAN_LAVA_FLOWS_R1 = 51480, SPELL_SHAMAN_LAVA_FLOWS_TRIGGERED_R1 = 65264, SPELL_SHAMAN_LAVA_SURGE = 77762, + SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD = 23552, + SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD_DAMAGE = 27635, + SPELL_SHAMAN_ITEM_MANA_SURGE = 23571, SPELL_SHAMAN_LIGHTNING_SHIELD = 324, SPELL_SHAMAN_NATURE_GUARDIAN = 31616, SPELL_SHAMAN_SATED = 57724, @@ -622,6 +625,114 @@ class spell_sha_heroism : public SpellScriptLoader } }; +// 23551 - Lightning Shield +class spell_sha_item_lightning_shield : public SpellScriptLoader +{ + public: + spell_sha_item_lightning_shield() : SpellScriptLoader("spell_sha_item_lightning_shield") { } + + class spell_sha_item_lightning_shield_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_item_lightning_shield_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_sha_item_lightning_shield_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_sha_item_lightning_shield_AuraScript(); + } +}; + +// 23552 - Lightning Shield +class spell_sha_item_lightning_shield_trigger : public SpellScriptLoader +{ + public: + spell_sha_item_lightning_shield_trigger() : SpellScriptLoader("spell_sha_item_lightning_shield_trigger") { } + + class spell_sha_item_lightning_shield_trigger_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_item_lightning_shield_trigger_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ITEM_MANA_SURGE)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + int32 basePoints0 = int32(CalculatePct(eventInfo.GetDamageInfo()->GetSpellInfo()->ManaCost, 35)); + + GetTarget()->CastCustomSpell(GetTarget(), SPELL_SHAMAN_ITEM_MANA_SURGE, &basePoints0, NULL, NULL, true); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_sha_item_lightning_shield_trigger_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_sha_item_lightning_shield_trigger_AuraScript(); + } +}; + + +// 23572 - Mana Surge +class spell_sha_item_mana_surge : public SpellScriptLoader +{ + public: + spell_sha_item_mana_surge() : SpellScriptLoader("spell_sha_item_mana_surge") { } + + class spell_sha_item_mana_surge_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_item_mana_surge_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD_DAMAGE)) + return false; + return true; + } + + void OnProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(GetTarget(), SPELL_SHAMAN_ITEM_LIGHTNING_SHIELD_DAMAGE, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_sha_item_mana_surge_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_sha_item_mana_surge_AuraScript(); + } +}; + // 60103 - Lava Lash /// Updated 4.3.4 class spell_sha_lava_lash : public SpellScriptLoader @@ -981,6 +1092,9 @@ void AddSC_shaman_spell_scripts() new spell_sha_focused_insight(); new spell_sha_healing_stream_totem(); new spell_sha_heroism(); + new spell_sha_item_lightning_shield(); + new spell_sha_item_lightning_shield_trigger(); + new spell_sha_item_mana_surge(); new spell_sha_lava_lash(); new spell_sha_lava_surge(); new spell_sha_lava_surge_proc(); diff --git a/src/server/scripts/Spells/spell_warrior.cpp b/src/server/scripts/Spells/spell_warrior.cpp index 691264015a1..9f024f1231b 100644 --- a/src/server/scripts/Spells/spell_warrior.cpp +++ b/src/server/scripts/Spells/spell_warrior.cpp @@ -46,6 +46,7 @@ enum WarriorSpells SPELL_WARRIOR_SECOUND_WIND_PROC_RANK_2 = 29838, SPELL_WARRIOR_SECOUND_WIND_TRIGGER_RANK_1 = 29841, SPELL_WARRIOR_SECOUND_WIND_TRIGGER_RANK_2 = 29842, + SPELL_WARRIOR_SHIELD_SLAM = 23922 , SPELL_WARRIOR_SLAM = 50782, SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK = 26654, SPELL_WARRIOR_TAUNT = 355, @@ -54,12 +55,15 @@ enum WarriorSpells SPELL_WARRIOR_UNRELENTING_ASSAULT_TRIGGER_1 = 64849, SPELL_WARRIOR_UNRELENTING_ASSAULT_TRIGGER_2 = 64850, SPELL_WARRIOR_VIGILANCE_PROC = 50725, - SPELL_WARRIOR_VIGILANCE_REDIRECT_THREAT = 59665, + SPELL_WARRIOR_VIGILANCE_REDIRECT_THREAT = 59665 +}; +enum MiscSpells +{ SPELL_PALADIN_BLESSING_OF_SANCTUARY = 20911, SPELL_PALADIN_GREATER_BLESSING_OF_SANCTUARY = 25899, SPELL_PRIEST_RENEWED_HOPE = 63944, - SPELL_GEN_DAMAGE_REDUCTION_AURA = 68066, + SPELL_GEN_DAMAGE_REDUCTION_AURA = 68066 }; enum WarriorSpellIcons @@ -729,6 +733,42 @@ class spell_warr_sweeping_strikes : public SpellScriptLoader } }; +// -46951 - Sword and Board +class spell_warr_sword_and_board : public SpellScriptLoader +{ + public: + spell_warr_sword_and_board() : SpellScriptLoader("spell_warr_sword_and_board") { } + + class spell_warr_sword_and_board_AuraScript : public AuraScript + { + PrepareAuraScript(spell_warr_sword_and_board_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_SHIELD_SLAM)) + return false; + return true; + } + + void OnProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/) + { + // Remove cooldown on Shield Slam + if (Player* player = GetTarget()->ToPlayer()) + player->RemoveSpellCooldown(SPELL_WARRIOR_SHIELD_SLAM, true); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_warr_sword_and_board_AuraScript::OnProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_warr_sword_and_board_AuraScript(); + } +}; + // 50720 - Vigilance class spell_warr_vigilance : public SpellScriptLoader { @@ -873,6 +913,7 @@ void AddSC_warrior_spell_scripts() new spell_warr_shattering_throw(); new spell_warr_slam(); new spell_warr_sweeping_strikes(); + new spell_warr_sword_and_board(); new spell_warr_vigilance(); new spell_warr_vigilance_trigger(); } |
