From 7dc1da21f0a892dcdddb2880e425a4bba7657ec9 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Sun, 5 Oct 2014 02:18:30 -0400 Subject: [PATCH] Move OP_ItemRecastDelay to after cast I originally assumed it needed to be sent "while casting" but it looks like right at the end (where we set the reuse timer) also works. --- zone/spells.cpp | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 310bc35bd..9ca3965cc 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -484,19 +484,6 @@ bool Mob::DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot, return false; } - // This needs a bit more work for saving timer to PP for zoning etc - if (IsClient() && item_slot != INVALID_INDEX && ((slot == USE_ITEM_SPELL_SLOT) || (slot == POTION_BELT_SPELL_SLOT))) { - ItemInst *itm = CastToClient()->GetInv().GetItem(item_slot); - if (itm && itm->GetItem()->RecastDelay) { - outapp = new EQApplicationPacket(OP_ItemRecastDelay, sizeof(ItemRecastDelay_Struct)); - ItemRecastDelay_Struct *ird = (ItemRecastDelay_Struct *)outapp->pBuffer; - ird->recast_delay = itm->GetItem()->RecastDelay; - ird->recast_type = itm->GetItem()->RecastType; - CastToClient()->QueuePacket(outapp); - safe_delete(outapp); - } - } - return(true); } @@ -2228,6 +2215,12 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16 ItemInst *itm = CastToClient()->GetInv().GetItem(inventory_slot); if(itm && itm->GetItem()->RecastDelay > 0){ CastToClient()->GetPTimers().Start((pTimerItemStart + itm->GetItem()->RecastType), itm->GetItem()->RecastDelay); + EQApplicationPacket *outapp = new EQApplicationPacket(OP_ItemRecastDelay, sizeof(ItemRecastDelay_Struct)); + ItemRecastDelay_Struct *ird = (ItemRecastDelay_Struct *)outapp->pBuffer; + ird->recast_delay = itm->GetItem()->RecastDelay; + ird->recast_type = itm->GetItem()->RecastType; + CastToClient()->QueuePacket(outapp); + safe_delete(outapp); } }