mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Fix mana and timer being used on single target buffs failing
Single target buffs shouldn't have their mana consumed or their reuse timers set if they fail the Mob::SpellOnTarget call in Mob::SpellFinished. Ex. Night's Dark Terror not taking hold (no free slots) or Target running out of range. Debuffs do not get this nice behavior.
This commit is contained in:
+6
-2
@@ -1818,9 +1818,13 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
if (isproc) {
|
||||
SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, true);
|
||||
} else {
|
||||
if(!SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, false))
|
||||
if(casting_spell_type == 1) // AA failed to cast, InterruptSpell to reset timer
|
||||
if(!SpellOnTarget(spell_id, spell_target, false, true, resist_adjust, false)) {
|
||||
if(IsBuffSpell(spell_id) && IsBeneficialSpell(spell_id)) {
|
||||
// Prevent mana usage/timers being set for beneficial buffs
|
||||
InterruptSpell();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(IsPlayerIllusionSpell(spell_id)
|
||||
&& IsClient()
|
||||
|
||||
Reference in New Issue
Block a user