Core/Spells: Convert/Update hunter "Rapid Recuperation" for 4.3.4
This commit is contained in:
1 parent
da360abc10
commit
557474f2ae
5 files changed
+61
-23
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user