diff --git a/L2J_Mobius_Classic/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java b/L2J_Mobius_Classic/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java index 26703beeef..8d265d4fb5 100644 --- a/L2J_Mobius_Classic/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java +++ b/L2J_Mobius_Classic/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java @@ -21,13 +21,13 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; -import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.geodata.GeoData; import com.l2jmobius.gameserver.handler.IAdminCommandHandler; import com.l2jmobius.gameserver.model.L2Object; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.util.GeoUtils; @@ -158,7 +158,7 @@ public class AdminGeodata implements IAdminCommandHandler if (obj.isNpc() && !obj.isMonster()) { final L2Npc npc = (L2Npc) obj; - if (!results.contains(npc.getId()) && (npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !HtmCache.getInstance().htmlNameExists("" + npc.getId())) + if (!results.contains(npc.getId()) && (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) == "data/html/npcdefault.htm")) { results.add(npc.getId()); } diff --git a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/cache/HtmCache.java b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/cache/HtmCache.java index 99ab8ee627..fec436d1fa 100644 --- a/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/cache/HtmCache.java +++ b/L2J_Mobius_Classic/java/com/l2jmobius/gameserver/cache/HtmCache.java @@ -180,30 +180,6 @@ public class HtmCache return (path == null) || path.isEmpty() ? "" : _cache.get(path) == null ? loadFile(new File(Config.DATAPACK_ROOT, path)) : _cache.get(path); } - /** - * Used by admin_geomap_missing_htmls - * @param search String - * @return if html name exists - */ - public boolean htmlNameExists(String search) - { - for (String s : _cache.keySet()) - { - if (s.contains(search) && (!s.contains("quest"))) - { - return true; - } - } - for (String s : _cache.values()) - { - if (s.contains(search) && (!s.contains("quest"))) - { - return true; - } - } - return false; - } - public boolean contains(String path) { return _cache.containsKey(path); diff --git a/L2J_Mobius_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java b/L2J_Mobius_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java index 26703beeef..8d265d4fb5 100644 --- a/L2J_Mobius_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java +++ b/L2J_Mobius_Helios/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java @@ -21,13 +21,13 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; -import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.geodata.GeoData; import com.l2jmobius.gameserver.handler.IAdminCommandHandler; import com.l2jmobius.gameserver.model.L2Object; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.util.GeoUtils; @@ -158,7 +158,7 @@ public class AdminGeodata implements IAdminCommandHandler if (obj.isNpc() && !obj.isMonster()) { final L2Npc npc = (L2Npc) obj; - if (!results.contains(npc.getId()) && (npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !HtmCache.getInstance().htmlNameExists("" + npc.getId())) + if (!results.contains(npc.getId()) && (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) == "data/html/npcdefault.htm")) { results.add(npc.getId()); } diff --git a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/cache/HtmCache.java b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/cache/HtmCache.java index 99ab8ee627..fec436d1fa 100644 --- a/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/cache/HtmCache.java +++ b/L2J_Mobius_Helios/java/com/l2jmobius/gameserver/cache/HtmCache.java @@ -180,30 +180,6 @@ public class HtmCache return (path == null) || path.isEmpty() ? "" : _cache.get(path) == null ? loadFile(new File(Config.DATAPACK_ROOT, path)) : _cache.get(path); } - /** - * Used by admin_geomap_missing_htmls - * @param search String - * @return if html name exists - */ - public boolean htmlNameExists(String search) - { - for (String s : _cache.keySet()) - { - if (s.contains(search) && (!s.contains("quest"))) - { - return true; - } - } - for (String s : _cache.values()) - { - if (s.contains(search) && (!s.contains("quest"))) - { - return true; - } - } - return false; - } - public boolean contains(String path) { return _cache.containsKey(path); diff --git a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java index 26703beeef..8d265d4fb5 100644 --- a/L2J_Mobius_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java +++ b/L2J_Mobius_Underground/dist/game/data/scripts/handlers/admincommandhandlers/AdminGeodata.java @@ -21,13 +21,13 @@ import java.util.Collections; import java.util.List; import java.util.StringTokenizer; -import com.l2jmobius.gameserver.cache.HtmCache; import com.l2jmobius.gameserver.geodata.GeoData; import com.l2jmobius.gameserver.handler.IAdminCommandHandler; import com.l2jmobius.gameserver.model.L2Object; import com.l2jmobius.gameserver.model.L2World; import com.l2jmobius.gameserver.model.actor.L2Npc; import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.events.EventType; import com.l2jmobius.gameserver.network.SystemMessageId; import com.l2jmobius.gameserver.network.serverpackets.SystemMessage; import com.l2jmobius.gameserver.util.GeoUtils; @@ -158,7 +158,7 @@ public class AdminGeodata implements IAdminCommandHandler if (obj.isNpc() && !obj.isMonster()) { final L2Npc npc = (L2Npc) obj; - if (!results.contains(npc.getId()) && (npc.getLocation().getX() > topLeftX) && (npc.getLocation().getX() < bottomRightX) && (npc.getLocation().getY() > topLeftY) && (npc.getLocation().getY() < bottomRightY) && npc.isTalkable() && !HtmCache.getInstance().htmlNameExists("" + npc.getId())) + if (!results.contains(npc.getId()) && (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) == "data/html/npcdefault.htm")) { results.add(npc.getId()); } diff --git a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/cache/HtmCache.java b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/cache/HtmCache.java index 99ab8ee627..fec436d1fa 100644 --- a/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/cache/HtmCache.java +++ b/L2J_Mobius_Underground/java/com/l2jmobius/gameserver/cache/HtmCache.java @@ -180,30 +180,6 @@ public class HtmCache return (path == null) || path.isEmpty() ? "" : _cache.get(path) == null ? loadFile(new File(Config.DATAPACK_ROOT, path)) : _cache.get(path); } - /** - * Used by admin_geomap_missing_htmls - * @param search String - * @return if html name exists - */ - public boolean htmlNameExists(String search) - { - for (String s : _cache.keySet()) - { - if (s.contains(search) && (!s.contains("quest"))) - { - return true; - } - } - for (String s : _cache.values()) - { - if (s.contains(search) && (!s.contains("quest"))) - { - return true; - } - } - return false; - } - public boolean contains(String path) { return _cache.containsKey(path);