mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 08:08:25 +00:00
[Feature] ResetItemCooldown added to lua/perl and fix item re-cast times to show properly (#2793)
* Testing. * Add ResetItemCooldown and port it over to perl * This flag needs to be set for updating shared item cooldowns * Properly set item recast for all item types, on corpses, on looting * SummonItem properly sets recast timers of summoned items * Rename variable to avoid confusion and change manifest to be more specific * Sanity check item_d * Recast -1 added as RECAST_TYPE_UNLINKED_ITEM ResetItemCooldown will still remove cooldown of item that we don't have so when we acquire it the cooldown is reset * change magic numbers * more magic numbers * More constants yay * Remove unneeded export DeleteItemRecastTimer * Remove duplicate message, this is handled by the client in this part of the code Co-authored-by: Kinglykrab <kinglykrab@gmail.com>
This commit is contained in:
+11
-3
@@ -8927,9 +8927,12 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
{
|
||||
if (item->RecastDelay > 0)
|
||||
{
|
||||
if (!GetPTimers().Expired(&database, (pTimerItemStart + item->RecastType), false)) {
|
||||
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.
|
||||
MessageString(Chat::Red, SPELL_RECAST);
|
||||
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)) {
|
||||
SendSpellBarEnable(item->Click.Effect);
|
||||
LogSpells("Casting of [{}] canceled: item spell reuse timer not expired", spell_id);
|
||||
return;
|
||||
@@ -8972,11 +8975,16 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
|
||||
{
|
||||
if (augitem->RecastDelay > 0)
|
||||
{
|
||||
if (!GetPTimers().Expired(&database, (pTimerItemStart + augitem->RecastType), false)) {
|
||||
if (augitem->RecastType != RECAST_TYPE_UNLINKED_ITEM && !GetPTimers().Expired(&database, (pTimerItemStart + augitem->RecastType), false)) {
|
||||
LogSpells("Casting of [{}] canceled: item spell reuse timer from augment not expired", spell_id);
|
||||
MessageString(Chat::Red, SPELL_RECAST);
|
||||
SendSpellBarEnable(augitem->Click.Effect);
|
||||
return;
|
||||
} else if (augitem->RecastType == RECAST_TYPE_UNLINKED_ITEM && !GetPTimers().Expired(&database, (pTimerNegativeItemReuse * augitem->ID), false)) {
|
||||
MessageString(Chat::Red, SPELL_RECAST);
|
||||
SendSpellBarEnable(augitem->Click.Effect);
|
||||
LogSpells("Casting of [{}] canceled: item spell reuse timer not expired", spell_id);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user