New admin world_missing_htmls command.
This commit is contained in:
@@ -282,6 +282,7 @@
|
|||||||
<admin command="admin_geogrid" accessLevel="100" />
|
<admin command="admin_geogrid" accessLevel="100" />
|
||||||
<admin command="admin_geomap" accessLevel="100" />
|
<admin command="admin_geomap" accessLevel="100" />
|
||||||
<admin command="admin_geomap_missing_htmls" accessLevel="100" />
|
<admin command="admin_geomap_missing_htmls" accessLevel="100" />
|
||||||
|
<admin command="admin_world_missing_htmls" accessLevel="100" />
|
||||||
|
|
||||||
<!-- ADMIN GEO EDITOR -->
|
<!-- ADMIN GEO EDITOR -->
|
||||||
<admin command="admin_ge_status" accessLevel="100" />
|
<admin command="admin_ge_status" accessLevel="100" />
|
||||||
|
@@ -45,7 +45,8 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
"admin_geo_can_see",
|
"admin_geo_can_see",
|
||||||
"admin_geogrid",
|
"admin_geogrid",
|
||||||
"admin_geomap",
|
"admin_geomap",
|
||||||
"admin_geomap_missing_htmls"
|
"admin_geomap_missing_htmls",
|
||||||
|
"admin_world_missing_htmls"
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -172,6 +173,29 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
activeChar.sendMessage("Found " + results.size() + " results.");
|
activeChar.sendMessage("Found " + results.size() + " results.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "admin_world_missing_htmls":
|
||||||
|
{
|
||||||
|
activeChar.sendMessage("Missing htmls for the whole world.");
|
||||||
|
final List<Integer> results = new ArrayList<>();
|
||||||
|
for (L2Object obj : L2World.getInstance().getVisibleObjects())
|
||||||
|
{
|
||||||
|
if (obj.isNpc() && !obj.isMonster())
|
||||||
|
{
|
||||||
|
final L2Npc npc = (L2Npc) obj;
|
||||||
|
if (!results.contains(npc.getId()) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0) == "data/html/npcdefault.htm"))
|
||||||
|
{
|
||||||
|
results.add(npc.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Collections.sort(results);
|
||||||
|
for (int id : results)
|
||||||
|
{
|
||||||
|
activeChar.sendMessage("NPC " + id + " does not have a default html.");
|
||||||
|
}
|
||||||
|
activeChar.sendMessage("Found " + results.size() + " results.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -282,6 +282,7 @@
|
|||||||
<admin command="admin_geogrid" accessLevel="100" />
|
<admin command="admin_geogrid" accessLevel="100" />
|
||||||
<admin command="admin_geomap" accessLevel="100" />
|
<admin command="admin_geomap" accessLevel="100" />
|
||||||
<admin command="admin_geomap_missing_htmls" accessLevel="100" />
|
<admin command="admin_geomap_missing_htmls" accessLevel="100" />
|
||||||
|
<admin command="admin_world_missing_htmls" accessLevel="100" />
|
||||||
|
|
||||||
<!-- ADMIN GEO EDITOR -->
|
<!-- ADMIN GEO EDITOR -->
|
||||||
<admin command="admin_ge_status" accessLevel="100" />
|
<admin command="admin_ge_status" accessLevel="100" />
|
||||||
|
@@ -45,7 +45,8 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
"admin_geo_can_see",
|
"admin_geo_can_see",
|
||||||
"admin_geogrid",
|
"admin_geogrid",
|
||||||
"admin_geomap",
|
"admin_geomap",
|
||||||
"admin_geomap_missing_htmls"
|
"admin_geomap_missing_htmls",
|
||||||
|
"admin_world_missing_htmls"
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -172,6 +173,29 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
activeChar.sendMessage("Found " + results.size() + " results.");
|
activeChar.sendMessage("Found " + results.size() + " results.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "admin_world_missing_htmls":
|
||||||
|
{
|
||||||
|
activeChar.sendMessage("Missing htmls for the whole world.");
|
||||||
|
final List<Integer> results = new ArrayList<>();
|
||||||
|
for (L2Object obj : L2World.getInstance().getVisibleObjects())
|
||||||
|
{
|
||||||
|
if (obj.isNpc() && !obj.isMonster())
|
||||||
|
{
|
||||||
|
final L2Npc npc = (L2Npc) obj;
|
||||||
|
if (!results.contains(npc.getId()) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0) == "data/html/npcdefault.htm"))
|
||||||
|
{
|
||||||
|
results.add(npc.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Collections.sort(results);
|
||||||
|
for (int id : results)
|
||||||
|
{
|
||||||
|
activeChar.sendMessage("NPC " + id + " does not have a default html.");
|
||||||
|
}
|
||||||
|
activeChar.sendMessage("Found " + results.size() + " results.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -282,6 +282,7 @@
|
|||||||
<admin command="admin_geogrid" accessLevel="100" />
|
<admin command="admin_geogrid" accessLevel="100" />
|
||||||
<admin command="admin_geomap" accessLevel="100" />
|
<admin command="admin_geomap" accessLevel="100" />
|
||||||
<admin command="admin_geomap_missing_htmls" accessLevel="100" />
|
<admin command="admin_geomap_missing_htmls" accessLevel="100" />
|
||||||
|
<admin command="admin_world_missing_htmls" accessLevel="100" />
|
||||||
|
|
||||||
<!-- ADMIN GEO EDITOR -->
|
<!-- ADMIN GEO EDITOR -->
|
||||||
<admin command="admin_ge_status" accessLevel="100" />
|
<admin command="admin_ge_status" accessLevel="100" />
|
||||||
|
@@ -45,7 +45,8 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
"admin_geo_can_see",
|
"admin_geo_can_see",
|
||||||
"admin_geogrid",
|
"admin_geogrid",
|
||||||
"admin_geomap",
|
"admin_geomap",
|
||||||
"admin_geomap_missing_htmls"
|
"admin_geomap_missing_htmls",
|
||||||
|
"admin_world_missing_htmls"
|
||||||
};
|
};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -172,6 +173,29 @@ public class AdminGeodata implements IAdminCommandHandler
|
|||||||
activeChar.sendMessage("Found " + results.size() + " results.");
|
activeChar.sendMessage("Found " + results.size() + " results.");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "admin_world_missing_htmls":
|
||||||
|
{
|
||||||
|
activeChar.sendMessage("Missing htmls for the whole world.");
|
||||||
|
final List<Integer> results = new ArrayList<>();
|
||||||
|
for (L2Object obj : L2World.getInstance().getVisibleObjects())
|
||||||
|
{
|
||||||
|
if (obj.isNpc() && !obj.isMonster())
|
||||||
|
{
|
||||||
|
final L2Npc npc = (L2Npc) obj;
|
||||||
|
if (!results.contains(npc.getId()) && npc.isTalkable() && !npc.hasListener(EventType.ON_NPC_FIRST_TALK) && (npc.getHtmlPath(npc.getId(), 0) == "data/html/npcdefault.htm"))
|
||||||
|
{
|
||||||
|
results.add(npc.getId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Collections.sort(results);
|
||||||
|
for (int id : results)
|
||||||
|
{
|
||||||
|
activeChar.sendMessage("NPC " + id + " does not have a default html.");
|
||||||
|
}
|
||||||
|
activeChar.sendMessage("Found " + results.size() + " results.");
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user