psu_proto: Review 0216 and move it to psu_proto.

This commit is contained in:
Loïc Hoguin 2010-09-20 00:53:06 +02:00
parent 6b8597c506
commit 83344214f7
2 changed files with 5 additions and 4 deletions

View File

@ -71,10 +71,7 @@ event({system_client_version_info, _Entrance, _Language, _Platform, Version}, #s
%% Game server info request handler.
%% @todo Remove the dependency on network.hrl through configuration files.
event(system_game_server_request, #state{socket=Socket, gid=GID}) ->
IP = ?GAME_IP,
Port = ?GAME_PORT,
Packet = << 16#02160300:32, 0:192, GID:32/little-unsigned-integer, 0:64, IP/binary, Port:32/little-unsigned-integer >>,
psu_proto:packet_send(Socket, Packet),
psu_proto:send_0216(Socket, GID, ?GAME_IP, ?GAME_PORT),
ssl:close(Socket),
closed;

View File

@ -1220,6 +1220,10 @@ send_0215(DestUser, UnknownValue) ->
#egs_user_model{socket=CSocket, id=GID, lid=LID} = DestUser,
packet_send(CSocket, << 16#02150300:32, LID:16/little, 0:144, 16#00011300:32, GID:32/little, 0:64, UnknownValue:32/little >>).
%% @doc Send the game server's IP and port that the client requested.
send_0216(DestSocket, SessionID, IP, Port) ->
packet_send(DestSocket, << 16#02160300:32, 16#ffff:16, 0:144, 16#00000f00:32, SessionID:32/little, 0:64, IP/binary, Port:16/little, 0:16 >>).
%% @todo Inventory related. Doesn't seem to do anything.
send_0a05(DestUser) ->
#egs_user_model{socket=CSocket, id=GID, lid=LID} = DestUser,