From 529dc5cf08824a4578e911c9b30d2ba31e3191c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 4 Jun 2010 12:07:30 +0200 Subject: [PATCH] proto: Remove parse_lobby_change. --- src/egs_game.erl | 7 ++++--- src/egs_proto.erl | 7 ------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/egs_game.erl b/src/egs_game.erl index ff84503..21a5795 100644 --- a/src/egs_game.erl +++ b/src/egs_game.erl @@ -601,7 +601,8 @@ handle(16#0402, _, _, _, _) -> %% @todo Load 'Your room' correctly. handle(16#0807, CSocket, GID, _, Orig) -> - [{quest, Quest}, {maptype, MapType}, {mapnumber, MapNumber}, {mapentry, MapEntry}] = egs_proto:parse_lobby_change(Orig), + << _:352, Quest:32/little-unsigned-integer, MapType:16/little-unsigned-integer, + MapNumber:16/little-unsigned-integer, MapEntry:16/little-unsigned-integer, _/bits >> = Orig, log(GID, "lobby change (~b,~b,~b,~b)", [Quest,MapType, MapNumber, MapEntry]), case {Quest, MapType, MapNumber, MapEntry} of {1104000, 0, 900, 0} -> @@ -613,10 +614,10 @@ handle(16#0807, CSocket, GID, _, Orig) -> end; %% @doc Mission counter handler. -%% @todo Make the egs_proto function name more clear. This isn't a lobby! It's just the same format. handle(16#0811, CSocket, GID, _, Orig) -> - [{quest, Quest}, {maptype, MapType}, {mapnumber, MapNumber}, {mapentry, MapEntry}] = egs_proto:parse_lobby_change(Orig), + << _:352, Quest:32/little-unsigned-integer, MapType:16/little-unsigned-integer, + MapNumber:16/little-unsigned-integer, MapEntry:16/little-unsigned-integer, _/bits >> = Orig, log(GID, "mission counter (~b,~b,~b,~b)", [Quest,MapType, MapNumber, MapEntry]), counter_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry); diff --git a/src/egs_proto.erl b/src/egs_proto.erl index 12b1980..7cec9fe 100644 --- a/src/egs_proto.erl +++ b/src/egs_proto.erl @@ -131,13 +131,6 @@ parse_chat(_, Packet) -> << _:384, FromGID:32/unsigned-integer, Modifiers:128/bits, FromName:512/bits, Message/bits >> = Packet, [{gid, FromGID}, {name, FromName}, {modifiers, Modifiers}, {message, Message}]. -%% @doc Parse a lobby change command. - -parse_lobby_change(Packet) -> - << _:352, Quest:32/little-unsigned-integer, MapType:16/little-unsigned-integer, - MapNumber:16/little-unsigned-integer, MapEntry:16/little-unsigned-integer, _/bits >> = Packet, - [{quest, Quest}, {maptype, MapType}, {mapnumber, MapNumber}, {mapentry, MapEntry}]. - %% @doc Parse the options change command. Retrieve the options for saving. parse_options_change(Packet) ->