aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2011-09-03 07:29:31 -0700
committerQAston <qaston@gmail.com>2011-09-03 07:29:31 -0700
commit414f048bd5c2ac5b840ed2bfe1c9345d24e2ff8f (patch)
treefe19616843b2cf2e4aa77fba04a2cf0642c401f4 /src
parent0ba79e0078b786676d20c69b5e21bd2249ba4e4d (diff)
parent7f7ca27aa615c601f817770727b6db6780e9396c (diff)
Merge pull request #2735 from hacknowledge/fix_2734
Core/Spells: Fixes ammo consumption for Hunter's Volley
Diffstat (limited to 'src')
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index f58bd72914d..68910a42722 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3303,6 +3303,11 @@ void Spell::handle_immediate()
// Remove used for cast item if need (it can be already NULL after TakeReagents call
TakeCastItem();
+ // handle ammo consumption for Hunter's volley spell
+ if (m_spellInfo->IsRangedWeaponSpell() && m_spellInfo->IsChanneled())
+ TakeAmmo();
+
+
if (m_spellState != SPELL_STATE_CASTING)
finish(true); // successfully finish spell cast (not last in case autorepeat or channel spell)
}
@@ -6605,6 +6610,10 @@ void Spell::CalculateDamageDoneForAllTargets()
if (!unit) // || !unit->isAlive()) do we need to check alive here?
continue;
+ // do not consume ammo anymore for Hunter's volley spell
+ if (IsTriggered() && m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->IsAOE())
+ usesAmmo = false;
+
if (usesAmmo)
{
bool ammoTaken = false;