Browse Source

Unhardcoding warehouse (both clan and private) bypasses and learn skill list bypass.
REQUIRE DP UPDATE, both script and html !

_DS_ 15 năm trước cách đây
mục cha
commit
a1c6cf257f

+ 1 - 175
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2CastleWarehouseInstance.java

@@ -14,23 +14,14 @@
  */
 package com.l2jserver.gameserver.model.actor.instance;
 
-import com.l2jserver.Config;
-import com.l2jserver.gameserver.cache.HtmCache;
-import com.l2jserver.gameserver.model.L2Clan;
-import com.l2jserver.gameserver.network.SystemMessageId;
 import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
 import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
-import com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList;
-import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
-import com.l2jserver.gameserver.network.serverpackets.WareHouseDepositList;
-import com.l2jserver.gameserver.network.serverpackets.WareHouseWithdrawalList;
-import com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList.WarehouseListType;
 import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
 
 /**
  * @author l3x
  */
-public class L2CastleWarehouseInstance extends L2NpcInstance
+public class L2CastleWarehouseInstance extends L2WarehouseInstance
 {
 	protected static final int COND_ALL_FALSE = 0;
 	protected static final int COND_BUSY_BECAUSE_OF_SIEGE = 1;
@@ -51,171 +42,6 @@ public class L2CastleWarehouseInstance extends L2NpcInstance
 		return true;
 	}
 
