proto: Remove parse_character_create.
This commit is contained in:
parent
b2cd15d055
commit
6d98ce6d73
@ -136,7 +136,7 @@ char_select_handle(16#020b, CSocket, GID, Version, Orig) ->
|
|||||||
char_select_handle(16#0d02, CSocket, GID, Version, Orig) ->
|
char_select_handle(16#0d02, CSocket, GID, Version, Orig) ->
|
||||||
log(GID, "character creation"),
|
log(GID, "character creation"),
|
||||||
User = egs_db:users_select(GID),
|
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: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", [User#users.folder, Number]), Char),
|
||||||
file:write_file(io_lib:format("save/~s/~b-character.options", [User#users.folder, Number]), << 0:192 >>),
|
file:write_file(io_lib:format("save/~s/~b-character.options", [User#users.folder, Number]), << 0:192 >>),
|
||||||
|
@ -119,12 +119,6 @@ packet_split(Packet, Result) ->
|
|||||||
end
|
end
|
||||||
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.
|
%% @doc Parse a character selection command. Return the selected character's number.
|
||||||
|
|
||||||
parse_character_select(Packet) ->
|
parse_character_select(Packet) ->
|
||||||
|
Loading…
Reference in New Issue
Block a user