Addition of client protocol version at character info menu.
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
<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>
|
||||
|
@@ -1180,6 +1180,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%", (player.getClient() != null) && (player.getClient().getHardwareInfo() != null) ? player.getClient().getHardwareInfo().getMacAddress() : "Unknown");
|
||||
adminReply.replace("%ai%", player.getAI().getIntention().name());
|
||||
adminReply.replace("%inst%", player.isInInstance() ? "<tr><td>InstanceId:</td><td><a action=\"bypass -h admin_instance_spawns " + player.getInstanceId() + "\">" + player.getInstanceId() + "</a></td></tr>" : "");
|
||||
|
@@ -87,7 +87,9 @@ public class GameClient extends ChannelInboundHandler<GameClient>
|
||||
|
||||
private volatile boolean _isDetached = false;
|
||||
|
||||
private boolean _protocol;
|
||||
private int _protocolVersion;
|
||||
|
||||
private boolean _protocolOk;
|
||||
|
||||
private int[][] trace;
|
||||
|
||||
@@ -650,14 +652,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