Exclude items included in DailyTaskManager from extractable consumption.

This commit is contained in:
MobiusDevelopment
2022-03-25 22:24:23 +00:00
parent 1970695d10
commit 8404832faa
42 changed files with 268 additions and 171 deletions

View File

@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
import org.l2jmobius.commons.util.Rnd;
import org.l2jmobius.gameserver.data.ItemTable;
import org.l2jmobius.gameserver.handler.IItemHandler;
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
import org.l2jmobius.gameserver.model.ExtractableProduct;
import org.l2jmobius.gameserver.model.actor.Playable;
import org.l2jmobius.gameserver.model.actor.Player;
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
}
// destroy item
if (!player.destroyItem("Extract", item.getObjectId(), 1, player, true))
if (!DailyTaskManager.RESET_ITEMS.contains(item.getId()) && !player.destroyItem("Extract", item.getObjectId(), 1, player, true))
{
return false;
}