2013/3/29 官服維護後,角色封包變動....
多處修改,如下:
注意: 以下修改涉及主程式修改,
稍有不慎恐會造成無法程執行,
建議修改前先行備份,以備不時之需
1. 伺服器定義檔 tables/servers.txt
修改您所指定的伺服,把 charBlockSize 改為 144
2. 封包定義檔 recvpackets
修改您所指定的封包定義檔,
082D 29
09A0 6
099D 0
3. 修改 src/Network/Receive/ServerType0.pm
先找到「if ($args->{switch} eq '099D' && $args->{RAW_MSG_SIZE} != 4) {」字串,
原程式碼
# FIXME better support for multiple received_characters packets
if ($args->{switch} eq '099D' && $args->{RAW_MSG_SIZE} != 4) {
$net->setState(1.5);
return
}
複製代碼
修改成
# FIXME better support for multiple received_characters packets
# if ($args->{switch} eq '099D' && $args->{RAW_MSG_SIZE} != 4) {
# $net->setState(1.5);
# return
# }
複製代碼
也就是把第 02 ~ 05 行註解掉
4. 修改 src/Network/Receive/twRO.pm
修改(1).
先找到「use strict;」字串,
原程式碼
use strict;
use Globals;
use base qw(Network::Receive::ServerType0);
use Log qw(message warning error debug);
use Network::MessageTokenizer;
use I18N qw(bytesToString stringToBytes);
複製代碼
修改成
use strict;
use Time::HiRes;
use Globals;
use base qw(Network::Receive::ServerType0);
use Misc;
use Utils;
use Log qw(message warning error debug);
use Network::MessageTokenizer;
use I18N qw(bytesToString stringToBytes);
複製代碼
也就是新增插入第 02, 05, 06 行
修改(2).
先找到「my %packets = (」字串,
原程式碼
my %packets = (
'006D' => ['character_creation_successful', 'a4 V9 v V2 v14 Z24 C6 v2', [qw(charID exp zeny exp_job lv_job opt1 opt2 option stance manner points_free hp hp_max sp sp_max walk_speed type hair_style weapon lv points_skill lowhead shield tophead midhead hair_color clothes_color name str agi vit int dex luk slot renameflag)]],
'0097' => ['private_message', 'v Z28 Z*', [qw(len privMsgUser privMsg)]],
'097A' => ['quest_all_list2', 'v3 a*', [qw(len count unknown message)]],
);
複製代碼
修改成
my %packets = (
'006D' => ['character_creation_successful', 'a4 V9 v V2 v14 Z24 C6 v2', [qw(charID exp zeny exp_job lv_job opt1 opt2 option stance manner points_free hp hp_max sp sp_max walk_speed type hair_style weapon lv points_skill lowhead shield tophead midhead hair_color clothes_color name str agi vit int dex luk slot renameflag)]],
'0097' => ['private_message', 'v Z28 Z*', [qw(len privMsgUser privMsg)]],
'097A' => ['quest_all_list2', 'v3 a*', [qw(len count unknown message)]],
'082D' => ['received_characters_info', 'x2 C5 x20', [qw(normal_slot premium_slot billing_slot producible_slot valid_slot)]],
'09A0' => ['unknown_09A0', 'a4', [qw(unknown)]],
'099D' => ['received_characters', 'v a*', [qw(len charInfo)]],
'08B9' => ['account_id', 'x4 a4 x2', [qw(accountID)]], # 12
);
複製代碼
也就是新增插入第 05 ~ 08 行
修改(3).
先找到「my %handlers = qw(」字串,
原程式碼
my %handlers = qw(
actor_moved 0856
actor_exists 0857
actor_connected 0858
account_id 0283
received_characters 082D
);
複製代碼
修改成
my %handlers = qw(
actor_moved 0856
actor_exists 0857
actor_connected 0858
account_id 08B9
received_characters 099D
);
複製代碼
也就是修改第 05 的「08B9」和第 06 行的「099D」
修改(4).
先找到程式檔最底下的「1;」字串,
原程式碼
}
1;
複製代碼
修改成
}
sub unknown_09A0 {
$messageSender->sendToServer($messageSender->reconstruct({switch => 'unknown_09A1'}));
}
sub received_characters_info {
my ($self, $args) = @_;
Scalar::Util::weaken(my $weak = $self);
my $timeout = {timeout => 6, time => time};
$self->{charSelectTimeoutHook} = Plugins::addHook('Network::serverConnect/special' => sub {
if ($weak && timeOut($timeout)) {
$weak->received_characters({charInfo => '', RAW_MSG_SIZE => 4});
}
});
$self->{charSelectHook} = Plugins::addHook(charSelectScreen => sub {
if ($weak) {
Plugins::delHook(delete $weak->{charSelectTimeoutHook}) if $weak->{charSelectTimeoutHook};
}
});
$timeout{charlogin}{time} = time;
$self->received_characters($args);
}
1;
複製代碼
也就是新增插入第 02 ~ 28 行
5. 修改 src/Network/Send/twRO.pm
先找到「my %packets = (」字串,
原程式碼
my %packets = (
'0819' => ['buy_bulk_buyer', 'x2 a4 a4 v a*', [qw(buyerID buyingStoreID zeny itemInfo)]],
);
複製代碼
修改成
my %packets = (
'0819' => ['buy_bulk_buyer', 'x2 a4 a4 v a*', [qw(buyerID buyingStoreID zeny itemInfo)]],
'09A1' => ['unknown_09A1'],
);
複製代碼
也就是新增插入第 03 行
神人已解 目前還有小問題
腳色只會顯示出3隻 還在修改當中
轉貼至仙境傳說外掛研究網 |