psu_game: Small improvements to send_0201 based on research.
This commit is contained in:
parent
111d37f0a1
commit
28bb2f92cb
@ -1152,12 +1152,19 @@ send_0200(ZoneType) ->
|
|||||||
%% @todo Handle LID correctly (should be ffffffff for self? yet LID should be 16 bits).
|
%% @todo Handle LID correctly (should be ffffffff for self? yet LID should be 16 bits).
|
||||||
send_0201(User) ->
|
send_0201(User) ->
|
||||||
GID = get(gid),
|
GID = get(gid),
|
||||||
|
CharTypeID = case (User#egs_user_model.character)#characters.type of
|
||||||
|
npc -> 16#00001d00;
|
||||||
|
_ -> 16#00001200
|
||||||
|
end,
|
||||||
CharGID = User#egs_user_model.id,
|
CharGID = User#egs_user_model.id,
|
||||||
CharBin = psu_characters:character_user_to_binary(User),
|
CharBin = psu_characters:character_user_to_binary(User),
|
||||||
IsGM = 0,
|
IsGM = 0,
|
||||||
OnlineStatus = 0,
|
OnlineStatus = 0,
|
||||||
GameVersion = 0,
|
GameVersion = case (User#egs_user_model.character)#characters.type of
|
||||||
send(<< 16#02010300:32, 0:32, 16#00001200:32, CharGID:32/little-unsigned-integer, 0:64, 16#00011300:32,
|
npc -> 255;
|
||||||
|
_ -> 0
|
||||||
|
end,
|
||||||
|
send(<< 16#02010300:32, 0:32, CharTypeID:32, CharGID:32/little-unsigned-integer, 0:64, 16#00011300:32,
|
||||||
GID:32/little-unsigned-integer, 0:64, CharBin/binary, IsGM:8, 0:8, OnlineStatus:8, GameVersion:8, 0:608 >>).
|
GID:32/little-unsigned-integer, 0:64, CharBin/binary, IsGM:8, 0:8, OnlineStatus:8, GameVersion:8, 0:608 >>).
|
||||||
|
|
||||||
%% @doc Hello packet, always sent on client connection.
|
%% @doc Hello packet, always sent on client connection.
|
||||||
|
Loading…
Reference in New Issue
Block a user