mirror of
https://github.com/EQEmu/Server.git
synced 2026-02-21 13:42:24 +00:00
Fix for bug with Discipline recast timers preventing them from
working properly if you used a focus effect to reduce recast time to zero. (Specifically the recast timer failed to reset in the situation where you had already used the disc WIHTOUT the focus applied, then applied the focus and tried to have it reduced).
This commit is contained in:
parent
193f7b0fe3
commit
f0f920d0e8
@ -683,8 +683,17 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
{
|
||||
uint32 reduced_recast = spell.recast_time / 1000;
|
||||
reduced_recast -= CastToClient()->GetFocusEffect(focusReduceRecastTime, spell_id);
|
||||
if(reduced_recast < 0)
|
||||
if(reduced_recast <= 0){
|
||||
reduced_recast = 0;
|
||||
CastToClient()->GetPTimers().Clear(&database, (uint32)DiscTimer);
|
||||
}
|
||||
|
||||
if (reduced_recast > 0)
|
||||
CastSpell(spell_id, target, DISCIPLINE_SPELL_SLOT, -1, -1, 0, -1, (uint32)DiscTimer, reduced_recast);
|
||||
else{
|
||||
CastSpell(spell_id, target, DISCIPLINE_SPELL_SLOT);
|
||||
return true;
|
||||
}
|
||||
|
||||
CastSpell(spell_id, target, DISCIPLINE_SPELL_SLOT, -1, -1, 0, -1, (uint32)DiscTimer, reduced_recast);
|
||||
if(spells[spell_id].EndurTimerIndex < MAX_DISCIPLINE_TIMERS)
|
||||
|
||||
@ -2195,7 +2195,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
|
||||
CastToClient()->GetPTimers().Start(casting_spell_timer, casting_spell_timer_duration);
|
||||
mlog(SPELLS__CASTING, "Spell %d: Setting custom reuse timer %d to %d", spell_id, casting_spell_timer, casting_spell_timer_duration);
|
||||
}
|
||||
else if(spells[spell_id].recast_time > 1000) {
|
||||
else if(spells[spell_id].recast_time > 1000 && !spells[spell_id].IsDisciplineBuff) {
|
||||
int recast = spells[spell_id].recast_time/1000;
|
||||
if (spell_id == SPELL_LAY_ON_HANDS) //lay on hands
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user