Jump to content
  • 0

{Help} H5 Masterhandler


Question

Posted

I have being trying to add into H5 masterhandler some imports but with no success ,if someone could hepl I will be most gratefull

Index: dist/game/data/scripts/handlers/MasterHandler.java
===================================================================
--- dist/game/data/scripts/handlers/MasterHandler.java	(revision 8445)
+++ dist/game/data/scripts/handlers/MasterHandler.java	(working copy)
@@ -100,6 +100,16 @@
import handlers.admincommandhandlers.AdminUnblockIp;
import handlers.admincommandhandlers.AdminVitality;
import handlers.admincommandhandlers.AdminZone;
+import handlers.aioitemhandler.AIOBufferHandler;
+import handlers.aioitemhandler.AIOChatHandler;
+import handlers.aioitemhandler.AIOSchemeHandler;
+import handlers.aioitemhandler.AIOServiceHandler;
+import handlers.aioitemhandler.AIOShopHandler;
+import handlers.aioitemhandler.AIOSiegeHandler;
+import handlers.aioitemhandler.AIOSubclassHandler;
+import handlers.aioitemhandler.AIOTeleportHandler;
+import handlers.aioitemhandler.AIOTopList;
+import handlers.aioitemhandler.AIOWarehouseHandler;
import handlers.bypasshandlers.Augment;
import handlers.bypasshandlers.BloodAlliance;
import handlers.bypasshandlers.Buy;
@@ -151,6 +161,7 @@
import handlers.chathandlers.ChatShout;
import handlers.chathandlers.ChatTell;
import handlers.chathandlers.ChatTrade;
+import handlers.itemhandlers.AIOItem;
import handlers.itemhandlers.BeastSoulShot;
import handlers.itemhandlers.BeastSpice;
import handlers.itemhandlers.BeastSpiritShot;
@@ -256,6 +267,8 @@
import java.util.logging.Logger;

import com.l2jserver.Config;
+import com.l2jserver.CustomConfig;
+import com.l2jserver.gameserver.handler.AIOItemHandler;
import com.l2jserver.gameserver.handler.ActionHandler;
import com.l2jserver.gameserver.handler.AdminCommandHandler;
import com.l2jserver.gameserver.handler.BypassHandler;
@@ -477,6 +490,9 @@
		ITEM.registerItemHandler(new ManaPotion());
		ITEM.registerItemHandler(new EnergyStarStone());
		ITEM.registerItemHandler(new EventItem());
+		if(CustomConfig.AIOITEM_ENABLEME)
+			ITEM.registerItemHandler(new AIOItem());
+		
		_log.config("Loaded " + ITEM.size() + " ItemHandlers");
	}

@@ -570,7 +586,32 @@
			VOICE.registerVoicedCommandHandler(new ChangePassword());
		_log.config("Loaded " + VOICE.size() + " VoicedHandlers");
	}
+
+	private static void loadAIOItemHandlers()
+	{
+		AIOItemHandler.getInstance().registerAIOItemHandler(new AIOChatHandler());
+		if(CustomConfig.AIOITEM_ENABLESHOP)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOShopHandler());
+		if(CustomConfig.AIOITEM_ENABLEGK)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOTeleportHandler());
+		if(CustomConfig.AIOITEM_ENABLEWH)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOWarehouseHandler());
+		if(CustomConfig.AIOITEM_ENABLEBUFF)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOBufferHandler());
+		if(CustomConfig.AIOITEM_ENABLESERVICES)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOServiceHandler());
+		if(CustomConfig.AIOITEM_ENABLESCHEMEBUFF)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOSchemeHandler());
+		if(CustomConfig.AIOITEM_ENABLETOPLIST)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOTopList());
+		if(CustomConfig.AIOITEM_ENABLESIEGEREG)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOSiegeHandler());
+		if(CustomConfig.AIOITEM_ENABLESUBCLASS)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOSubclassHandler());
+		_log.config("Loaded " + AIOItemHandler.getInstance().size() +" AIOItem bypass handlers");
+	}

+	
	/**
	 * @param args
	 */

@@ -586,6 +627,7 @@
		loadSkillHandlers();
		loadUserHandlers();
		loadVoicedHandlers();
+		loadAIOItemHandlers();
		_log.config("Handlers Loaded...");
	}
}
\ No newline at end of file

2 answers to this question

Recommended Posts

  • 0
Posted

the imports are ok its this parts i have problem

@@ -464,6 +469,8 @@
		ItemHandler.getInstance().registerItemHandler(new ManaPotion());
		ItemHandler.getInstance().registerItemHandler(new EnergyStarStone());
		ItemHandler.getInstance().registerItemHandler(new EventItem());
+		if(CustomConfig.AIOITEM_ENABLEME)
+			ItemHandler.getInstance().registerItemHandler(new AIOItem());
		_log.config("Loaded " + ItemHandler.getInstance().size() + " ItemHandlers");
	}

@@ -555,6 +562,28 @@
		_log.config("Loaded " + VoicedCommandHandler.getInstance().size() + " VoicedHandlers");
	}

+	private static void loadAIOItemHandlers()
+	{
+		AIOItemHandler.getInstance().registerAIOItemHandler(new AIOChatHandler());
+		if(CustomConfig.AIOITEM_ENABLESHOP)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOShopHandler());
+		if(CustomConfig.AIOITEM_ENABLEGK)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOTeleportHandler());
+		if(CustomConfig.AIOITEM_ENABLEWH)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOWarehouseHandler());
+		if(CustomConfig.AIOITEM_ENABLEBUFF)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOBufferHandler());
+		if(CustomConfig.AIOITEM_ENABLESERVICES)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOServiceHandler());
+		if(CustomConfig.AIOITEM_ENABLESCHEMEBUFF)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOSchemeHandler());
+		if(CustomConfig.AIOITEM_ENABLESUBCLASS)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOSubClassHandler());
+		if(CustomConfig.AIOITEM_ENABLETOPLIST)
+			AIOItemHandler.getInstance().registerAIOItemHandler(new AIOTopList());
+		_log.config("Loaded " + AIOItemHandler.getInstance().size() +" AIOItem bypass handlers");
+	}
+	
	/**
	 * @param args
	 */
@@ -570,6 +599,8 @@
		loadSkillHandlers();
		loadUserHandlers();
		loadVoicedHandlers();
+		if(CustomConfig.AIOITEM_ENABLEME)
+			loadAIOItemHandlers();
		_log.config("Handlers Loaded...");

 

i tried several ways of registering them but the hanlers  are not loaded

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
Answer this question...

×   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...