diff --git a/zone/client.h b/zone/client.h index de6d187b7..fd797c1b7 100644 --- a/zone/client.h +++ b/zone/client.h @@ -875,7 +875,6 @@ void SetConsumption(int32 in_hunger, int32 in_thirst); bool TrainDiscipline(uint32 itemid); void SendDisciplineUpdate(); bool UseDiscipline(uint32 spell_id, uint32 target); - void SendDisciplineTimer(uint32 timer_id, uint32 duration, uint16 spell_id = SPELL_UNKNOWN); bool CheckTitle(int titleset); void EnableTitle(int titleset); diff --git a/zone/effects.cpp b/zone/effects.cpp index 118acb4a3..7506f99cf 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -696,7 +696,16 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) { return true; } - SendDisciplineTimer(spells[spell_id].EndurTimerIndex, reduced_recast); + CastSpell(spell_id, target, DISCIPLINE_SPELL_SLOT, -1, -1, 0, -1, (uint32)DiscTimer, reduced_recast); + if(spells[spell_id].EndurTimerIndex < MAX_DISCIPLINE_TIMERS) + { + EQApplicationPacket *outapp = new EQApplicationPacket(OP_DisciplineTimer, sizeof(DisciplineTimer_Struct)); + DisciplineTimer_Struct *dts = (DisciplineTimer_Struct *)outapp->pBuffer; + dts->TimerID = spells[spell_id].EndurTimerIndex; + dts->Duration = reduced_recast; + QueuePacket(outapp); + safe_delete(outapp); + } } else { @@ -705,22 +714,6 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) { return(true); } -void Client::SendDisciplineTimer(uint32 timer_id, uint32 duration, uint16 spell_id) -{ - if (!timer_id && IsValidSpell(spell_id)) - timer_id = spells[spell_id].EndurTimerIndex; - - if(duration > 0 && timer_id && (timer_id < MAX_DISCIPLINE_TIMERS)) - { - EQApplicationPacket *outapp = new EQApplicationPacket(OP_DisciplineTimer, sizeof(DisciplineTimer_Struct)); - DisciplineTimer_Struct *dts = (DisciplineTimer_Struct *)outapp->pBuffer; - dts->TimerID = timer_id; - dts->Duration = duration; - QueuePacket(outapp); - safe_delete(outapp); - } -} - void EntityList::AETaunt(Client* taunter, float range) { if (range == 0) diff --git a/zone/spells.cpp b/zone/spells.cpp index 05000dc51..315fe8712 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2256,10 +2256,6 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16 } } - //Disc Timer needs to be sent before and after the spell packet. - if (IsClient() && spells[spell_id].IsDisciplineBuff && spells[spell_id].EndurTimerIndex) - CastToClient()->SendDisciplineTimer(casting_spell_timer, casting_spell_timer_duration); - if(IsNPC()) CastToNPC()->AI_Event_SpellCastFinished(true, slot);