-	private void showRetrieveWindow(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
-	{
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-		player.setActiveWarehouse(player.getWarehouse());
-
-		if (player.getActiveWarehouse().getSize() == 0)
-		{
-			player.sendPacket(new SystemMessage(SystemMessageId.NO_ITEM_DEPOSITED_IN_WH));
-			return;
-		}
-
-		if (itemtype != null)
-			player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.PRIVATE, itemtype, sortorder));
-		else
-			player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.PRIVATE));
-	}
-
-	private void showDepositWindow(L2PcInstance player)
-	{
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-		player.setActiveWarehouse(player.getWarehouse());
-		player.tempInventoryDisable();
-		player.sendPacket(new WareHouseDepositList(player, WareHouseDepositList.PRIVATE));
-	}
-
-	private void showDepositWindowClan(L2PcInstance player)
-	{
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-
-		if (player.getClan() != null)
-		{
-			if (player.getClan().getLevel() == 0)
-				player.sendPacket(new SystemMessage(SystemMessageId.ONLY_LEVEL_1_CLAN_OR_HIGHER_CAN_USE_WAREHOUSE));
-			else
-			{
-				if ((player.getClanPrivileges() & L2Clan.CP_CL_VIEW_WAREHOUSE) != L2Clan.CP_CL_VIEW_WAREHOUSE)
-					player.sendPacket(new SystemMessage(SystemMessageId.ONLY_CLAN_LEADER_CAN_RETRIEVE_ITEMS_FROM_CLAN_WAREHOUSE));
-
-				player.setActiveWarehouse(player.getClan().getWarehouse());
-				player.tempInventoryDisable();
-				WareHouseDepositList dl = new WareHouseDepositList(player, WareHouseDepositList.CLAN);
-				player.sendPacket(dl);
-			}
-		}
-	}
-
-	private void showWithdrawWindowClan(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
-	{
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-
-		if ((player.getClanPrivileges() & L2Clan.CP_CL_VIEW_WAREHOUSE) != L2Clan.CP_CL_VIEW_WAREHOUSE)
-		{
-			player.sendPacket(new SystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_THE_RIGHT_TO_USE_CLAN_WAREHOUSE));
-			return;
-		}
-		else
-		{
-			if (player.getClan().getLevel() == 0)
-				player.sendPacket(new SystemMessage(SystemMessageId.ONLY_LEVEL_1_CLAN_OR_HIGHER_CAN_USE_WAREHOUSE));
-			else
-			{
-				player.setActiveWarehouse(player.getClan().getWarehouse());
-
-				if (itemtype != null)
-					player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN, itemtype, sortorder));
-				else
-					player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN));
-			}
-		}
-	}
-
-	@Override
-	public void onBypassFeedback(L2PcInstance player, String command)
-	{
-		if (player.getActiveEnchantItem() != null)
-		{
-			// Retail (April 17, 2009 - Gracia CT2) - If a player has an enchant window open and attempts to access a warehouse, the enchant window stays up and the warehouse does not open.
-			return;
-		}
-
-		String param[] = command.split("_");
-
-		if (command.startsWith("WithdrawP"))
-		{
-			if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE)
-			{
-				String htmFile = "data/html/mods/WhSortedP.htm";
-				String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmFile);
-
-				if (htmContent != null)
-				{
-					NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
-					npcHtmlMessage.setHtml(htmContent);
-					npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
-					player.sendPacket(npcHtmlMessage);
-				}
-				else
-				{
-					_log.warning("Missing htm: " + htmFile + "!");
-					player.sendMessage("This NPC's html is missing. Please inform the server admin.");
-				}
-			}
-			else
-				showRetrieveWindow(player, null, (byte) 0);
-		}
-		else if (command.startsWith("WithdrawSortedP"))
-		{
-			if (param.length > 2)
-				showRetrieveWindow(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.getOrder(param[2]));
-			else if (param.length > 1)
-				showRetrieveWindow(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.A2Z);
-			else
-				showRetrieveWindow(player, WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
-		}
-		else if (command.equals("DepositP"))
-			showDepositWindow(player);
-		else if (command.equals("WithdrawC"))
-		{
-			if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_CLAN)
-			{
-				String htmFile = "data/html/mods/WhSortedC.htm";
-				String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmFile);
-
-				if (htmContent != null)
-				{
-					NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
-					npcHtmlMessage.setHtml(htmContent);
-					npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
-					player.sendPacket(npcHtmlMessage);
-				}
-				else
-				{
-					_log.warning("Missing htm: " + htmFile + "!");
-					player.sendMessage("This NPC's html is missing. Please inform the server admin.");
-				}
-			}
-			else
-				showWithdrawWindowClan(player, null, (byte) 0);
-		}
-		else if (command.startsWith("WithdrawSortedC"))
-		{
-			if (param.length > 2)
-				showWithdrawWindowClan(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.getOrder(param[2]));
-			else if (param.length > 1)
-				showWithdrawWindowClan(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.A2Z);
-			else
-				showWithdrawWindowClan(player, WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
-		}
-		else if (command.equals("DepositC"))
-			showDepositWindowClan(player);
-		else if (command.startsWith("Chat"))
-		{
-			int val = 0;
-			try
-			{
-				val = Integer.parseInt(command.substring(5));
-			}
-			catch (IndexOutOfBoundsException ioobe){}
-			catch (NumberFormatException nfe){}
-			showChatWindow(player, val);
-		}
-		else
-			super.onBypassFeedback(player, command);
-	}
-
 	@Override
 	public void showChatWindow(L2PcInstance player, int val)
 	{

+ 4 - 72
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2ClanHallManagerInstance.java

@@ -18,7 +18,6 @@ import java.text.SimpleDateFormat;
 import java.util.StringTokenizer;
 
 import com.l2jserver.Config;
-import com.l2jserver.gameserver.cache.HtmCache;
 import com.l2jserver.gameserver.datatables.SkillTable;
 import com.l2jserver.gameserver.datatables.TeleportLocationTable;
 import com.l2jserver.gameserver.instancemanager.ClanHallManager;
@@ -29,10 +28,6 @@ import com.l2jserver.gameserver.model.entity.ClanHall;
 import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
 import com.l2jserver.gameserver.network.serverpackets.AgitDecoInfo;
 import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
-import com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList;
-import com.l2jserver.gameserver.network.serverpackets.WareHouseDepositList;
-import com.l2jserver.gameserver.network.serverpackets.WareHouseWithdrawalList;
-import com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList.WarehouseListType;
 import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
 import com.l2jserver.gameserver.templates.skills.L2SkillType;
 
@@ -101,36 +96,10 @@ public class L2ClanHallManagerInstance extends L2MerchantInstance
             	NpcHtmlMessage html = new NpcHtmlMessage(1);
                 if ((player.getClanPrivileges() & L2Clan.CP_CL_VIEW_WAREHOUSE) == L2Clan.CP_CL_VIEW_WAREHOUSE)
                 {
-                    if (val.equalsIgnoreCase("deposit"))
-                        showVaultWindowDeposit(player);
-                    else if (val.equalsIgnoreCase("withdraw"))
-                    {
-                    	if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_CLAN)
-                    	{
-                    		String htmFile = "data/html/mods/WhSortedC.htm";
-	                		String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmFile);
-	                		if (htmContent != null)
-	                		{
-	                			NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
-	                			npcHtmlMessage.setHtml(htmContent);
-	                			npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
-	                			player.sendPacket(npcHtmlMessage);
-	                		}
-	                		else
-	                		{
-	                			_log.warning("Missing htm: " + htmFile + " !");
-	                		}
-                    	}
-                    	else
-                    		showVaultWindowWithdraw(player, null, (byte) 0);
-                    }
-                    else
-                    {
-                        html.setFile(player.getHtmlPrefix(), "data/html/clanHallManager/vault.htm");
-                        html.replace("%rent%", String.valueOf(getClanHall().getLease()));
-                        html.replace("%date%", format.format(getClanHall().getPaidUntil()));
-                        sendHtmlMessage(player, html);
-                    }
+                    html.setFile(player.getHtmlPrefix(), "data/html/clanHallManager/vault.htm");
+                    html.replace("%rent%", String.valueOf(getClanHall().getLease()));
+                    html.replace("%date%", format.format(getClanHall().getPaidUntil()));
+                    sendHtmlMessage(player, html);
                 }
                 else
                 {
@@ -139,17 +108,6 @@ public class L2ClanHallManagerInstance extends L2MerchantInstance
                 }
                 return;
             }
