Addition of client protocol version at character info menu.
This commit is contained in:
@@ -32,14 +32,17 @@
|
||||
<td width=120>Account Name: </td><td><font color="LEVEL"><a action="bypass -h admin_find_account %name%">%account%</a></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Punishment: </td><td><font color="LEVEL"><a action="bypass -h admin_punishment player %name%">Info</a></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Account IP: </td><td><font color="LEVEL"><a action="bypass -h admin_find_ip %ip%">%ip%</a></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>HWID: </td><td><font color="LEVEL"><a action="bypass -h admin_find_hwid %hwid%">%hwid%</a></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Punishment: </td><td><font color="LEVEL"><a action="bypass -h admin_punishment player %name%">Info</a></font></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Client Protocol: </td><td><font color="LEVEL">%protocol%</font></td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<br>
|
||||
|
@@ -1092,6 +1092,7 @@ public class AdminEditChar implements IAdminCommandHandler
|
||||
adminReply.replace("%access%", player.getAccessLevel().getLevel() + " (" + player.getAccessLevel().getName() + ")");
|
||||
adminReply.replace("%account%", player.getAccountName());
|
||||
adminReply.replace("%ip%", ip);
|
||||
adminReply.replace("%protocol%", String.valueOf(player.getClient() != null ? player.getClient().getProtocolVersion() : "NULL"));
|
||||
adminReply.replace("%hwid%", hwid);
|
||||
adminReply.replace("%ai%", player.getAI().getIntention().name());
|
||||
adminReply.replace("%inst%", player.getInstanceId() > 0 ? "<tr><td>InstanceId:</td><td><a action=\"bypass -h admin_instance_spawns " + player.getInstanceId() + "\">" + player.getInstanceId() + "</a></td></tr>" : "");
|
||||
|
@@ -82,7 +82,9 @@ public class GameClient extends ChannelInboundHandler<GameClient>
|
||||
|
||||
private volatile boolean _isDetached = false;
|
||||
|
||||
private boolean _protocol;
|
||||
private int _protocolVersion;
|
||||
|
||||
private boolean _protocolOk;
|
||||
|
||||
private int[][] trace;
|
||||
|
||||
@@ -664,14 +666,24 @@ public class GameClient extends ChannelInboundHandler<GameClient>
|
||||
}
|
||||
}
|
||||
|
||||
public void setProtocolVersion(int version)
|
||||
{
|
||||
_protocolVersion = version;
|
||||
}
|
||||
|
||||
public int getProtocolVersion()
|
||||
{
|
||||
return _protocolVersion;
|
||||
}
|
||||
|
||||
public boolean isProtocolOk()
|
||||
{
|
||||
return _protocol;
|
||||
return _protocolOk;
|
||||
}
|
||||
|
||||
public void setProtocolOk(boolean b)
|
||||
{
|
||||
_protocol = b;
|
||||
_protocolOk = b;
|
||||
}
|
||||
|
||||
public void setClientTracert(int[][] tracert)
|
||||
|
@@ -57,6 +57,7 @@ public class ProtocolVersion implements IClientIncomingPacket
|
||||
else
|
||||
{
|
||||
client.sendPacket(new KeyPacket(client.enableCrypt(), 1));
|
||||
client.setProtocolVersion(_version);
|
||||
client.setProtocolOk(true);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user