Skip to content
Snippets Groups Projects
Commit 8b3e95ff authored by VlLight's avatar VlLight
Browse files

BETA: DP-Part for [L6248]

	* Reviewed by: Zoey76, UnAfraid
parent a12e8b1b
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,9 @@
<tr><td colspan="4"><table width=270 border=0><tr><td width=270><font color="LEVEL">Npc Info</font> : %name% (<font color="LEVEL">%id%</font>) [<font color=00FF00>%lvl%</font> lvl]</td></tr></table></td></tr>
<tr><td><table width=270 border=0 bgcolor=131210><tr><td width=100><font color="LEVEL">ObjectId</font></td><td align=right width=170>%objid%</td></tr></table></td></tr>
<tr><td><table width=270 border=0><tr><td width=100><font color="LEVEL">Type:</font></td><td align=right width=170><font color=999999>%class%</font></td></tr></table></td></tr>
<tr><td><table width=270 border=0 bgcolor=131210><tr><td width=100><font color="LEVEL">Spawn</font></td><td align=right width=170>%spawn%</td></tr></table></td></tr>
<tr><td><table width=270 border=0><tr><td width=100><font color="LEVEL">Territory:</font></td><td align=right width=170>%territory%</td></tr></table></td></tr>
<tr><td><table width=270 border=0 bgcolor=131210><tr><td width=100><font color="LEVEL">Spawn type:</font></td><td align=right width=170>%spawntype%</td></tr></table></td></tr>
<tr><td><table width=270 border=0><tr><td width=100><font color="LEVEL">Spawn loc:</font></td><td align=right width=170>%spawn%</td></tr></table></td></tr>
<tr><td><table width=270 border=0><tr><td width=100><font color="LEVEL">Location:</font></td><td align=right width=170>%loc%</td></tr></table></td></tr>
<tr><td><table width=270 border=0 bgcolor=131210><tr><td width=100><font color="LEVEL">Heading:</font></td><td align=right width=170>%heading%</td></tr></table></td></tr>
<tr><td><table width=270 border=0><tr><td width=100><font color="LEVEL">Collision Radius:</font></td><td align=right width=170>%collision_radius%</td></tr></table></td></tr>
......
......@@ -114,7 +114,17 @@ public class L2NpcActionShift implements IActionHandler
if (((L2Npc) target).getSpawn() != null)
{
html.replace("%spawn%", ((L2Npc) target).getSpawn().getX() + " " + ((L2Npc) target).getSpawn().getY() + " " + ((L2Npc) target).getSpawn().getZ());
html.replace("%territory%", ((L2Npc) target).getSpawn().getSpawnTerritory() == null ? "None" : ((L2Npc) target).getSpawn().getSpawnTerritory().getName());
if (((L2Npc) target).getSpawn().isTerritoryBased())
{
html.replace("%spawntype%", "Random");
html.replace("%spawn%", ((L2Npc) target).getSpawn().getX(target) + " " + ((L2Npc) target).getSpawn().getY(target) + " " + ((L2Npc) target).getSpawn().getZ(target));
}
else
{
html.replace("%spawntype%", "Fixed");
html.replace("%spawn%", ((L2Npc) target).getSpawn().getX() + " " + ((L2Npc) target).getSpawn().getY() + " " + ((L2Npc) target).getSpawn().getZ());
}
html.replace("%loc2d%", String.valueOf((int) target.calculateDistance(((L2Npc) target).getSpawn(), false, false)));
html.replace("%loc3d%", String.valueOf((int) target.calculateDistance(((L2Npc) target).getSpawn(), true, false)));
if (((L2Npc) target).getSpawn().getRespawnMinDelay() == 0)
......@@ -132,6 +142,8 @@ public class L2NpcActionShift implements IActionHandler
}
else
{
html.replace("%territory%", "<font color=FF0000>--</font>");
html.replace("%spawntype%", "<font color=FF0000>--</font>");
html.replace("%spawn%", "<font color=FF0000>null</font>");
html.replace("%loc2d%", "<font color=FF0000>--</font>");
html.replace("%loc3d%", "<font color=FF0000>--</font>");
......
......@@ -31,6 +31,7 @@ import com.l2jserver.gameserver.model.TeleportWhereType;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.zone.L2ZoneType;
import com.l2jserver.gameserver.model.zone.ZoneId;
import com.l2jserver.gameserver.model.zone.type.NpcSpawnTerritory;
import com.l2jserver.gameserver.network.serverpackets.NpcHtmlMessage;
import com.l2jserver.util.StringUtil;
......@@ -90,6 +91,10 @@ public class AdminZone implements IAdminCommandHandler
{
zone.visualizeZone(activeChar.getZ());
}
for (NpcSpawnTerritory territory : ZoneManager.getInstance().getSpawnTerritories(activeChar))
{
territory.visualizeZone(activeChar.getZ());
}
showHtml(activeChar);
}
else
......@@ -148,6 +153,10 @@ public class AdminZone implements IAdminCommandHandler
StringUtil.append(zones, " ");
}
}
for (NpcSpawnTerritory territory : ZoneManager.getInstance().getSpawnTerritories(activeChar))
{
StringUtil.append(zones, territory.getName() + "<br1>");
}
adminReply.replace("%ZLIST%", zones.toString());
activeChar.sendPacket(adminReply);
}
......
<?xml version="1.0" encoding="UTF-8"?>
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/spawnlist.xsd">
<spawn zone="spawn_zone_test_01">
<npc id="20550" count="3" respawnDelay="15" respawnRandom="5" />
</spawn>
</list>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="list">
<xs:complexType>
<xs:sequence maxOccurs="1" minOccurs="1">
<xs:element name="spawn" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="npc" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="id" type="xs:positiveInteger" use="required" />
<xs:attribute name="x" type="xs:integer" use="optional" />
<xs:attribute name="y" type="xs:integer" use="optional" />
<xs:attribute name="z" type="xs:integer" use="optional" />
<xs:attribute name="heading" type="xs:integer" use="optional" />
<xs:attribute name="count" type="xs:positiveInteger" use="optional" />
<xs:attribute name="respawnDelay" type="xs:nonNegativeInteger" use="optional" />
<xs:attribute name="respawnRandom" type="xs:nonNegativeInteger" use="optional" />
<xs:attribute name="periodOfDay" use="optional">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="day" />
<xs:enumeration value="night" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute type="xs:string" name="zone" use="optional"/>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
\ No newline at end of file
......@@ -132,6 +132,7 @@
<xs:enumeration value="NoRestartZone" />
<xs:enumeration value="NoStoreZone" />
<xs:enumeration value="NoSummonFriendZone" />
<xs:enumeration value="NpcSpawnTerritory" />
<xs:enumeration value="OlympiadStadiumZone" />
<xs:enumeration value="PeaceZone" />
<xs:enumeration value="ResidenceHallTeleportZone" />
......
<?xml version="1.0" encoding="UTF-8"?>
<list enabled="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../xsd/zones.xsd">
<zone name="spawn_zone_test_01" type="NpcSpawnTerritory" shape="Cuboid" minZ="-3734" maxZ="-3689">
<node X="75552" Y="142899" />
<node X="76887" Y="144333" />
</zone>
</list>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment