Merge pull request #2735 from hacknowledge/fix_2734
Core/Spells: Fixes ammo consumption for Hunter's Volley
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user