Refactored lootAccountItem method to handle optional items and updated zone packet handlers to use this method with timeout adjustments.
What changed?
Modified lootAccountItem method in BaseFullCharacter to handle optional item parameter and return early if the item is not provided.
Updated zonepackethandlers.ts to replace lootItem with lootAccountItem and introduced a 12-second timeout before calling the method.
How to test?
Run the server and ensure that the changes do not introduce any runtime errors.
Test looting functionality in various scenarios to ensure the method handles optional items correctly.
Verify timeout handling in the looting process.
Why make this change?
This change was made to improve the robustness of the looting functionality by ensuring that it can handle cases where no item is provided. The timeout adjustment ensures that the looting process is appropriately delayed.
TL;DR
Refactored
lootAccountItem
method to handle optional items and updated zone packet handlers to use this method with timeout adjustments.What changed?
lootAccountItem
method inBaseFullCharacter
to handle optionalitem
parameter and return early if the item is not provided.zonepackethandlers.ts
to replacelootItem
withlootAccountItem
and introduced a 12-second timeout before calling the method.How to test?
Why make this change?
This change was made to improve the robustness of the looting functionality by ensuring that it can handle cases where no item is provided. The timeout adjustment ensures that the looting process is appropriately delayed.