small addition

This commit is contained in:
sirjonasxx 2020-05-08 01:32:35 +02:00
parent 265258e81b
commit 2c9b463ba3
3 changed files with 9 additions and 3 deletions

View File

@ -98,7 +98,13 @@ public class StructurePredictor {
new HPacket(4002, 1), new HPacket(4002, 1),
new HPacket(4002, 0, 0), new HPacket(4002, 0, 0),
new HPacket(4002, 0, 0, 42, false), new HPacket(4002, 0, 0, 42, false),
new HPacket(4002, 0, "") new HPacket(4002, 0, ""),
new HPacket("[0][0][0]F[0] [0][0][0] [0][0][0][5][0]\u0013ACH_FriendListSize5[0][0][0]U[0][0][0] [0][0][0][0][0][0][0][0][0][0][0]Z[0][0][6]social[0][0][0][0][0][13][0][0][0][2]"),
new HPacket("[0][0][0]?[0] [0][0][0][4][0][0][0][4][0][10]ACH_Login4[0][0][0]\u000F[0][0][0]\u001C[0][0][0][0][0][0][0][0][0][0][0][2][0][0][8]identity[0][0][0][0][0]\u0014[0][0][0][0]"),
new HPacket("[0][0][0][6]\u000Ew[0][0][0][0]"),
new HPacket("[0][0][0]'[3] [0][5]Login[0][6]socket[0]\u000Eclient.auth_ok[0][0][0][0][0][0]"),
new HPacket(4002, false, ""),
// new HPacket("[0][0][1]p[13]1[0][0][0][12][0][10]MOUSE_ZOOM[0][0][1][0]\u0015HABBO_CLUB_OFFER_BETA[0][0][1][0]\u000EUSE_GUIDE_TOOL[0]&requirement.unfulfilled.helper_level_4[0][0]\u000FBUILDER_AT_WORK[0](requirement.unfulfilled.group_membership[0][0]\u000FCALL_ON_HELPERS[0][0][1][0]\u001FNAVIGATOR_ROOM_THUMBNAIL_CAMERA[0][0][1][0][7]CITIZEN[0][0][1][0]\u0012JUDGE_CHAT_REVIEWS[0]&requirement.unfulfilled.helper_level_6[0][0][5]TRADE[0][0][1][0][6]CAMERA[0][0][1][0]\u0014VOTE_IN_COMPETITIONS[0][0][1][0]\u0018NAVIGATOR_PHASE_TWO_2014[0][0][1]")
}; };

View File

@ -64,7 +64,7 @@ public class IntegerChecker extends TypeChecker<Integer> {
// when ordering, it often appears that integers are placed before strings/booleans/etc // when ordering, it often appears that integers are placed before strings/booleans/etc
// in the case of empty strings or false booleans, it is as good as always the integer that comes first // in the case of empty strings or false booleans, it is as good as always the integer that comes first
// so we'll try to respect that here with a small score adjust, which doesnt affect anything else than ordering // so we'll try to respect that here with a small score adjust, which doesnt affect anything else than ordering
double offset = ((double)index) / 1000000000; double offset = ((double)index) / 1000000000.0;
// since -1 has a byte arrangement barely used by other packets, we can assign full score // since -1 has a byte arrangement barely used by other packets, we can assign full score
if (value == -1) { if (value == -1) {

View File

@ -17,7 +17,7 @@ public class StringChecker extends TypeChecker<String> {
@Override @Override
public double score(int index) { public double score(int index) {
return scoreString(get(index)); return Math.max(scoreString(get(index)) - (((double)index) / 1000000000000.0), 0);
} }
@Override @Override