diff --git a/src/egs_game.erl b/src/egs_game.erl index 4f44745..7954d6b 100644 --- a/src/egs_game.erl +++ b/src/egs_game.erl @@ -136,7 +136,7 @@ char_select_handle(16#020b, CSocket, GID, Version, Orig) -> char_select_handle(16#0d02, CSocket, GID, Version, Orig) -> log(GID, "character creation"), User = egs_db:users_select(GID), - [{number, Number}, {char, Char}] = egs_proto:parse_character_create(Orig), + << _:352, Number:32/little-unsigned-integer, Char/bits >> = Orig, _ = file:make_dir(io_lib:format("save/~s", [User#users.folder])), file:write_file(io_lib:format("save/~s/~b-character", [User#users.folder, Number]), Char), file:write_file(io_lib:format("save/~s/~b-character.options", [User#users.folder, Number]), << 0:192 >>), diff --git a/src/egs_proto.erl b/src/egs_proto.erl index 2bf064b..ca2da46 100644 --- a/src/egs_proto.erl +++ b/src/egs_proto.erl @@ -119,12 +119,6 @@ packet_split(Packet, Result) -> end end. -%% @doc Parse a character creation command. Return the character number and data. - -parse_character_create(Packet) -> - << _:352, Number:32/little-unsigned-integer, Char/bits >> = Packet, - [{number, Number}, {char, Char}]. - %% @doc Parse a character selection command. Return the selected character's number. parse_character_select(Packet) ->