Code: Select all
Index: Receive.pm
===================================================================
--- Receive.pm (revision 6488)
+++ Receive.pm (working copy)
@@ -80,7 +80,7 @@
'0073' => ['map_loaded', 'V a3', [qw(syncMapSync coords)]],
'0075' => ['changeToInGameState'],
'0077' => ['changeToInGameState'],
'0078' => ['actor_display', 'a4 v14 a4 x7 C1 a3 x2 C1 v1', [qw(ID walk_speed param1 param2 param3 type hair_style weapon lowhead shield tophead midhead hair_color clothes_color head_dir guildID sex coords act lv)]],
+ # cRO got 1 byte at the beginning ... '0078' => ['actor_display', 'C1 a4 v14 a4 x7 C1 a3 x2 C1 v1', [qw(npcinfo ID walk_speed param1 param2 param3 type hair_style weapon lowhead shield tophead midhead hair_color clothes_color head_dir guildID sex coords act lv)]],
'0079' => ['actor_display', 'a4 v14 a4 x7 C1 a3 x2 v1', [qw(ID walk_speed param1 param2 param3 type hair_style weapon lowhead shield tophead midhead hair_color clothes_color head_dir guildID sex coords lv)]],
'007A' => ['changeToInGameState'],
'007B' => ['actor_display', 'a4 v8 x4 v6 a4 x7 C1 a5 x3 v1', [qw(ID walk_speed param1 param2 param3 type hair_style weapon lowhead shield tophead midhead hair_color clothes_color head_dir guildID sex coords lv)]],
@@ -334,6 +334,11 @@
'02AD' => ['login_pin_code_request', 'v1 V', [qw(flag key)]],
# Packet Prefix encryption Support
'02AE' => ['initialize_message_id_encryption', 'V1 V1', [qw(param1 param2)]],
+ # Some new packets (cRO)
+ '02EB' => ['map_loaded', 'V a3', [qw(syncMapSync coords)]],
+ '02D0' => ['inventory_items_nonstackable'],
+ '02D4' => ['inventory_item_added', 'v1 v1 v1 C1 C1 C1 a8 v1 C1 C1 a4', [qw(index amount nameID identified broken upgrade cards type_equip type fail cards_ext)]],
+ '02E8' => ['inventory_items_stackable'],
};
return bless \%self, $class;
@@ -3341,6 +3345,7 @@
$self->decrypt(\$newmsg, substr($args->{RAW_MSG}, 4));
my $msg = substr($args->{RAW_MSG}, 0, 4) . $newmsg;
my $psize = ($args->{switch} eq '0295') ? 24 : 20;
+ my $psize = ($args->{switch} eq '02D0') ? 26 : 20;
for (my $i = 4; $i < $args->{RAW_MSG_SIZE}; $i += $psize) {
my $index = unpack("v1", substr($msg, $i, 2));
@@ -3388,6 +3393,7 @@
$self->decrypt(\$newmsg, substr($args->{RAW_MSG}, 4));
my $msg = substr($args->{RAW_MSG}, 0, 4).$newmsg;
my $psize = ($args->{switch} eq "00A3") ? 10 : 18;
+ my $psize = ($args->{switch} eq "02E8") ? 22 : 18;
for (my $i = 4; $i < $args->{RAW_MSG_SIZE}; $i += $psize) {
my $index = unpack("v1", substr($msg, $i, 2));
+ '02D4' => ['inventory_item_added', 'v1 v1 v1 C1 C1 C1 a8 v1 C1 C1 a4', [qw(index amount nameID identified broken upgrade cards type_equip type fail cards_ext)]], is correct, but at least it now adds items to inventory on pick up ^^