Exclude items included in DailyTaskManager from extractable consumption.
This commit is contained in:
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -56,15 +58,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -56,15 +58,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -54,15 +56,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -54,15 +56,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -54,15 +56,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -56,15 +58,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -58,15 +58,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -58,16 +58,18 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
60011, // Festival Fairy's Good Luck Bag
|
RESET_ITEMS.add(60011); // Festival Fairy's Good Luck Bag
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -60,16 +60,18 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
60011, // Festival Fairy's Good Luck Bag
|
RESET_ITEMS.add(60011); // Festival Fairy's Good Luck Bag
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -60,16 +60,18 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
47387, // Balthus Knights Supply Items
|
RESET_ITEMS.add(47387); // Balthus Knights Supply Items
|
||||||
60011, // Festival Fairy's Good Luck Bag
|
RESET_ITEMS.add(60011); // Festival Fairy's Good Luck Bag
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -57,15 +59,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -57,15 +59,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -57,15 +59,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -57,15 +59,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -57,15 +59,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -59,15 +61,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -67,7 +68,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -56,15 +58,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -61,15 +63,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -61,15 +63,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -61,15 +63,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
@@ -26,6 +26,7 @@ import org.l2jmobius.Config;
|
|||||||
import org.l2jmobius.commons.util.Rnd;
|
import org.l2jmobius.commons.util.Rnd;
|
||||||
import org.l2jmobius.gameserver.data.ItemTable;
|
import org.l2jmobius.gameserver.data.ItemTable;
|
||||||
import org.l2jmobius.gameserver.handler.IItemHandler;
|
import org.l2jmobius.gameserver.handler.IItemHandler;
|
||||||
|
import org.l2jmobius.gameserver.instancemanager.DailyTaskManager;
|
||||||
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
import org.l2jmobius.gameserver.model.ExtractableProduct;
|
||||||
import org.l2jmobius.gameserver.model.actor.Playable;
|
import org.l2jmobius.gameserver.model.actor.Playable;
|
||||||
import org.l2jmobius.gameserver.model.actor.Player;
|
import org.l2jmobius.gameserver.model.actor.Player;
|
||||||
@@ -66,7 +67,7 @@ public class ExtractableItems implements IItemHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
// destroy item
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -21,6 +21,8 @@ import java.sql.PreparedStatement;
|
|||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
@@ -61,15 +63,17 @@ public class DailyTaskManager
|
|||||||
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(DailyTaskManager.class.getName());
|
||||||
|
|
||||||
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
private static final SimpleDateFormat SDF = new SimpleDateFormat("dd/MM HH:mm");
|
||||||
private static final int[] RESET_SKILLS =
|
private static final Set<Integer> RESET_SKILLS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
2510, // Wondrous Cubic
|
RESET_SKILLS.add(2510); // Wondrous Cubic
|
||||||
22180, // Wondrous Cubic - 1 time use
|
RESET_SKILLS.add(22180); // Wondrous Cubic - 1 time use
|
||||||
};
|
}
|
||||||
private static final int[] RESET_ITEMS =
|
public static final Set<Integer> RESET_ITEMS = new HashSet<>();
|
||||||
|
static
|
||||||
{
|
{
|
||||||
49782, // Balthus Knights' Supply Box
|
RESET_ITEMS.add(49782); // Balthus Knights' Supply Box
|
||||||
};
|
}
|
||||||
|
|
||||||
protected DailyTaskManager()
|
protected DailyTaskManager()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user