mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 07:21:48 +00:00
Fix to remove double CastSpell calls from use disc function.
This commit is contained in:
parent
96a0cc37e0
commit
f1701aae9f
@ -874,6 +874,7 @@ void SetConsumption(int32 in_hunger, int32 in_thirst);
|
||||
void DropInst(const ItemInst* inst);
|
||||
bool TrainDiscipline(uint32 itemid);
|
||||
void SendDisciplineUpdate();
|
||||
void SendDisciplineTimer(uint32 timer_id, uint32 duration);
|
||||
bool UseDiscipline(uint32 spell_id, uint32 target);
|
||||
|
||||
bool CheckTitle(int titleset);
|
||||
|
||||
@ -696,16 +696,7 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
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)
|
||||
{
|
||||
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);
|
||||
}
|
||||
SendDisciplineTimer(spells[spell_id].EndurTimerIndex, reduced_recast);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -714,6 +705,19 @@ bool Client::UseDiscipline(uint32 spell_id, uint32 target) {
|
||||
return(true);
|
||||
}
|
||||
|
||||
void Client::SendDisciplineTimer(uint32 timer_id, uint32 duration)
|
||||
{
|
||||
if (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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user