Jump to content

[Guide] FloodProtection gia to Interlude.


Recommended Posts

Geia se olous, 8a ithela na kanw share to Flood Protection rework, pou einai aparaitito gia ola ta interludes :D. Prostateuei ton server apo bugs, spams, lags.


Einai reworked gia Interlude to Gracia Final to exei idi


1. ) Arxizoume kanontas delete to old FloodProtection sosta ? :D

2. ) As arxisoume, prota kanoume delete to Support apo to L2PcInstance gia to old floodprotection

Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
@@ -201,5 +201,4 @@
import net.sf.l2j.gameserver.templates.L2WeaponType;
import net.sf.l2j.gameserver.util.Broadcast;
-import net.sf.l2j.gameserver.util.FloodProtector;
import net.sf.l2j.util.Point3D;
import net.sf.l2j.util.Rnd;
@@ -10883,6 +10883,5 @@
			// Close the connection with the client
			closeNetConnection();
-			// remove from flood protector
-			FloodProtector.getInstance().removePlayer(getObjectId());
+			
			if (getClanId() > 0)
			{

 

3. ) Tora kanoume delete to arxeio pou legete Floodprotector.java kai vriskete sto gameserver/util .Tora tha svisete oti protection exete valei se opio file exete valei apo to palio Flood Protection.

 

4. ) Ora na valoume to kainourio Mas FloodProtection System

Edo to code: FloodProtection Rework

 

5. ) Ora na prostateusoume ta arxeia pou theloume

