Changed misleading NPC distance information.

This commit is contained in:
MobiusDev
2018-08-31 09:34:55 +00:00
parent e05acf38aa
commit 74f491d654
16 changed files with 24 additions and 48 deletions

View File

@@ -28,7 +28,7 @@
<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>
<tr><td><table width=270 border=0 bgcolor=131210><tr><td width=100><font color="LEVEL">Collision Height:</font></td><td align=right width=170>%collision_height%</td></tr></table></td></tr>
<tr><td><table width=270 border=0><tr><td width=100><font color="LEVEL">Distance:</font></td><td align=right width=170>2D: %loc2d%, 3D: %loc3d%, You: %dist%</td></tr></table></td></tr>
<tr><td><table width=270 border=0><tr><td width=100><font color="LEVEL">Distance:</font></td><td align=right width=170>2D: %loc2d%, 3D: %loc3d%</td></tr></table></td></tr>
<tr><td><table width=270 border=0 bgcolor=131210><tr><td width=100><font color="LEVEL">Respawn:</font></td><td align=right width=170>%resp%</td></tr></table></td></tr>
<tr><td><table width=270 border=0><tr><td width=100><font color="LEVEL">Aggro:</font></td><td align=right width=170><font color=999999>%aggro%</font></td></tr></table></td></tr>
<tr><td><table width=270 border=0 bgcolor=131210><tr><td width=100><font color="LEVEL">HP:</font></td><td align=right width=170><font color=FF4040>%hp%/%hpmax%</font></td></tr></table></td></tr>

View File

@@ -101,7 +101,8 @@ public class L2NpcActionShift implements IActionShiftHandler
html.replace("%heading%", String.valueOf(((L2Character) target).getHeading()));
html.replace("%collision_radius%", String.valueOf(((L2Character) target).getTemplate().getfCollisionRadius()));
html.replace("%collision_height%", String.valueOf(((L2Character) target).getTemplate().getfCollisionHeight()));
html.replace("%dist%", String.valueOf((int) activeChar.calculateDistance(target, true, false)));
html.replace("%loc2d%", String.valueOf((int) activeChar.calculateDistance(target, false, false)));
html.replace("%loc3d%", String.valueOf((int) activeChar.calculateDistance(target, true, false)));
final byte attackAttribute = ((L2Character) target).getAttackElement();
html.replace("%ele_atk%", Elementals.getElementName(attackAttribute));
@@ -127,8 +128,6 @@ public class L2NpcActionShift implements IActionShiftHandler
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().getLocation(), false, false)));
html.replace("%loc3d%", String.valueOf((int) target.calculateDistance(((L2Npc) target).getSpawn().getLocation(), true, false)));
if (((L2Npc) target).getSpawn().getRespawnMinDelay() == 0)
{
html.replace("%resp%", "None");
@@ -151,8 +150,6 @@ public class L2NpcActionShift implements IActionShiftHandler
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>");
html.replace("%resp%", "<font color=FF0000>--</font>");
}