Review send_020e and move it to psu_proto.
This commit is contained in:
parent
597d51c0ee
commit
dfb8f691fb
@ -335,7 +335,7 @@ area_load(AreaType, IsStart, SetID, OldUser, User, QuestFile, ZoneFile, AreaName
|
||||
end,
|
||||
% load new quest
|
||||
psu_proto:send_0c00(User),
|
||||
send_020e(QuestFile);
|
||||
psu_proto:send_020e(User, QuestFile);
|
||||
true -> ignore
|
||||
end,
|
||||
if IsStart =:= true ->
|
||||
@ -588,7 +588,7 @@ event({counter_enter, CounterID, FromZoneID, FromMapID, FromEntryID}) ->
|
||||
lists:foreach(fun(Other) -> Other#egs_user_model.pid ! {psu_player_unspawn, User} end, UnspawnList),
|
||||
%% load counter
|
||||
psu_proto:send_0c00(User),
|
||||
send_020e(QuestFile),
|
||||
psu_proto:send_020e(User, QuestFile),
|
||||
psu_proto:send_0a05(User),
|
||||
send_010d(User#egs_user_model{lid=0}),
|
||||
send_0200(mission),
|
||||
@ -1180,13 +1180,6 @@ send_0208() ->
|
||||
send_020c() ->
|
||||
send(<< 16#020c020c:32, 16#fffff20c:32, 0:256 >>).
|
||||
|
||||
%% @doc Send the quest file to be loaded.
|
||||
%% @todo Probably should try sending the checksum like value (right before the file) and see if it magically fixes anything.
|
||||
send_020e(Filename) ->
|
||||
{ok, File} = file:read_file(Filename),
|
||||
Size = byte_size(File),
|
||||
send(<< 16#020e0300:32, 0:288, Size:32/little-unsigned-integer, 0:32, File/binary, 0:32 >>).
|
||||
|
||||
%% @doc Send the zone file to be loaded.
|
||||
send_020f(Filename, SetID, SeasonID) ->
|
||||
{ok, File} = file:read_file(Filename),
|
||||
|
@ -943,6 +943,12 @@ send_0205(DestUser, IsSeasonal) ->
|
||||
packet_send(CSocket, << 16#02050300:32, LID:16/little, 0:144, 16#00011300:32, GID:32/little, 0:64,
|
||||
16#ffffffff:32, ZoneID:32/little, MapID:32/little, EntryID:32/little, 1:32/little, 0:24, IsSeasonal:8 >>).
|
||||
|
||||
%% @doc Send the quest file to be loaded by the client.
|
||||
send_020e(DestUser, Filename) ->
|
||||
{ok, File} = file:read_file(Filename),
|
||||
Size = byte_size(File),
|
||||
packet_send(DestUser#egs_user_model.socket, << 16#020e0300:32, 16#ffff:16, 0:272, Size:32/little, 0:32, File/binary, 0:32 >>).
|
||||
|
||||
%% @todo Inventory related. Doesn't seem to do anything.
|
||||
send_0a05(DestUser) ->
|
||||
#egs_user_model{socket=CSocket, id=GID, lid=LID} = DestUser,
|
||||
|
Loading…
Reference in New Issue
Block a user