Mushroom wrote:However, I found a fix on Brazilian Openkore forum and it seems to be working fine.
Maybe it could be commited? so bRO users don't need to apply the patch (unless the fix bugs other official servers)
- Patch is attached to the topic.
This patch is mostly back-port to IPC Msg Exchange.
the main patches are:
Request/Response patch, to allow query in non Map mode
Code: Select all
- if ($clients->[$i]{connectedToMap}) {
- $clients->[$i]->send($packet);
- $self->{state} = 'requesting';
- return;
- }
+ $clients->[$i]->send($packet);
+ $self->{state} = 'requesting';
+ return;
Server List/Char list patch (donno if it is even needed)
Code: Select all
-# my $data = pack("C*", 0xAD, 0x02, 0x00, 0x00, 0x1E, 0x0A, 0x00, 0x00);
-# $client->send($data);
my $sex = 1;
my $serverName = pack("a20", "Poseidon server"); # server name should be less than or equal to 20 characters
my $serverUsers = pack("V", @{$self->clients()} - 1);
# '0069' => ['account_server_info', 'x2 a4 a4 a4 x30 C1 a*',
# [qw(sessionID accountID sessionID2 accountSex serverInfo)]],
- my $data;
- if ($switch eq '01FA') {
- $data = pack("C*", 0x69, 0x00, 0x53, 0x00) .
- $sessionID . $accountID . $sessionID2 .
- pack("x30") . pack("C1", $sex) . pack("x4") .
- pack("C*", $ipElements[0], $ipElements[1], $ipElements[2], $ipElements[3]) .
- $port . $serverName . $serverUsers . pack("x2");
- } else {
- $data = pack("C*", 0x69, 0x00, 0x4F, 0x00) .
- $sessionID . $accountID . $sessionID2 .
- pack("x30") . pack("C1", $sex) .
- pack("C*", $ipElements[0], $ipElements[1], $ipElements[2], $ipElements[3]) .
- $port . $serverName . $serverUsers . pack("x2");
- }
+ my $data = pack("C*", 0x69, 0x00, 0x4f, 0x00) .
+ $sessionID . $accountID . $sessionID2 .
+ pack("x30") . pack("C1", $sex) .
+ pack("C*", $ipElements[0], $ipElements[1], $ipElements[2], $ipElements[3]) .
+ $port . $serverName . $serverUsers . pack("x2");
kRO Mode disable(donno why)
Code: Select all
- if($switch eq '02B0') { # kRO uses 02B2 as masterLogin packet when we have <langtype>0</langtype> in the clientinfo.xml
- # if other servers do use this packet too that will be a problem.
- $clientdata{$index}{kRO} = 1;
- }
Map Login patch
Code: Select all
- } elsif ($switch eq '0436' &&
- (length($msg) == 19) &&
- (substr($msg, 2, 4) eq $accountID) &&
- (substr($msg, 6, 4) eq $charID) &&
- (substr($msg, 10, 4) eq $sessionID)
- ) { # client sends the maplogin packet
-
- $client->send(pack("v a4", 0x0283, $accountID));
- # mapLogin packet
- $client->send(pack("H536", "eb0206ad09222b56c0050500000f012c010100000000000900000001004e565f42415349430000000000000000080000000f0000000030000000000000000000010054465f444f55424c4500000000000000090000000f0000000131000000000000000000010054465f4d495353000000000000000000070000000f0000000132000100000000000a00010054465f535445414c0000000000000000080000000f0000000133000400000000000a00010054465f484944494e4700000000000000090000000f0000000034000100000000000c00020054465f504f49534f4e00000000000000090000000f0000000135001000000000000a00090054465f4445544f5849465900000000000b0000000f000000008e00040000000100030001004e565f464952535441494400000000000b0000000f00000000d701df145a000200000000d701df145a0003000000003a010100d701df145a0002f13200003a010100b0001900d06b0000b0001800b2110000b102080000000000b202080000000000b0002a003f000000b0002b0000000000b0002e002d000000b000300000000000d9070039020000000000000000000000000000000000000000000000000000233000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"));
- $client->{connectedToMap} = 1;
-
Packet Glue Filter
Code: Select all
@@ -521,7 +476,7 @@
### Check if packet 0228 got tangled up with the sync packet
if (uc(unpack("H2", substr($msg, 7, 1))) . uc(unpack("H2", substr($msg, 6, 1))) eq '0228') {
# queue the response (thanks abt123)
- $self->{response} = substr($msg, 6, length($msg));
+ $self->{response} = substr($msg, 6, 18);
$self->{state} = 'requested';
}
@@ -540,17 +495,6 @@
} elsif ($switch eq '0228') { # client sends game guard sync
# Queue the response
- # Don't allow other packet's (like Sync) to get to RO server.
- my $length = unpack("v",substr($msg,2,2));
- if ($length > 0) {
- $self->{response} = substr($msg,0,$length+2);
- } else {
- $self->{response} = $msg;
- };
- $self->{state} = 'requested';
-
- } elsif ($switch eq '02A7') { # client sends hShield response
- # Queue the response
$self->{response} = $msg;
$self->{state} = 'requested';
As for Me, the patch is very lame, and should be made more smart to not break compatibility with other clients.