aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorVincent-Michael <Vincent_Michael@gmx.de>2013-07-23 13:44:42 +0200
committerVincent-Michael <Vincent_Michael@gmx.de>2013-07-23 13:46:38 +0200
commit193d71f158d87a875d16020323483c7484198d7f (patch)
treebdd5e02141ce310d461450ece0c945cf78fe9189 /src/server/scripts
parent62944c6d8da6b05b0106e633d5e3f53c6e3fa08e (diff)
Core/Spells: Fix hunter talent "Master Marksman" for 4.3.4
Closes #9968
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp2
-rw-r--r--src/server/scripts/Spells/spell_hunter.cpp80
-rw-r--r--src/server/scripts/Spells/spell_shaman.cpp2
3 files changed, 81 insertions, 3 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index 45a8199609e..b704a475edd 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -864,7 +864,7 @@ class spell_dk_scent_of_blood : public SpellScriptLoader
{
PreventDefaultAction();
GetTarget()->CastSpell(GetTarget(), SPELL_DK_SCENT_OF_BLOOD, true, NULL, aurEff);
- GetTarget()->RemoveAuraFromStack(GetSpellInfo()->Id);
+ GetTarget()->RemoveAuraFromStack(GetId());
}
void Register() OVERRIDE
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp
index 208d10fbfe3..7c4d3ca2208 100644
--- a/src/server/scripts/Spells/spell_hunter.cpp
+++ b/src/server/scripts/Spells/spell_hunter.cpp
@@ -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();
diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp
index 6b78c3e4c44..3b67fca94cf 100644
--- a/src/server/scripts/Spells/spell_shaman.cpp
+++ b/src/server/scripts/Spells/spell_shaman.cpp
@@ -91,7 +91,7 @@ class spell_sha_ancestral_awakening : public SpellScriptLoader
void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo)
{
PreventDefaultAction();
- int32 heal = CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount());
+ int32 heal = int32(CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount()));
GetTarget()->CastCustomSpell(SPELL_SHAMAN_ANCESTRAL_AWAKENING, SPELLVALUE_BASE_POINT0, heal, (Unit*)NULL, true, NULL, aurEff);
}