Properly fixed missing htmls command.
This commit is contained in:
parent
df8b06406d
commit
6883944c05
@ -21,13 +21,13 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
|
||||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.util.GeoUtils;
|
import com.l2jmobius.gameserver.util.GeoUtils;
|
||||||
@ -158,7 +158,7 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
if (obj.isNpc() && !obj.isMonster())
|
if (obj.isNpc() && !obj.isMonster())
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) obj;
|
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());
|
results.add(npc.getId());
|
||||||
}
|
}
|
||||||
|
@ -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);
|
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)
|
public boolean contains(String path)
|
||||||
{
|
{
|
||||||
return _cache.containsKey(path);
|
return _cache.containsKey(path);
|
||||||
|
@ -21,13 +21,13 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
|
||||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.util.GeoUtils;
|
import com.l2jmobius.gameserver.util.GeoUtils;
|
||||||
@ -158,7 +158,7 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
if (obj.isNpc() && !obj.isMonster())
|
if (obj.isNpc() && !obj.isMonster())
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) obj;
|
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());
|
results.add(npc.getId());
|
||||||
}
|
}
|
||||||
|
@ -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);
|
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)
|
public boolean contains(String path)
|
||||||
{
|
{
|
||||||
return _cache.containsKey(path);
|
return _cache.containsKey(path);
|
||||||
|
@ -21,13 +21,13 @@ import java.util.Collections;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.StringTokenizer;
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
import com.l2jmobius.gameserver.cache.HtmCache;
|
|
||||||
import com.l2jmobius.gameserver.geodata.GeoData;
|
import com.l2jmobius.gameserver.geodata.GeoData;
|
||||||
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
import com.l2jmobius.gameserver.handler.IAdminCommandHandler;
|
||||||
import com.l2jmobius.gameserver.model.L2Object;
|
import com.l2jmobius.gameserver.model.L2Object;
|
||||||
import com.l2jmobius.gameserver.model.L2World;
|
import com.l2jmobius.gameserver.model.L2World;
|
||||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
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.SystemMessageId;
|
||||||
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
import com.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||||
import com.l2jmobius.gameserver.util.GeoUtils;
|
import com.l2jmobius.gameserver.util.GeoUtils;
|
||||||
@ -158,7 +158,7 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
if (obj.isNpc() && !obj.isMonster())
|
if (obj.isNpc() && !obj.isMonster())
|
||||||
{
|
{
|
||||||
final L2Npc npc = (L2Npc) obj;
|
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());
|
results.add(npc.getId());
|
||||||
}
|
}
|
||||||
|
@ -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);
|
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)
|
public boolean contains(String path)
|
||||||
{
|
{
|
||||||
return _cache.containsKey(path);
|
return _cache.containsKey(path);
|
||||||
|
Loading…
Reference in New Issue
Block a user