Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git /config/server.properties
- index e0b6b37..4665c90 100644
- --- a/config/server.properties
- +++ b/config/server.properties
- @@ -256,6 +256,7 @@
- GlobalChatTime = 0
- TradeChatTime = 0
- SocialTime = 2000
- +UserItemTimeEnchant = 200
- # =================================================================
- # Threadpool
- diff --git /java/net/sf/l2j/Config.java
- index ede73e5..df388b4 100644
- --- a/java/net/sf/l2j/Config.java
- +++ b/java/net/sf/l2j/Config.java
- @@ -1170,6 +1170,7 @@
- public static int TRADE_CHAT_TIME;
- public static int SOCIAL_TIME;
- public static int USER_ITEM_TIME;
- + public static int USER_ITEM_TIME_ENCHANT;
- /** Threads & Packets size */
- @@ -3251,6 +3252,7 @@
- TRADE_CHAT_TIME = server.getProperty("TradeChatTime", 0);
- SOCIAL_TIME = server.getProperty("SocialTime", 2000);
- USER_ITEM_TIME = server.getProperty("UserItemTime", 4200);
- + USER_ITEM_TIME_ENCHANT = server.getProperty("UserItemTimeEnchant", 4200);
- //SCHEDULED_THREAD_POOL_COUNT = server.getProperty("ScheduledThreadPoolCount", -1);
- //THREADS_PER_SCHEDULED_THREAD_POOL = server.getProperty("ThreadsPerScheduledThreadPool", 4);
- diff --git /java/net/sf/l2j/gameserver/network/FloodProtectors.java
- index 5dcf3d5..3b612c0 100644
- --- a/java/net/sf/l2j/gameserver/network/FloodProtectors.java
- +++ b/java/net/sf/l2j/gameserver/network/FloodProtectors.java
- @@ -6,6 +6,7 @@
- {
- public static enum Action
- {
- + USER_ITEM_ENCHANT(Config.USER_ITEM_TIME_ENCHANT),
- USER_ITEM(Config.USER_ITEM_TIME),
- ROLL_DICE(Config.ROLL_DICE_TIME),
- HERO_VOICE(Config.HERO_VOICE_TIME),
- diff --git /java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
- index fe2b3ab..8ddea4c 100644
- --- /java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
- @@ -2,19 +2,20 @@
- import net.sf.l2j.commons.random.Rnd;
- +import net.sf.l2j.Config;
- import net.sf.l2j.gameserver.model.World;
- import net.sf.l2j.gameserver.model.actor.instance.Player;
- import net.sf.l2j.gameserver.model.item.instance.ItemInstance;
- +import net.sf.l2j.gameserver.network.FloodProtectors;
- +import net.sf.l2j.gameserver.network.FloodProtectors.Action;
- import net.sf.l2j.gameserver.network.SystemMessageId;
- import net.sf.l2j.gameserver.network.serverpackets.EnchantResult;
- import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
- import net.sf.l2j.gameserver.network.serverpackets.ItemList;
- import net.sf.l2j.gameserver.network.serverpackets.StatusUpdate;
- import net.sf.l2j.gameserver.network.serverpackets.SystemMessage;
- import net.sf.l2j.gameserver.util.Broadcast;
- public final class RequestEnchantItem extends L2GameClientPacket
- @@ -104,6 +105,11 @@
- {
- return;
- }
- if (!player.getClient().performAction(FloodProtector.USER_ITEM_ENCHANT))
- {
- player.sendMessage("Anti Enchant Interface Delay! You can't enchant that fast!");
- player.setActiveEnchantItem(null);
- player.sendPacket(EnchantResult.CANCELLED);
- return;
- }
- // attempting to destroy scroll
- if (activeChar.getActiveTradeList() != null)
- {
- activeChar.cancelActiveTrade();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement