[Bugfix] Add SetItemCooldown to tell client exact timer of item when clicked and export to perl and lua (#2795)

Items that are on cooldown but client doesn't show.. clicking item will fix the timer in client
This commit is contained in:
Natedog2012
2023-01-27 17:31:14 -06:00
committed by GitHub
parent c05f951f81
commit 68a34565f9
6 changed files with 82 additions and 1 deletions
+2 -1
View File
@@ -8928,11 +8928,12 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
if (item->RecastDelay > 0)
{
if (item->RecastType != RECAST_TYPE_UNLINKED_ITEM && !GetPTimers().Expired(&database, (pTimerItemStart + item->RecastType), false)) {
SendItemRecastTimer(item->RecastType); //Problem: When you loot corpse, recast display is not present. This causes it to display again. Could not get to display when sending from looting.
SetItemCooldown(item->ID, true);
SendSpellBarEnable(item->Click.Effect);
LogSpells("Casting of [{}] canceled: item spell reuse timer not expired", spell_id);
return;
} else if (item->RecastType == RECAST_TYPE_UNLINKED_ITEM && !GetPTimers().Expired(&database, (pTimerNegativeItemReuse * item->ID), false)) {
SetItemCooldown(item->ID, true);
SendSpellBarEnable(item->Click.Effect);
LogSpells("Casting of [{}] canceled: item spell reuse timer not expired", spell_id);
return;