-            else if (actualCommand.startsWith("WithdrawSortedC"))
-            {
-            	String param[] = command.split("_");
-            	if (param.length > 2)
-            		showVaultWindowWithdraw(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.getOrder(param[2]));
-            	else if (param.length > 1)
-            		showVaultWindowWithdraw(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.A2Z);
-            	else
-            		showVaultWindowWithdraw(player, WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
-            	return;
-            }
             else if (actualCommand.equalsIgnoreCase("door"))
             {
             	NpcHtmlMessage html = new NpcHtmlMessage(1);
@@ -1424,32 +1382,6 @@ public class L2ClanHallManagerInstance extends L2MerchantInstance
         return ClanHallManager.getInstance().getClanHallById(_clanHallId);
     }
 
-    private void showVaultWindowDeposit(L2PcInstance player)
-    {
-        player.sendPacket(ActionFailed.STATIC_PACKET);
-        player.setActiveWarehouse(player.getClan().getWarehouse());
-        player.sendPacket(new WareHouseDepositList(player, WareHouseDepositList.CLAN)); //Or Clan Hall??
-    }
-
-    private void showVaultWindowWithdraw(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
-    {
-    	if (player.isClanLeader() || ((player.getClanPrivileges() & L2Clan.CP_CL_VIEW_WAREHOUSE) == L2Clan.CP_CL_VIEW_WAREHOUSE))
-    	{
-    		player.sendPacket(ActionFailed.STATIC_PACKET);
-    		player.setActiveWarehouse(player.getClan().getWarehouse());
-    		if (itemtype != null)
-				player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN, itemtype, sortorder));
-			else
-				player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN));
-    	}
-    	else
-    	{
-    		NpcHtmlMessage html = new NpcHtmlMessage(1);
-            html.setFile(player.getHtmlPrefix(), "data/html/clanHallManager/not_authorized.htm");
-            sendHtmlMessage(player, html);
-    	}
-	}
-
     private void doTeleport(L2PcInstance player, int val)
     {
        if(Config.DEBUG)

+ 17 - 94
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2NpcInstance.java

@@ -66,16 +66,21 @@ public class L2NpcInstance extends L2Npc
 			newEffect.stopEffectTask();
 	}
 
+	public ClassId[] getClassesToTeach()
+	{
+		return _classesToTeach;
+	}
+
 	/**
 	 * this displays SkillList to the player.
 	 * @param player
 	 */
