[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:
Natedog2012
2023-01-25 20:09:08 -06:00
committed by GitHub
parent e5dabe0afc
commit 1fe79f430c
18 changed files with 187 additions and 31 deletions
+6
View File
@@ -2872,6 +2872,11 @@ void Perl_Client_CampAllBots(Client* self, uint8 class_id)
self->CampAllBots(class_id);
}
void Perl_Client_ResetItemCooldown(Client* self, uint32 item_id)
{
self->ResetItemCooldown(item_id);
}
void perl_register_client()
{
perl::interpreter perl(PERL_GET_THX);
@@ -3231,6 +3236,7 @@ void perl_register_client()
package.add("ResetCastbarCooldownBySlot", &Perl_Client_ResetCastbarCooldownBySlot);
package.add("ResetCastbarCooldownBySpellID", &Perl_Client_ResetCastbarCooldownBySpellID);
package.add("ResetDisciplineTimer", &Perl_Client_ResetDisciplineTimer);
package.add("ResetItemCooldown", &Perl_Client_ResetItemCooldown);
package.add("ResetTrade", &Perl_Client_ResetTrade);
package.add("Save", &Perl_Client_Save);
package.add("SaveBackup", &Perl_Client_SaveBackup);