diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/html/default/30898-5.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/html/default/30898-5.htm index d4173ce522..d942aeaf3a 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/html/default/30898-5.htm +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/html/default/30898-5.htm @@ -5,5 +5,5 @@ If you have some Life Stones left, you can still - + \ No newline at end of file diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/html/villagemaster/30862.htm b/L2J_Mobius_1.0_Ertheia/dist/game/data/html/villagemaster/30862.htm index 4fe481432b..9fa3efb25f 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/html/villagemaster/30862.htm +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/html/villagemaster/30862.htm @@ -1,7 +1,7 @@ Grand Master Oltran:
You are far from your village, adventurer. How do you feel, now that you see the great castle and the ever-changing streets that are the pride of the Humans? I'm sure you admire them, but do not be enticed by their allure. Beneath the most beautiful bed of flowers, there is often a serpent's lair. If you spend much time in this city, you may come to see what I mean...
- + diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..f90a237ee6 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,48 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/attribute_info.htm", + "common/augmentation_01.htm", + "common/augmentation_02.htm", + "common/crafting_01.htm", + "common/crafting_02.htm", + "common/crafting_03.htm", + "common/cursed_to_unidentified.htm", + "common/duals_01.htm", + "common/duals_02.htm", + "common/duals_03.htm", + "common/g_cube_warehouse001.htm", + "common/skill_enchant_help.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "common/weapon_sa_01.htm", + "common/welcomeback002.htm", + "common/welcomeback003.htm", + "default/BlessingOfProtection.htm", + "default/SupportMagic.htm", + "default/SupportMagicServitor.htm", + "fisherman/exchange_old_items.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual008.htm", + "fisherman/fishing_manual009.htm", + "fisherman/fishing_manual010.htm", + "fortress/foreman.htm", + "guard/kamaloka_help.htm", + "guard/kamaloka_level.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "teleporter/separatedsoul.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +88,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/html/default/30898-5.htm b/L2J_Mobius_2.5_Underground/dist/game/data/html/default/30898-5.htm index 3053003b3c..c3d22af32a 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/html/default/30898-5.htm +++ b/L2J_Mobius_2.5_Underground/dist/game/data/html/default/30898-5.htm @@ -6,5 +6,5 @@ Just tell me what you need.
- + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/html/villagemaster/30862.htm b/L2J_Mobius_2.5_Underground/dist/game/data/html/villagemaster/30862.htm index 4fe481432b..9fa3efb25f 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/html/villagemaster/30862.htm +++ b/L2J_Mobius_2.5_Underground/dist/game/data/html/villagemaster/30862.htm @@ -1,7 +1,7 @@ Grand Master Oltran:
You are far from your village, adventurer. How do you feel, now that you see the great castle and the ever-changing streets that are the pride of the Humans? I'm sure you admire them, but do not be enticed by their allure. Beneath the most beautiful bed of flowers, there is often a serpent's lair. If you spend much time in this city, you may come to see what I mean...
- + diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/RedLibra/34212-2.htm b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/RedLibra/34212-2.htm index d9cee0c26e..e7a46d3e45 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/RedLibra/34212-2.htm +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/events/RedLibra/34212-2.htm @@ -6,5 +6,5 @@ When you switch a weapon, the enchantment, Soul Crystal, aug - + \ No newline at end of file diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..47a82701b5 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,51 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/attribute_info.htm", + "common/augmentation_01.htm", + "common/augmentation_02.htm", + "common/augmentation_exchange.htm", + "common/crafting_01.htm", + "common/crafting_02.htm", + "common/crafting_03.htm", + "common/cursed_to_unidentified.htm", + "common/duals_01.htm", + "common/duals_02.htm", + "common/duals_03.htm", + "common/g_cube_warehouse001.htm", + "common/skill_enchant_help.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "common/smelting_trade001.htm", + "common/weapon_sa_01.htm", + "common/welcomeback002.htm", + "common/welcomeback003.htm", + "default/BlessingOfProtection.htm", + "default/SupportMagic.htm", + "default/SupportMagicServitor.htm", + "fisherman/exchange_old_items.htm", + "fisherman/fish_appearance_exchange.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual008.htm", + "fisherman/fishing_manual009.htm", + "fisherman/fishing_manual010.htm", + "fortress/foreman.htm", + "guard/kamaloka_help.htm", + "guard/kamaloka_level.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "teleporter/separatedsoul.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +91,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/html/default/30898-5.htm b/L2J_Mobius_3.0_Helios/dist/game/data/html/default/30898-5.htm index 3053003b3c..c3d22af32a 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/html/default/30898-5.htm +++ b/L2J_Mobius_3.0_Helios/dist/game/data/html/default/30898-5.htm @@ -6,5 +6,5 @@ Just tell me what you need.
- + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/html/villagemaster/30862.htm b/L2J_Mobius_3.0_Helios/dist/game/data/html/villagemaster/30862.htm index 4fe481432b..9fa3efb25f 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/html/villagemaster/30862.htm +++ b/L2J_Mobius_3.0_Helios/dist/game/data/html/villagemaster/30862.htm @@ -1,7 +1,7 @@ Grand Master Oltran:
You are far from your village, adventurer. How do you feel, now that you see the great castle and the ever-changing streets that are the pride of the Humans? I'm sure you admire them, but do not be enticed by their allure. Beneath the most beautiful bed of flowers, there is often a serpent's lair. If you spend much time in this city, you may come to see what I mean...
- + diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/RedLibra/34212-2.htm b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/RedLibra/34212-2.htm index d9cee0c26e..e7a46d3e45 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/RedLibra/34212-2.htm +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/events/RedLibra/34212-2.htm @@ -6,5 +6,5 @@ When you switch a weapon, the enchantment, Soul Crystal, aug - + \ No newline at end of file diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..47a82701b5 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,51 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/attribute_info.htm", + "common/augmentation_01.htm", + "common/augmentation_02.htm", + "common/augmentation_exchange.htm", + "common/crafting_01.htm", + "common/crafting_02.htm", + "common/crafting_03.htm", + "common/cursed_to_unidentified.htm", + "common/duals_01.htm", + "common/duals_02.htm", + "common/duals_03.htm", + "common/g_cube_warehouse001.htm", + "common/skill_enchant_help.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "common/smelting_trade001.htm", + "common/weapon_sa_01.htm", + "common/welcomeback002.htm", + "common/welcomeback003.htm", + "default/BlessingOfProtection.htm", + "default/SupportMagic.htm", + "default/SupportMagicServitor.htm", + "fisherman/exchange_old_items.htm", + "fisherman/fish_appearance_exchange.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual008.htm", + "fisherman/fishing_manual009.htm", + "fisherman/fishing_manual010.htm", + "fortress/foreman.htm", + "guard/kamaloka_help.htm", + "guard/kamaloka_level.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "teleporter/separatedsoul.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +91,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/html/default/30898-5.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/html/default/30898-5.htm index 3053003b3c..c3d22af32a 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/html/default/30898-5.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/html/default/30898-5.htm @@ -6,5 +6,5 @@ Just tell me what you need.
- + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/html/villagemaster/30862.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/html/villagemaster/30862.htm index 4fe481432b..9fa3efb25f 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/html/villagemaster/30862.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/html/villagemaster/30862.htm @@ -1,7 +1,7 @@ Grand Master Oltran:
You are far from your village, adventurer. How do you feel, now that you see the great castle and the ever-changing streets that are the pride of the Humans? I'm sure you admire them, but do not be enticed by their allure. Beneath the most beautiful bed of flowers, there is often a serpent's lair. If you spend much time in this city, you may come to see what I mean...
- + diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/events/RedLibra/34212-2.htm b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/events/RedLibra/34212-2.htm index d9cee0c26e..e7a46d3e45 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/events/RedLibra/34212-2.htm +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/events/RedLibra/34212-2.htm @@ -6,5 +6,5 @@ When you switch a weapon, the enchantment, Soul Crystal, aug - + \ No newline at end of file diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..47a82701b5 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,51 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/attribute_info.htm", + "common/augmentation_01.htm", + "common/augmentation_02.htm", + "common/augmentation_exchange.htm", + "common/crafting_01.htm", + "common/crafting_02.htm", + "common/crafting_03.htm", + "common/cursed_to_unidentified.htm", + "common/duals_01.htm", + "common/duals_02.htm", + "common/duals_03.htm", + "common/g_cube_warehouse001.htm", + "common/skill_enchant_help.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "common/smelting_trade001.htm", + "common/weapon_sa_01.htm", + "common/welcomeback002.htm", + "common/welcomeback003.htm", + "default/BlessingOfProtection.htm", + "default/SupportMagic.htm", + "default/SupportMagicServitor.htm", + "fisherman/exchange_old_items.htm", + "fisherman/fish_appearance_exchange.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual008.htm", + "fisherman/fishing_manual009.htm", + "fisherman/fishing_manual010.htm", + "fortress/foreman.htm", + "guard/kamaloka_help.htm", + "guard/kamaloka_level.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "teleporter/separatedsoul.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +91,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/html/default/30898-5.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/html/default/30898-5.htm index 3053003b3c..c3d22af32a 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/html/default/30898-5.htm +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/html/default/30898-5.htm @@ -6,5 +6,5 @@ Just tell me what you need.
- + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/html/villagemaster/30862.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/html/villagemaster/30862.htm index 4fe481432b..9fa3efb25f 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/html/villagemaster/30862.htm +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/html/villagemaster/30862.htm @@ -1,7 +1,7 @@ Grand Master Oltran:
You are far from your village, adventurer. How do you feel, now that you see the great castle and the ever-changing streets that are the pride of the Humans? I'm sure you admire them, but do not be enticed by their allure. Beneath the most beautiful bed of flowers, there is often a serpent's lair. If you spend much time in this city, you may come to see what I mean...
- + diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/events/RedLibra/34212-2.htm b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/events/RedLibra/34212-2.htm index d9cee0c26e..e7a46d3e45 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/events/RedLibra/34212-2.htm +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/events/RedLibra/34212-2.htm @@ -6,5 +6,5 @@ When you switch a weapon, the enchantment, Soul Crystal, aug - + \ No newline at end of file diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..47a82701b5 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,51 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/attribute_info.htm", + "common/augmentation_01.htm", + "common/augmentation_02.htm", + "common/augmentation_exchange.htm", + "common/crafting_01.htm", + "common/crafting_02.htm", + "common/crafting_03.htm", + "common/cursed_to_unidentified.htm", + "common/duals_01.htm", + "common/duals_02.htm", + "common/duals_03.htm", + "common/g_cube_warehouse001.htm", + "common/skill_enchant_help.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "common/smelting_trade001.htm", + "common/weapon_sa_01.htm", + "common/welcomeback002.htm", + "common/welcomeback003.htm", + "default/BlessingOfProtection.htm", + "default/SupportMagic.htm", + "default/SupportMagicServitor.htm", + "fisherman/exchange_old_items.htm", + "fisherman/fish_appearance_exchange.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual008.htm", + "fisherman/fishing_manual009.htm", + "fisherman/fishing_manual010.htm", + "fortress/foreman.htm", + "guard/kamaloka_help.htm", + "guard/kamaloka_level.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "teleporter/separatedsoul.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +91,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/html/default/30898-5.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/html/default/30898-5.htm index 3053003b3c..c3d22af32a 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/html/default/30898-5.htm +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/html/default/30898-5.htm @@ -6,5 +6,5 @@ Just tell me what you need.
- + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/html/villagemaster/30862.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/html/villagemaster/30862.htm index 4fe481432b..9fa3efb25f 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/html/villagemaster/30862.htm +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/html/villagemaster/30862.htm @@ -1,7 +1,7 @@ Grand Master Oltran:
You are far from your village, adventurer. How do you feel, now that you see the great castle and the ever-changing streets that are the pride of the Humans? I'm sure you admire them, but do not be enticed by their allure. Beneath the most beautiful bed of flowers, there is often a serpent's lair. If you spend much time in this city, you may come to see what I mean...
- + diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/events/RedLibra/34212-2.htm b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/events/RedLibra/34212-2.htm index d9cee0c26e..e7a46d3e45 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/events/RedLibra/34212-2.htm +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/events/RedLibra/34212-2.htm @@ -6,5 +6,5 @@ When you switch a weapon, the enchantment, Soul Crystal, aug - + \ No newline at end of file diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..47a82701b5 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,51 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/attribute_info.htm", + "common/augmentation_01.htm", + "common/augmentation_02.htm", + "common/augmentation_exchange.htm", + "common/crafting_01.htm", + "common/crafting_02.htm", + "common/crafting_03.htm", + "common/cursed_to_unidentified.htm", + "common/duals_01.htm", + "common/duals_02.htm", + "common/duals_03.htm", + "common/g_cube_warehouse001.htm", + "common/skill_enchant_help.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "common/smelting_trade001.htm", + "common/weapon_sa_01.htm", + "common/welcomeback002.htm", + "common/welcomeback003.htm", + "default/BlessingOfProtection.htm", + "default/SupportMagic.htm", + "default/SupportMagicServitor.htm", + "fisherman/exchange_old_items.htm", + "fisherman/fish_appearance_exchange.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual008.htm", + "fisherman/fishing_manual009.htm", + "fisherman/fishing_manual010.htm", + "fortress/foreman.htm", + "guard/kamaloka_help.htm", + "guard/kamaloka_level.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "teleporter/separatedsoul.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +91,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/html/default/30898-5.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/html/default/30898-5.htm index 3053003b3c..c3d22af32a 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/html/default/30898-5.htm +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/html/default/30898-5.htm @@ -6,5 +6,5 @@ Just tell me what you need.
- + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/html/villagemaster/30862.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/html/villagemaster/30862.htm index 4fe481432b..9fa3efb25f 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/html/villagemaster/30862.htm +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/html/villagemaster/30862.htm @@ -1,7 +1,7 @@ Grand Master Oltran:
You are far from your village, adventurer. How do you feel, now that you see the great castle and the ever-changing streets that are the pride of the Humans? I'm sure you admire them, but do not be enticed by their allure. Beneath the most beautiful bed of flowers, there is often a serpent's lair. If you spend much time in this city, you may come to see what I mean...
- + diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/events/RedLibra/34212-2.htm b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/events/RedLibra/34212-2.htm index d9cee0c26e..e7a46d3e45 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/events/RedLibra/34212-2.htm +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/events/RedLibra/34212-2.htm @@ -6,5 +6,5 @@ When you switch a weapon, the enchantment, Soul Crystal, aug - + \ No newline at end of file diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..47a82701b5 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,51 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/attribute_info.htm", + "common/augmentation_01.htm", + "common/augmentation_02.htm", + "common/augmentation_exchange.htm", + "common/crafting_01.htm", + "common/crafting_02.htm", + "common/crafting_03.htm", + "common/cursed_to_unidentified.htm", + "common/duals_01.htm", + "common/duals_02.htm", + "common/duals_03.htm", + "common/g_cube_warehouse001.htm", + "common/skill_enchant_help.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "common/smelting_trade001.htm", + "common/weapon_sa_01.htm", + "common/welcomeback002.htm", + "common/welcomeback003.htm", + "default/BlessingOfProtection.htm", + "default/SupportMagic.htm", + "default/SupportMagicServitor.htm", + "fisherman/exchange_old_items.htm", + "fisherman/fish_appearance_exchange.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual008.htm", + "fisherman/fishing_manual009.htm", + "fisherman/fishing_manual010.htm", + "fortress/foreman.htm", + "guard/kamaloka_help.htm", + "guard/kamaloka_level.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "teleporter/separatedsoul.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +91,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/trainer/30298-1.htm b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/trainer/30298-1.htm index b3fdef0937..16911c7b2e 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/trainer/30298-1.htm +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/html/trainer/30298-1.htm @@ -3,8 +3,8 @@ Welcome. What brings you here? My name's Pinter, and I'm one of the proud dwarve Craft a dualsword
Bestow special ability on a weapon
Craft an item
-Seal/Unseal armor and accessories
-Augment an item
+Seal/Unseal armor and accessories
+Augment an item
Purchase Academy equipment.
Learn skills
View information about the lord and tax rate
diff --git a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/bypasshandlers/Link.java index d89895c146..58c201d8e5 100644 --- a/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_CT_2.6_HighFive/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,8 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; +import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; import com.l2jmobius.gameserver.model.actor.instance.PlayerInstance; @@ -28,6 +30,51 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "adventurer_guildsman/AboutHighLevelGuilds.htm", + "adventurer_guildsman/AboutNewLifeCrystals.htm", + "clanHallDoorman/evolve.htm", + "common/augmentation_01.htm", + "common/augmentation_02.htm", + "common/crafting_01.htm", + "common/duals_01.htm", + "common/duals_02.htm", + "common/duals_03.htm", + "common/g_cube_warehouse001.htm", + "common/skill_enchant_help.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "common/weapon_sa_01.htm", + "common/welcomeback002.htm", + "common/welcomeback003.htm", + "default/BlessingOfProtection.htm", + "default/SupportMagic.htm", + "default/SupportMagicServitor.htm", + "fisherman/fishing_championship.htm", + "fortress/foreman.htm", + "guard/kamaloka_help.htm", + "guard/kamaloka_level.htm", + "olympiad/hero_main2.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "seven_signs/blkmrkt_1.htm", + "seven_signs/blkmrkt_2.htm", + "seven_signs/mammblack_1a.htm", + "seven_signs/mammblack_1b.htm", + "seven_signs/mammblack_1c.htm", + "seven_signs/mammblack_2a.htm", + "seven_signs/mammblack_2b.htm", + "seven_signs/mammmerch_1.htm", + "seven_signs/mammmerch_1a.htm", + "seven_signs/mammmerch_1b.htm", + "teleporter/separatedsoul.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -44,10 +91,12 @@ public class Link implements IBypassHandler return false; } - final String filename = "data/html/" + htmlPath; + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setFile(player, filename); - html.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0)); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..43c819a86b 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,35 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/craft_01.htm", + "common/craft_02.htm", + "common/runes_01.htm", + "common/sealed_runes_02.htm", + "common/sealed_runes_03.htm", + "common/sealed_runes_04.htm", + "common/sealed_runes_05.htm", + "common/sealed_runes_06.htm", + "common/sealed_runes_07.htm", + "common/sealed_runes_08.htm", + "common/sealed_runes_09.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual005.htm", + "fortress/foreman.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +75,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..43c819a86b 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,35 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/craft_01.htm", + "common/craft_02.htm", + "common/runes_01.htm", + "common/sealed_runes_02.htm", + "common/sealed_runes_03.htm", + "common/sealed_runes_04.htm", + "common/sealed_runes_05.htm", + "common/sealed_runes_06.htm", + "common/sealed_runes_07.htm", + "common/sealed_runes_08.htm", + "common/sealed_runes_09.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual005.htm", + "fortress/foreman.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +75,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..43c819a86b 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,35 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/craft_01.htm", + "common/craft_02.htm", + "common/runes_01.htm", + "common/sealed_runes_02.htm", + "common/sealed_runes_03.htm", + "common/sealed_runes_04.htm", + "common/sealed_runes_05.htm", + "common/sealed_runes_06.htm", + "common/sealed_runes_07.htm", + "common/sealed_runes_08.htm", + "common/sealed_runes_09.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual005.htm", + "fortress/foreman.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +75,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/html/fisherman/fishing_manual001.htm b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/html/fisherman/fishing_manual001.htm index 3fa2d7c983..115ace0e89 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/html/fisherman/fishing_manual001.htm +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/html/fisherman/fishing_manual001.htm @@ -2,5 +2,5 @@ - + \ No newline at end of file diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/bypasshandlers/Link.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/bypasshandlers/Link.java index 30f3fc9db3..43c819a86b 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/bypasshandlers/Link.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/bypasshandlers/Link.java @@ -16,6 +16,7 @@ */ package handlers.bypasshandlers; +import com.l2jmobius.commons.util.CommonUtil; import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.handler.IBypassHandler; import com.l2jmobius.gameserver.model.actor.Creature; @@ -29,6 +30,35 @@ public class Link implements IBypassHandler "Link" }; + private static final String[] VALID_BYPASSES = + { + "common/craft_01.htm", + "common/craft_02.htm", + "common/runes_01.htm", + "common/sealed_runes_02.htm", + "common/sealed_runes_03.htm", + "common/sealed_runes_04.htm", + "common/sealed_runes_05.htm", + "common/sealed_runes_06.htm", + "common/sealed_runes_07.htm", + "common/sealed_runes_08.htm", + "common/sealed_runes_09.htm", + "common/skill_enchant_help_01.htm", + "common/skill_enchant_help_02.htm", + "common/skill_enchant_help_03.htm", + "fisherman/fishing_manual001.htm", + "fisherman/fishing_manual002.htm", + "fisherman/fishing_manual003.htm", + "fisherman/fishing_manual004.htm", + "fisherman/fishing_manual005.htm", + "fortress/foreman.htm", + "petmanager/evolve.htm", + "petmanager/exchange.htm", + "petmanager/instructions.htm", + "warehouse/clanwh.htm", + "warehouse/privatewh.htm", + }; + @Override public boolean useBypass(String command, PlayerInstance player, Creature target) { @@ -45,9 +75,12 @@ public class Link implements IBypassHandler return false; } - final String content = HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath); + final String content = CommonUtil.contains(VALID_BYPASSES, htmlPath) ? HtmCache.getInstance().getHtm(player, "data/html/" + htmlPath) : null; final NpcHtmlMessage html = new NpcHtmlMessage(target != null ? target.getObjectId() : 0); - html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + if (content != null) + { + html.setHtml(content.replace("%objectId%", String.valueOf(target != null ? target.getObjectId() : 0))); + } player.sendPacket(html); return true; }