-	public void showSkillList(L2PcInstance player, ClassId classId)
+	public static void showSkillList(L2PcInstance player, L2Npc npc, ClassId classId)
 	{
 		if (Config.DEBUG)
-			_log.fine("SkillList activated on: "+getObjectId());
+			_log.fine("SkillList activated on: "+npc.getObjectId());
 
-		int npcId = getTemplate().npcId;
+		int npcId = npc.getTemplate().npcId;
 
 		if (npcId == 32611)
 		{
@@ -103,9 +108,16 @@ public class L2NpcInstance extends L2Npc
 			player.sendPacket(ActionFailed.STATIC_PACKET);
 			return;
 		}
-		if (_classesToTeach == null)
+
+		if (!npc.getTemplate().canTeach(classId))
+		{
+			npc.showNoTeachHtml(player);
+			return;
+		}
+
+		if (((L2NpcInstance)npc).getClassesToTeach() == null)
 		{
-			NpcHtmlMessage html = new NpcHtmlMessage(getObjectId());
+			NpcHtmlMessage html = new NpcHtmlMessage(npc.getObjectId());
 			final String sb = StringUtil.concat(
 					"<html><body>" +
 					"I cannot teach you. My class list is empty.<br> Ask admin to fix it. Need add my npcid and classes to skill_learn.sql.<br>NpcId:",
@@ -120,12 +132,6 @@ public class L2NpcInstance extends L2Npc
 			return;
 		}
 
-		if (!getTemplate().canTeach(classId))
-		{
-			showNoTeachHtml(player);
-			return;
-		}
-
 		L2SkillLearn[] skills = SkillTreeTable.getInstance().getAvailableSkills(player, classId);
 		AcquireSkillList asl = new AcquireSkillList(AcquireSkillList.SkillType.Usual);
 		int counts = 0;
@@ -159,87 +165,4 @@ public class L2NpcInstance extends L2Npc
 
 		player.sendPacket(ActionFailed.STATIC_PACKET);
 	}
-
-	@Override
-	public void onBypassFeedback(L2PcInstance player, String command)
-	{       		
-		if (command.startsWith("SkillList"))
-		{
-			if (Config.ALT_GAME_SKILL_LEARN)
-			{
-				String id = command.substring(9).trim();
-				if (id.length() != 0)
-				{
-					player.setSkillLearningClassId(ClassId.values()[Integer.parseInt(id)]);
-					showSkillList(player, ClassId.values()[Integer.parseInt(id)]);
-				}
-				else
-				{
-					boolean own_class = false;
-
-					if (_classesToTeach != null)
-					{
-						for (ClassId cid : _classesToTeach)
-						{
-							if (cid.equalsOrChildOf(player.getClassId()))
-							{
-								own_class = true;
-								break;
-							}
-						}
-					}
-
-					String text = "<html><body><center>Skill learning:</center><br>";
-
-					if (!own_class)
-					{
-						String charType = player.getClassId().isMage() ? "fighter" : "mage";
-						text +=
-							"Skills of your class are the easiest to learn.<br>"+
-							"Skills of another class of your race are a little harder.<br>"+
-							"Skills for classes of another race are extremely difficult.<br>"+
-							"But the hardest of all to learn are the  "+ charType +"skills!<br>";
-					}
-
-					// make a list of classes
-					if (_classesToTeach != null)
-					{
-						int count = 0;
-						ClassId classCheck = player.getClassId();
-
-						while ((count == 0) && (classCheck != null))
-						{
-							for (ClassId cid : _classesToTeach)
-							{
-								if (cid.level() > classCheck.level()) 
-									continue;
-
-								if (SkillTreeTable.getInstance().getAvailableSkills(player, cid).length == 0)
-									continue;
-
-								text += "<a action=\"bypass -h npc_%objectId%_SkillList "+cid.getId()+"\">Learn "+cid+"'s class Skills</a><br>\n";
-								count++;
-							}
-							classCheck = classCheck.getParent();
-						}
-						classCheck = null;
-					}
-					else
-						text += "No Skills.<br>";
-
-					text += "</body></html>";
-
-					insertObjectIdAndShowChatWindow(player, text);
-					player.sendPacket(ActionFailed.STATIC_PACKET);
-				}
-			}
-			else
-			{
-				player.setSkillLearningClassId(player.getClassId());
-				showSkillList(player, player.getClassId());
-			}
-		}
-		else
-			super.onBypassFeedback(player, command);
-	}
 }

