mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-27 16:11:29 +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:
parent
6154cfce99
commit
da401acdb2
@ -2,6 +2,7 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 10/10/2013 ==
|
||||
Secrets: Fixed zone shutdown (or #reloadqst) reinitalization of Perl. This should allow for Perl 5.14 and later to work on Windows under the new quest system.
|
||||
demonstar55: Beneficial single target buffs shouldn't have their mana/timers set if they fail to cast after the Mob::SpellOnTarget call in Mob::SpellFinished
|
||||
|
||||
== 10/09/2013 ==
|
||||
demonstar55: Fixed some more instances of the AA timer being eaten
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user