I always can not buy item from vender.
I found a bug in send packet for sendBuyBulkVender.
As following
Original Code of src/Network/Send/SeverType0.pm
Code: Select all
.......
# 0x0134,-1,purchasereq,2:4:8
sub sendBuyBulkVender {
my ($self, $venderID, $r_array) = @_;
my $msg = pack('v2 a4', 0x0134, 8+4*@{$r_array}, $venderID);
for (my $i = 0; $i < @{$r_array}; $i++) {
$msg .= pack('v2', $r_array->[$i]{amount}, $r_array->[$i]{itemIndex});
debug "Sent bulk buy vender: $r_array->[$i]{itemIndex} x $r_array->[$i]{amount}\n", "d_sendPacket", 2;
}
$self->sendToServer($msg);
}
.....
(I modify the first two lines in the sub.)
Code: Select all
.......
# 0x0134,-1,purchasereq,2:4:8
sub sendBuyBulkVender {
my ($self, $venderID, $r_array, $venderCID) = @_;
my $msg = pack('v2 a4 a4', 0x0801, 12+4*@{$r_array}, $venderID, $venderCID);
for (my $i = 0; $i < @{$r_array}; $i++) {
$msg .= pack('v2', $r_array->[$i]{amount}, $r_array->[$i]{itemIndex});
debug "Sent bulk buy vender: $r_array->[$i]{itemIndex} x $r_array->[$i]{amount}\n", "d_sendPacket", 2;
}
$self->sendToServer($msg);
}
.....