Ena paradeigma: ( sto proigoumeno diff vriskete to support, omws tha sas dei3w pos ginete add se periptosi p thelete na kanete kai alla protections:

 

Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 423)
@@ -17,4 +17,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -60,4 +62,11 @@
	{
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (!activeChar.getFloodProtectors().getServerBypass().tryPerformAction("_command"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (activeChar == null)

NOTE: "Actionfailed.STATIC_PACKET " can be changed to new ActionFaled()); without harming the code.
		{

 

Support: Prota anoigoume to arxeio FloodProtection.java Vazoume ta lines:

Stin arxi ( Mporeite na dite pou einai kai ta alla paromoia me auto to code )

+	/**
+	 * Server-bypass flood protector.
+	 */
+	private final FloodProtectorAction _serverBypass;

Edo meta gia na sindethei me ta Configs ( mporeite na deite pou akrivos tha to valete apo olokliro to code sto Proto diff.

+		_serverBypass = new FloodProtectorAction(player, Config.FLOOD_PROTECTOR_SERVER_BYPASS);

Auto sto telos.

+	/**
+	 * Returns {@link #_serverBypass}.
+	 * 
+	 * @return {@link #_serverBypass}
+	 */
+	public FloodProtectorAction getServerBypass()
+	{
+		return _serverBypass;
+	}

Auto itan ena paradeigma.

 

Prostateuste ta ipoloipa arxeia, deite to parakato to diff exei ta protections gia kapoia files. to Support tous sto FloodProtection / Config einai idi added sto proto diff

Ipoloipa protections: http://www.4shared.com/file/184891519/dbc74782/Protectingit.html

 

Next page :D

Link to comment
Share on other sites

Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBypassToServer.java (revision 423)
@@ -17,4 +17,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -60,4 +62,11 @@
	{
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (!activeChar.getFloodProtectors().getServerBypass().tryPerformAction("_command"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (activeChar == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestSellItem.java (revision 423)
@@ -84,4 +84,9 @@
	{
		L2PcInstance player = getClient().getActiveChar();
+		if (!player.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		if (player == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/MultiSellChoose.java (revision 423)
@@ -30,4 +30,5 @@
import net.sf.l2j.gameserver.model.item.PcInventory;
import net.sf.l2j.gameserver.network.SystemMessageId;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.ItemList;
import net.sf.l2j.gameserver.network.serverpackets.PledgeShowInfoUpdate;
@@ -90,4 +91,9 @@
	private void doExchange(L2PcInstance player, MultiSellEntry templateEntry, boolean applyTaxes, boolean maintainEnchantment, int enchantment)
	{
+		if (!player.getFloodProtectors().getMultisell().tryPerformAction("multisell"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		PcInventory inv = player.getInventory();
		boolean maintainItemFound = false;
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreBuy.java (revision 423)
@@ -72,4 +72,12 @@
	{
		L2PcInstance player = getClient().getActiveChar();
+		
+		if (!player.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
+		
		if (player == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/SendWareHouseWithDrawList.java (revision 423)
@@ -26,4 +26,5 @@
import net.sf.l2j.gameserver.model.item.ItemContainer;
import net.sf.l2j.gameserver.network.SystemMessageId;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.InventoryUpdate;
import net.sf.l2j.gameserver.network.serverpackets.ItemList;
@@ -84,4 +85,9 @@
		{
			player.sendMessage("Transactions are disable for your Access Level");
+			return;
+		}
+		if (!player.getFloodProtectors().getWerehouse().tryPerformAction("werehouse"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
			return;
		}
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestPrivateStoreSell.java (revision 423)
@@ -89,4 +89,11 @@
	{
		L2PcInstance player = getClient().getActiveChar();
+		
+		if (!player.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (player == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDestroyItem.java (revision 423)
@@ -18,4 +18,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -56,4 +58,11 @@
	{
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (!activeChar.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (activeChar == null)
			return;
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestDropItem.java (revision 423)
@@ -17,4 +17,6 @@
import java.util.logging.Logger;

+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
+
import net.sf.l2j.Config;
import net.sf.l2j.gameserver.GmListTable;
@@ -61,4 +63,11 @@
	{
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (!activeChar.getFloodProtectors().getDropItem().tryPerformAction("drop"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (activeChar == null || activeChar.isDead())
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/Say2.java (revision 423)
@@ -25,4 +25,5 @@
import net.sf.l2j.gameserver.handler.IChatHandler;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

/**
@@ -85,4 +86,13 @@
		// getting char instance
		L2PcInstance activeChar = getClient().getActiveChar();
+		
+		if (activeChar != null && activeChar instanceof L2PcInstance)
+		{
+			if (!activeChar.getFloodProtectors().getChat().tryPerformAction("chat"))
+			{
+				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
+		}
		if (_text.length() >= 100)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/AttackRequest.java (revision 423)
@@ -61,4 +61,10 @@
		else
			target = L2World.getInstance().findObject(_objectId);
+		// Update next commit
+		// if (!activeChar.getFloodProtectors().getActionMwx().tryPerformAction("_objectId"))
+		// {
+		//	activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+		//	return;
+		// }
		if (target == null)
			return;
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestBuyItem.java (revision 423)
@@ -83,4 +83,11 @@
	{
		L2PcInstance player = getClient().getActiveChar();
+		
+		if (!player.getFloodProtectors().getMisc().tryPerformAction("misc"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
+		
		if (player == null)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/RequestEnchantItem.java (revision 423)
@@ -16,4 +16,6 @@

import java.util.logging.Logger;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -410,4 +412,11 @@
					activeChar.sendPacket(sm);
				}
+				
+				if (!activeChar.getFloodProtectors().getWerehouse().tryPerformAction("werehouse"))
+				{
+					activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+					return;
+				}
+				
				item.setEnchantLevel(item.getEnchantLevel() + 1);
				item.updateDatabase();
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/network/clientpackets/UseItem.java (revision 423)
@@ -60,4 +60,9 @@
		if (activeChar == null)
			return;
+		if (!activeChar.getFloodProtectors().getUseItem().tryPerformAction("use item"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		if (activeChar.getPrivateStoreType() != 0)
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcBufferInstance.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcBufferInstance.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcBufferInstance.java (revision 423)
@@ -18,4 +18,6 @@
import java.util.concurrent.ScheduledFuture;

+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
+
import net.sf.l2j.gameserver.ThreadPoolManager;
import net.sf.l2j.gameserver.datatables.NpcBufferSkillIdsTable;
@@ -191,4 +193,9 @@
		if (command.startsWith("npc_buffer_heal"))
		{
+			if (!playerInstance.getFloodProtectors().getBuffer().tryPerformAction("npc_buffer_heal"))
+			{
+				playerInstance.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
			if (playerInstance.getCurrentHp() == 0 || playerInstance.getPvpFlag() > 0)
			{
@@ -204,4 +211,9 @@
		if (command.startsWith("npc_buffer_cancel"))
		{
+			if (!playerInstance.getFloodProtectors().getBuffer().tryPerformAction("npc_buffer_cancel"))
+			{
+				playerInstance.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
			if (playerInstance.getCurrentHp() == 0 || playerInstance.getPvpFlag() > 0)
			{
@@ -215,4 +227,9 @@
		if (command.startsWith("npc_buffer_buff"))
		{
+			if (!playerInstance.getFloodProtectors().getBuffer().tryPerformAction("npc_buffer_buff"))
+			{
+				playerInstance.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
			String[] params = command.split(" ");
			int skillId = Integer.parseInt(params[1]);
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2NpcInstance.java (revision 423)
@@ -2814,4 +2814,6 @@
		if (player == null)
			return;
+		if (!player.getFloodProtectors().getSubclass().tryPerformAction("buffer"))
+			return;
		// Blessing of protection - author kerberos_20. Used codes from Rayan - L2Emu project.
		int player_level = player.getLevel();
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/model/actor/instance/L2VillageMasterInstance.java (revision 423)
@@ -285,4 +285,12 @@
				case 4: // Add Subclass - Action (Subclass 4 x[x])
					boolean allowAddition = true;
+					
+					if (!player.getFloodProtectors().getSubclass().tryPerformAction("add subclass"))
+					{
+						player.sendMessage("Don't change sub classes so rapidly, please wait.");
+						player.sendPacket(ActionFailed.STATIC_PACKET);
+						return;
+					}
+					
					/*
					 * If the character is less than level 75 on any of their previously chosen classes then disallow them to change to their most recently added sub-class choice.
@@ -373,4 +381,10 @@
					 * If the character is less than level 75 on any of their previously chosen classes then disallow them to change to their most recently added sub-class choice. Note: paramOne = classIndex
					 */
+					if (!player.getFloodProtectors().getSubclass().tryPerformAction("change class"))
+					{
+						player.sendMessage("Don't change sub classes so rapidly, please wait.");
+						player.sendPacket(ActionFailed.STATIC_PACKET);
+						return;
+					}
					if (Olympiad.getInstance().isRegisteredInComp(player) || (player.getOlympiadGameId() > 0))
					{
@@ -407,4 +421,10 @@
					 * Warning: the information about this subclass will be removed from the subclass list even if false!
					 */
+					if (!player.getFloodProtectors().getSubclass().tryPerformAction("change class"))
+					{
+						player.sendMessage("Don't change sub classes so rapidly, please wait.");
+						player.sendPacket(ActionFailed.STATIC_PACKET);
+						return;
+					}
					if (Olympiad.getInstance().isRegisteredInComp(player) || (player.getOlympiadGameId() > 0))
					{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/SummonItems.java (revision 423)
@@ -58,4 +58,9 @@
		}
		L2PcInstance activeChar = (L2PcInstance) playable;
+		if (!activeChar.getFloodProtectors().getItemPetSummon().tryPerformAction("summon items"))
+		{
+			playable.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		if (activeChar.isSitting())
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/Firework.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/Firework.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/Firework.java (revision 423)
@@ -14,4 +14,6 @@
 */
package net.sf.l2j.gameserver.handler.itemhandlers;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.gameserver.datatables.SkillTable;
@@ -39,4 +41,49 @@
		L2PcInstance activeChar = (L2PcInstance) playable;
		int itemId = item.getItemId();
+		if (!activeChar.getFloodProtectors().getFirework().tryPerformAction("firework"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}

		/*
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/RollingDice.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/RollingDice.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/itemhandlers/RollingDice.java (revision 423)
@@ -69,4 +69,6 @@
	private int rollDice(L2PcInstance player)
	{
+		if (!player.getFloodProtectors().getRollDice().tryPerformAction("roll dice"))
+			return 0;
		// Check if the dice is ready
		return Rnd.get(1, 6);
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Banking.java
===================================================================
--- /trunk/v/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Banking.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/voicedcommandhandlers/Banking.java (revision 423)
@@ -14,4 +14,6 @@
 */
package net.sf.l2j.gameserver.handler.voicedcommandhandlers;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -34,4 +36,9 @@
	public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
	{
+		if (!activeChar.getFloodProtectors().getBankingSystem().tryPerformAction("BankingSystem"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return false;
+		}
		if (command.equalsIgnoreCase("bank"))
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatTrade.java (revision 423)
@@ -20,4 +20,5 @@
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;

@@ -38,4 +39,9 @@
	public void handleChat(int type, L2PcInstance activeChar, String target, String text)
	{
+		if (!activeChar.getFloodProtectors().getGlobal().tryPerformAction("global"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
		if (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_TRADE_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java
===================================================================
--- /trunk/v/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatShout.java (revision 423)
@@ -14,4 +14,6 @@
 */
package net.sf.l2j.gameserver.handler.chathandlers;
+
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;

import net.sf.l2j.Config;
@@ -38,4 +40,9 @@
	public void handleChat(int type, L2PcInstance activeChar, String target, String text)
	{
+		if (!activeChar.getFloodProtectors().getGlobal().tryPerformAction("global"))
+		{
+			activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
		if (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") || (Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.isGM()))
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java (revision 421)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/handler/chathandlers/ChatHeroVoice.java (revision 423)
@@ -19,4 +19,5 @@
import net.sf.l2j.gameserver.model.L2World;
import net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;
+import net.sf.l2j.gameserver.network.serverpackets.ActionFailed;
import net.sf.l2j.gameserver.network.serverpackets.CreatureSay;

@@ -37,6 +38,11 @@
	public void handleChat(int type, L2PcInstance activeChar, String target, String text)
	{
-		if (activeChar.isHero())
+		if (activeChar.isHero() || activeChar.isGM ())
		{
+			if (!activeChar.getFloodProtectors().getHeroVoice().tryPerformAction("hero voice") && !activeChar.isGM())
+			{
+				activeChar.sendPacket(ActionFailed.STATIC_PACKET);
+				return;
+			}
			CreatureSay cs = new CreatureSay(activeChar.getObjectId(), type, activeChar.getName(), text);
			for (L2PcInstance player : L2World.getInstance().getAllPlayers())
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/RecipeController.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/RecipeController.java (revision 413)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/RecipeController.java (revision 423)
@@ -193,4 +193,9 @@
	public synchronized void requestMakeItem(L2PcInstance player, int recipeListId)
	{
+		if (!player.getFloodProtectors().getCraft().tryPerformAction("craft"))
+		{
+			player.sendPacket(ActionFailed.STATIC_PACKET);
+			return;
+		}
		if (player.isInDuel())
		{
Index: /trunk/Eclipse/java/net/sf/l2j/gameserver/util/FloodProtectors.java
===================================================================
--- /trunk/Eclipse/java/net/sf/l2j/gameserver/util/FloodProtectors.java (revision 422)
+++ /trunk/Eclipse/java/net/sf/l2j/gameserver/util/FloodProtectors.java (revision 423)
@@ -15,4 +15,6 @@
package  net.sf.l2j.gameserver.util;

+import net.sf.l2j.gameserver.util.FloodProtectorAction;
+
import  net.sf.l2j.Config;
import  net.sf.l2j.gameserver.model.actor.instance.L2PcInstance;

Credits: L2J kai se emena gia to rework sto Interlude.

Link to comment
Share on other sites

NC...Man thelw na se rotisw kati , ama kses...kita ,egw exw interlude server kai thelw na perasw kati weapons....exw kai to (edit file) briskw to arxio [itemname-e.dat] & to [weapongrp.dat]  mesa sto fakelo system kai den borw na to aniksw gia na perasw ta items pou thelw...mipos kses pos to kanw?

Link to comment
Share on other sites

NC...Man thelw na se rotisw kati , ama kses...kita ,egw exw interlude server kai thelw na perasw kati weapons....exw kai to (edit file) briskw to arxio [itemname-e.dat] & to [weapongrp.dat]  mesa sto fakelo system kai den borw na to aniksw gia na perasw ta items pou thelw...mipos kses pos to kanw?

Auto dn kolaei pouthena, psa3e sto MXC iparxoun Guides.

Link to comment
Share on other sites

Einai olo-diko mou ! To ekana monos rework apo Gracia final gia Interlude.

 

lol to patch tou intrepid phres kai 2 sync apo to forum ths l2j.

akoma kai to paneykolo rework (pou to ousiastiko rework einai na vgaleis to floodprotector) den htan diko sou.

Link to comment
Share on other sites

lol to patch tou intrepid phres kai 2 sync apo to forum ths l2j.

akoma kai to paneykolo rework (pou to ousiastiko rework einai na vgaleis to floodprotector) den htan diko sou.

Min arxisoume pali, e3igisa ston Intrepid oti dn einai diko tou.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...