aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp20
-rw-r--r--src/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/game/Spells/SpellMgr.cpp4
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp50
4 files changed, 53 insertions, 23 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 5ad59ebc5d0..ea89d869785 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5926,17 +5926,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
triggered_spell_id = 34720;
break;
}
- case 3560: // Rapid Recuperation
- {
- // This effect only from Rapid Killing (focus regen)
- if (!(procSpell->SpellFamilyFlags[1] & 0x01000000))
- return false;
-
- target = this;
- triggered_spell_id = 58883;
- basepoints0 = CalculatePct(GetMaxPower(POWER_FOCUS), triggerAmount);
- break;
- }
}
break;
}
@@ -7296,15 +7285,6 @@ bool Unit::HandleProcTriggerSpell(Unit* victim, uint32 damage, AuraEffect* trigg
return false;
break;
}
- // Rapid Recuperation
- case 53228:
- case 53232:
- {
- // This effect only from Rapid Fire (ability cast)
- if (!(procSpell->SpellFamilyFlags[0] & 0x20))
- return false;
- break;
- }
// Decimation
case 63156:
case 63158:
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index e74b74ffdd0..4bb8e5b4bd2 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2518,8 +2518,6 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
caster->ToPlayer()->CastItemCombatSpell(unitTarget, m_attackType, procVictim, procEx);
}
-
-
m_damage = damageInfo.damage;
caster->DealSpellDamage(&damageInfo, true);
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 3ee6266b0d2..284b45eb8be 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -3093,7 +3093,9 @@ void SpellMgr::LoadSpellInfoCorrections()
case 20336:
case 20337:
case 63320: // Glyph of Life Tap
- // Entries were not updated after spell effect change, we have to do that manually :/
+ case 53228: // Rapid Killing (Rang 1)
+ case 53232: // Rapid Killing (Rang 2)
+ // Entries were not updated after spell effect change, we have to do that manually :/
spellInfo->AttributesEx3 |= SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED;
break;
case 59725: // Improved Spell Reflection - aoe aura
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index efb012ff3f2..e3e9f9f3a57 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -47,6 +47,7 @@ enum HunterSpells
SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_TRIGGERED = 54114,
SPELL_HUNTER_PET_HEART_OF_THE_PHOENIX_DEBUFF = 55711,
SPELL_HUNTER_PET_CARRION_FEEDER_TRIGGERED = 54045,
+ SPELL_HUNTER_RAPID_RECUPERATION = 58883,
SPELL_HUNTER_READINESS = 23989,
SPELL_HUNTER_SNIPER_TRAINING_R1 = 53302,
SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1 = 64418,
@@ -575,6 +576,54 @@ class spell_hun_pet_heart_of_the_phoenix : public SpellScriptLoader
}
};
+// -53228 - Rapid Recuperation
+class spell_hun_rapid_recuperation : public SpellScriptLoader
+{
+ public:
+ spell_hun_rapid_recuperation() : SpellScriptLoader("spell_hun_rapid_recuperation") { }
+
+ class spell_hun_rapid_recuperation_AuraScript : public AuraScript
+ {
+ PrepareAuraScript(spell_hun_rapid_recuperation_AuraScript);
+
+ bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
+ {
+ if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_RAPID_RECUPERATION))
+ return false;
+ return true;
+ }
+
+ void HandleAbilityCast(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
+ {
+ // This effect only from Rapid Fire (ability cast)
+ if (!(eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[0] & 0x20))
+ return;
+ }
+
+ void HandleFocusRegen(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
+ {
+ PreventDefaultAction();
+ // This effect only from Rapid Killing (focus regen)
+ if (!(eventInfo.GetDamageInfo()->GetSpellInfo()->SpellFamilyFlags[1] & 0x01000000))
+ return;
+
+ int32 focus = aurEff->GetAmount();
+ GetTarget()->CastCustomSpell(SPELL_HUNTER_RAPID_RECUPERATION, SPELLVALUE_BASE_POINT0, focus, GetTarget(), true, NULL, aurEff);
+ }
+
+ void Register() OVERRIDE
+ {
+ OnEffectProc += AuraEffectProcFn(spell_hun_rapid_recuperation_AuraScript::HandleAbilityCast, EFFECT_0, SPELL_AURA_DUMMY);
+ OnEffectProc += AuraEffectProcFn(spell_hun_rapid_recuperation_AuraScript::HandleFocusRegen, EFFECT_1, SPELL_AURA_DUMMY);
+ }
+ };
+
+ AuraScript* GetAuraScript() const OVERRIDE
+ {
+ return new spell_hun_rapid_recuperation_AuraScript();
+ }
+};
+
// 23989 - Readiness
class spell_hun_readiness : public SpellScriptLoader
{
@@ -854,6 +903,7 @@ void AddSC_hunter_spell_scripts()
new spell_hun_misdirection_proc();
new spell_hun_pet_carrion_feeder();
new spell_hun_pet_heart_of_the_phoenix();
+ new spell_hun_rapid_recuperation();
new spell_hun_readiness();
new spell_hun_scatter_shot();
new spell_hun_sniper_training();