Core/Spells: Fix hunter talent "Master Marksman" for 4.3.4
Closes #9968
This commit is contained in:
1 parent
62944c6d8d
commit
193d71f158
6 files changed
+95
-9
No files matched your search
@@ -36,6 +36,7 @@ enum HunterSpells
|
||||
SPELL_HUNTER_ASPECT_OF_THE_VIPER_ENERGIZE = 34075,
|
||||
SPELL_HUNTER_BESTIAL_WRATH = 19574,
|
||||
SPELL_HUNTER_CHIMERA_SHOT_HEAL = 53353,
|
||||
SPELL_HUNTER_FIRE = 82926,
|
||||
SPELL_HUNTER_GLYPH_OF_ASPECT_OF_THE_VIPER = 56851,
|
||||
SPELL_HUNTER_IMPROVED_MEND_PET = 24406,
|
||||
SPELL_HUNTER_INVIGORATION_TRIGGERED = 53398,
|
||||
@@ -219,6 +220,42 @@ class spell_hun_disengage : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 82926 - Fire!
|
||||
class spell_hun_fire : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_hun_fire() : SpellScriptLoader("spell_hun_fire") { }
|
||||
|
||||
class spell_hun_fire_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_hun_fire_AuraScript);
|
||||
|
||||
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
|
||||
{
|
||||
if (!spellMod)
|
||||
{
|
||||
spellMod = new SpellModifier(GetAura());
|
||||
spellMod->op = SPELLMOD_CASTING_TIME;
|
||||
spellMod->type = SPELLMOD_PCT;
|
||||
spellMod->spellId = GetId();
|
||||
spellMod->mask = GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask;
|
||||
}
|
||||
|
||||
spellMod->value = -aurEff->GetAmount();
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_hun_fire_AuraScript::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_hun_fire_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// -19572 - Improved Mend Pet
|
||||
class spell_hun_improved_mend_pet : public SpellScriptLoader
|
||||
{
|
||||
@@ -661,6 +698,44 @@ class spell_hun_readiness : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 82925 - Ready, Set, Aim...
|
||||
class spell_hun_ready_set_aim : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_hun_ready_set_aim() : SpellScriptLoader("spell_hun_ready_set_aim") { }
|
||||
|
||||
class spell_hun_ready_set_aim_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_hun_ready_set_aim_AuraScript);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_FIRE))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetStackAmount() == 5)
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_HUNTER_FIRE, true, NULL, aurEff);
|
||||
GetTarget()->RemoveAura(GetId());
|
||||
}
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_hun_ready_set_aim_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_hun_ready_set_aim_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 37506 - Scatter Shot
|
||||
class spell_hun_scatter_shot : public SpellScriptLoader
|
||||
{
|
||||
@@ -709,7 +784,8 @@ class spell_hun_sniper_training : public SpellScriptLoader
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_SNIPER_TRAINING_R1) || !sSpellMgr->GetSpellInfo(SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1))
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_HUNTER_SNIPER_TRAINING_R1) ||
|
||||
!sSpellMgr->GetSpellInfo(SPELL_HUNTER_SNIPER_TRAINING_BUFF_R1))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -964,6 +1040,7 @@ void AddSC_hunter_spell_scripts()
|
||||
new spell_hun_ascpect_of_the_viper();
|
||||
new spell_hun_chimera_shot();
|
||||
new spell_hun_disengage();
|
||||
new spell_hun_fire();
|
||||
new spell_hun_improved_mend_pet();
|
||||
new spell_hun_invigoration();
|
||||
new spell_hun_last_stand_pet();
|
||||
@@ -974,6 +1051,7 @@ void AddSC_hunter_spell_scripts()
|
||||
new spell_hun_pet_heart_of_the_phoenix();
|
||||
new spell_hun_rapid_recuperation();
|
||||
new spell_hun_readiness();
|
||||
new spell_hun_ready_set_aim();
|
||||
new spell_hun_scatter_shot();
|
||||
new spell_hun_sniper_training();
|
||||
new spell_hun_steady_shot();
|
||||
|
||||
Reference in new issue
Block a user