Include unique instance type on missing html search.

This commit is contained in:
MobiusDevelopment
2019-08-05 10:35:22 +00:00
parent 3045633852
commit 7930aa0f0c
13 changed files with 442 additions and 104 deletions

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}

View File

@@ -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,12 +76,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -99,12 +111,19 @@ 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))
{
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());
}
}
}
}
Collections.sort(results);
for (int id : results)
{
@@ -124,7 +143,13 @@ 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))
{
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.");
@@ -132,6 +157,7 @@ public class AdminMissingHtmls implements IAdminCommandHandler
}
}
}
}
break;
}
}