Skip to content

Commit

Permalink
fix: old packet struct (#3966)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonrag authored Feb 10, 2025
1 parent 2e4e16e commit 63d265c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Network/Receive/ServerType0.pm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ sub new {
$self->{packet_list} = {
'0069' => ['account_server_info', 'v a4 a4 a4 a4 a26 C a*', [qw(len sessionID accountID sessionID2 lastLoginIP lastLoginTime accountSex serverInfo)]],
'006A' => ['login_error', 'C Z20', [qw(type date)]],
'006B' => ['received_characters_info', 'v C3', [qw(len total_slot premium_start_slot premium_end_slot)]], # last known struct
# '006B' => ['received_characters_info', 'v x20 a*', [qw(len charInfo)]], # not used in official server
'006B' => ['received_characters_info', 'v C3 x20 a*', [qw(len total_slot premium_start_slot premium_end_slot charInfo)]], # last known struct
'006C' => ['login_error_game_login_server'],
'006D' => ['character_creation_successful', 'a*', [qw(charInfo)]],
'006E' => ['character_creation_failed', 'C' ,[qw(type)]],
Expand Down
11 changes: 10 additions & 1 deletion src/Network/Receive/kRO/RagexeRE_2010_04_13a.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,17 @@ use base qw(Network::Receive::kRO::RagexeRE_2010_04_06a);

sub new {
my ($class) = @_;
my $self = $class->SUPER::new(@_);

return $class->SUPER::new(@_);
my %packets = (
'006B' => ['received_characters_info', 'v C3 x20 a*', [qw(len total_slot premium_start_slot premium_end_slot charInfo)]], # last known struct
);

foreach my $switch (keys %packets) {
$self->{packet_list}{$switch} = $packets{$switch};
}

return $self;
}

1;
12 changes: 11 additions & 1 deletion src/Network/Receive/kRO/Sakexe_2004_07_05a.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@ use base qw(Network::Receive::kRO::Sakexe_0);

sub new {
my ($class) = @_;
return $class->SUPER::new(@_);
my $self = $class->SUPER::new(@_);

my %packets = (
'006B' => ['received_characters_info', 'v x20 a*', [qw(len charInfo)]],
);

foreach my $switch (keys %packets) {
$self->{packet_list}{$switch} = $packets{$switch};
}

return $self;
}

1;
14 changes: 13 additions & 1 deletion src/Network/Receive/kRO/Sakexe_2007_11_06a.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,19 @@ use base qw(Network::Receive::kRO::Sakexe_2007_10_23a);

sub new {
my ($class) = @_;
return $class->SUPER::new(@_);
my $self = $class->SUPER::new(@_);

my %packets = (
'0078' => ['actor_exists', 'C a4 v14 a4 a2 v2 C2 a3 C3 v', [qw(object_type_not_used ID walk_speed opt1 opt2 option type hair_style weapon lowhead shield tophead midhead hair_color clothes_color head_dir guildID emblemID manner opt3 stance sex coords unknown1 unknown2 act lv)]], # 55 # standing
'007C' => ['actor_connected', 'C a4 v14 C2 a3 C2', [qw(object_type_not_used ID walk_speed opt1 opt2 option hair_style weapon lowhead type shield tophead midhead hair_color clothes_color head_dir stance sex coords unknown1 unknown2)]], # 42 # spawning
'022C' => ['actor_moved', 'C a4 v3 V v5 V v5 a4 a2 v V C2 a6 C2 v', [qw(object_type_not_used ID walk_speed opt1 opt2 option type hair_style weapon shield lowhead tick tophead midhead hair_color clothes_color head_dir guildID emblemID manner opt3 stance sex coords unknown1 unknown2 lv)]], # 65 # walking
);

foreach my $switch (keys %packets) {
$self->{packet_list}{$switch} = $packets{$switch};
}

return $self;
}

1;

0 comments on commit 63d265c

Please sign in to comment.