+ 1 - 180
L2_GameServer/java/com/l2jserver/gameserver/model/actor/instance/L2WarehouseInstance.java

@@ -14,21 +14,10 @@
  */
 package com.l2jserver.gameserver.model.actor.instance;
 
-import com.l2jserver.Config;
-import com.l2jserver.gameserver.cache.HtmCache;
-import com.l2jserver.gameserver.model.L2Clan;
-import com.l2jserver.gameserver.network.SystemMessageId;
-import com.l2jserver.gameserver.network.serverpackets.ActionFailed;
-import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
-import com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList;
-import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
-import com.l2jserver.gameserver.network.serverpackets.WareHouseDepositList;
-import com.l2jserver.gameserver.network.serverpackets.WareHouseWithdrawalList;
-import com.l2jserver.gameserver.network.serverpackets.SortedWareHouseWithdrawalList.WarehouseListType;
 import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
 
 
-public final class L2WarehouseInstance extends L2NpcInstance
+public class L2WarehouseInstance extends L2NpcInstance
 {
 	/**
 	 * @param template
@@ -57,172 +46,4 @@ public final class L2WarehouseInstance extends L2NpcInstance
 
 		return "data/html/warehouse/" + pom + ".htm";
 	}
-
-	private void showRetrieveWindow(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
-	{
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-		player.setActiveWarehouse(player.getWarehouse());
-
-		if (player.getActiveWarehouse().getSize() == 0)
-		{
-			player.sendPacket(new SystemMessage(SystemMessageId.NO_ITEM_DEPOSITED_IN_WH));
-			return;
-		}
-
-		if (itemtype != null)
-			player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.PRIVATE, itemtype, sortorder));
-		else
-			player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.PRIVATE));
-
-		if (Config.DEBUG)
-			_log.fine("Source: L2WarehouseInstance.java; Player: "+player.getName()+"; Command: showRetrieveWindow; Message: Showing stored items.");
-	}
-
-	private void showDepositWindow(L2PcInstance player)
-	{
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-		player.setActiveWarehouse(player.getWarehouse());
-		player.tempInventoryDisable();
-
-		if (Config.DEBUG) _log.fine("Source: L2WarehouseInstance.java; Player: "+player.getName()+"; Command: showDepositWindow; Message: Showing items to deposit.");
-			player.sendPacket(new WareHouseDepositList(player, WareHouseDepositList.PRIVATE));
-	}
-
-	private void showDepositWindowClan(L2PcInstance player)
-	{
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-
-		if (player.getClan() != null)
-		{
-			if (player.getClan().getLevel() == 0)
-				player.sendPacket(new SystemMessage(SystemMessageId.ONLY_LEVEL_1_CLAN_OR_HIGHER_CAN_USE_WAREHOUSE));
-			else
-			{
-				player.setActiveWarehouse(player.getClan().getWarehouse());
-				player.tempInventoryDisable();
-				WareHouseDepositList dl = new WareHouseDepositList(player, WareHouseDepositList.CLAN);
-				player.sendPacket(dl);
-
-				if (Config.DEBUG)
-					_log.fine("Source: L2WarehouseInstance.java; Player: "+player.getName()+"; Command: showDepositWindowClan; Message: Showing items to deposit.");
-			}
-		}
-	}
-
-	private void showWithdrawWindowClan(L2PcInstance player, WarehouseListType itemtype, byte sortorder)
-	{
-		player.sendPacket(ActionFailed.STATIC_PACKET);
-
-		if (Config.DEBUG)
-			_log.fine("Source: L2WarehouseInstance.java; Player: "+player.getName()+"; Command: showWithdrawWindowClan; Message: Showing stored items.");
-
-		if ((player.getClanPrivileges() & L2Clan.CP_CL_VIEW_WAREHOUSE) != L2Clan.CP_CL_VIEW_WAREHOUSE)
-		{
-			player.sendPacket(new SystemMessage(SystemMessageId.YOU_DO_NOT_HAVE_THE_RIGHT_TO_USE_CLAN_WAREHOUSE));
-			return;
-		}
-		else
-		{
-			if (player.getClan().getLevel() == 0)
-				player.sendPacket(new SystemMessage(SystemMessageId.ONLY_LEVEL_1_CLAN_OR_HIGHER_CAN_USE_WAREHOUSE));
-			else
-			{
-				player.setActiveWarehouse(player.getClan().getWarehouse());
-
-				if (itemtype != null)
-					player.sendPacket(new SortedWareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN, itemtype, sortorder));
-				else
-					player.sendPacket(new WareHouseWithdrawalList(player, WareHouseWithdrawalList.CLAN));
-			}
-		}
-	}
-
-	@Override
-	public void onBypassFeedback(L2PcInstance player, String command)
-	{
-		if (player.getActiveEnchantItem() != null)
-		{
-			// Retail (April 17, 2009 - Gracia CT2) - If a player has an enchant window open and attempts to access a warehouse, the enchant window stays up and the warehouse does not open.
-			return;
-		}
-
-		String param[] = command.split("_");
-
-		if (command.startsWith("WithdrawP"))
-		{
-			if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_PRIVATE)
-			{
-				String htmFile = "data/html/mods/WhSortedP.htm";
-				String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmFile);
-
-				if (htmContent != null)
-				{
-					NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
-					npcHtmlMessage.setHtml(htmContent);
-					npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
-					player.sendPacket(npcHtmlMessage);
-				}
-				else
-				{
-					_log.warning("Missing htm: " + htmFile + "!");
-					player.sendMessage("This NPC's html is missing. Please inform the server admin.");
-				}
-			}
-			else
-				showRetrieveWindow(player, null, (byte) 0);
-		}
-		else if (command.startsWith("WithdrawSortedP"))
-		{
-			if (param.length > 2)
-				showRetrieveWindow(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.getOrder(param[2]));
-			else if (param.length > 1)
-				showRetrieveWindow(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.A2Z);
-			else
-				showRetrieveWindow(player, WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
-		}
-		else if (command.equals("DepositP"))
-		{
-			showDepositWindow(player);
-		}
-		else if (command.startsWith("WithdrawC"))
-		{
-			if (Config.L2JMOD_ENABLE_WAREHOUSESORTING_CLAN)
-			{
-				String htmFile = "data/html/mods/WhSortedC.htm";
-				String htmContent = HtmCache.getInstance().getHtm(player.getHtmlPrefix(), htmFile);
-
-				if (htmContent != null)
-				{
-					NpcHtmlMessage npcHtmlMessage = new NpcHtmlMessage(getObjectId());
-					npcHtmlMessage.setHtml(htmContent);
-					npcHtmlMessage.replace("%objectId%", String.valueOf(getObjectId()));
-					player.sendPacket(npcHtmlMessage);
-				}
-				else
-				{
-					_log.warning("Missing htm: " + htmFile + "!");
-					player.sendMessage("This NPC's html is missing. Please inform the server admin.");
-				}
-			}
-			else
-				showWithdrawWindowClan(player, null, (byte) 0);
-		}
-		else if (command.startsWith("WithdrawSortedC"))
-		{
-			if (param.length > 2)
-				showWithdrawWindowClan(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.getOrder(param[2]));
-			else if (param.length > 1)
-				showWithdrawWindowClan(player, WarehouseListType.valueOf(param[1]), SortedWareHouseWithdrawalList.A2Z);
-			else
-				showWithdrawWindowClan(player, WarehouseListType.ALL, SortedWareHouseWithdrawalList.A2Z);
-		}
-		else if (command.equals("DepositC"))
-		{
-			showDepositWindowClan(player);
-		}
-		else
-		{
-			super.onBypassFeedback(player, command);
-		}
-	}
 }

+ 1 - 1
L2_GameServer/java/com/l2jserver/gameserver/network/clientpackets/RequestAquireSkill.java

@@ -463,7 +463,7 @@ public class RequestAquireSkill extends L2GameClientPacket
 		else if (trainer instanceof L2TransformManagerInstance)
 			L2TransformManagerInstance.showTransformSkillList(player);
 		else
-			((L2NpcInstance)trainer).showSkillList(player, player.getSkillLearningClassId());
+			L2NpcInstance.showSkillList(player, trainer, player.getSkillLearningClassId());
 
 		if (_id >= 1368 && _id <= 1372) // if skill is expand sendpacket :)
 		{