aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhacknowledge <hacknowledge101@googlemail.com>2011-08-24 23:26:25 +0200
committerhacknowledge <hacknowledge101@googlemail.com>2011-08-25 00:24:22 +0200
commiteb15c8c08a3792b9de7153a7085e1f37f8cdbe73 (patch)
tree0d638670626799784ddeb33195e3242cc37195dd /src
parentf72cff430d5ca0585489e11c2db7b9e26e1fbe8d (diff)
Fixes ammo consumption for Hunter's Volley
#2734
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 84d31449c41..f2e2d915847 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3289,6 +3289,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 (IsRangedWeaponSpell(m_spellInfo) && IsChanneledSpell(m_spellInfo))
+ TakeAmmo();
+
+
if (m_spellState != SPELL_STATE_CASTING)
finish(true); // successfully finish spell cast (not last in case autorepeat or channel spell)
}
@@ -6639,6 +6644,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 && IsAreaOfEffectSpell(m_spellInfo))
+ usesAmmo = false;
+
if (usesAmmo)
{
bool ammoTaken = false;