diff --git a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_1.0_Ertheia/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_2.5_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_3.0_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_4.0_GrandCrusade/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_5.0_Salvation/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_5.5_EtinasFate/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_Classic_2.0_Saviors/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_Classic_2.1_Zaken/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_Classic_2.2_Antharas/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_Classic_2.3_SevenSigns/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } } diff --git a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java index 050c921cbb..fdf34cd5ee 100644 --- a/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java +++ b/L2J_Mobius_Classic_3.0_TheKamael/dist/game/data/scripts/handlers/admincommandhandlers/AdminMissingHtmls.java @@ -21,14 +21,19 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; +import org.l2jmobius.gameserver.cache.HtmCache; import org.l2jmobius.gameserver.handler.IAdminCommandHandler; import org.l2jmobius.gameserver.model.World; import org.l2jmobius.gameserver.model.WorldObject; import org.l2jmobius.gameserver.model.actor.Npc; import org.l2jmobius.gameserver.model.actor.instance.ArtefactInstance; +import org.l2jmobius.gameserver.model.actor.instance.FishermanInstance; import org.l2jmobius.gameserver.model.actor.instance.FlyTerrainObjectInstance; +import org.l2jmobius.gameserver.model.actor.instance.GuardInstance; +import org.l2jmobius.gameserver.model.actor.instance.MerchantInstance; import org.l2jmobius.gameserver.model.actor.instance.ObservationInstance; import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.actor.instance.WarehouseInstance; import org.l2jmobius.gameserver.model.events.EventType; import org.l2jmobius.gameserver.util.BuilderUtil; @@ -71,9 +76,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if ((npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -99,9 +111,16 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !results.contains(obj.getId())) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - results.add(npc.getId()); + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + results.add(npc.getId()); + } } } } @@ -124,11 +143,18 @@ public class AdminMissingHtmls implements IAdminCommandHandler && !(obj instanceof FlyTerrainObjectInstance)) { final Npc npc = (Npc) obj; - if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm")) + if (npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK)) { - activeChar.teleToLocation(npc); - BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); - break; + if ((npc.getHtmlPath(npc.getId(), 0, null) == "data/html/npcdefault.htm") // + || ((obj instanceof FishermanInstance) && (HtmCache.getInstance().getHtm(null, "data/html/fisherman/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof WarehouseInstance) && (HtmCache.getInstance().getHtm(null, "data/html/warehouse/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof MerchantInstance) && (HtmCache.getInstance().getHtm(null, "data/html/merchant/" + npc.getId() + ".htm") == null)) // + || ((obj instanceof GuardInstance) && (HtmCache.getInstance().getHtm(null, "data/html/guard/" + npc.getId() + ".htm") == null))) + { + activeChar.teleToLocation(npc); + BuilderUtil.sendSysMessage(activeChar, "NPC " + npc.getId() + " does not have a default html."); + break; + } } } }