psu_proto: Review and move send_1500 to psu_proto.
This commit is contained in:
parent
a86e4caf0d
commit
26d5763df3
@ -35,7 +35,7 @@ char_load(User, State) ->
|
||||
psu_proto:send_1006(12, State),
|
||||
psu_proto:send_0210(State),
|
||||
psu_proto:send_0222(User#egs_user_model.uni, State),
|
||||
send_1500(User),
|
||||
psu_proto:send_1500(User#egs_user_model.character, State),
|
||||
send_1501(),
|
||||
send_1512(),
|
||||
%% 0303
|
||||
@ -535,17 +535,6 @@ send_1332() ->
|
||||
{ok, << _Size:32, Packet/bits >>} = file:read_file("p/packet1332.bin"),
|
||||
send(Packet).
|
||||
|
||||
%% @doc Send the player's partner card.
|
||||
%% @todo Find out the remaining values.
|
||||
send_1500(User) ->
|
||||
GID = User#egs_user_model.id,
|
||||
#characters{slot=Slot, name=Name, race=Race, gender=Gender, class=Class} = User#egs_user_model.character,
|
||||
RaceBin = psu_characters:race_atom_to_binary(Race),
|
||||
GenderBin = psu_characters:gender_atom_to_binary(Gender),
|
||||
ClassBin = psu_characters:class_atom_to_binary(Class),
|
||||
send(<< 16#15000300:32, 16#ffff:16, 0:144, 16#00011300:32, GID:32/little, 0:64,
|
||||
Name/binary, RaceBin:8, GenderBin:8, ClassBin:8, 0:40, GID:32/little, 0:3040, 16#010401:24, Slot:8, 0:64 >>).
|
||||
|
||||
%% @todo Send an empty partner card list.
|
||||
send_1501() ->
|
||||
GID = get(gid),
|
||||
|
@ -1512,6 +1512,22 @@ send_1022(#egs_user_model{character=#characters{currenthp=HP}}, #state{socket=So
|
||||
send_1204(#state{socket=Socket, gid=DestGID}) ->
|
||||
packet_send(Socket, << 16#12040300:32, 0:160, 16#00011300:32, DestGID:32/little, 0:96, 16#20000000:32, 0:256 >>).
|
||||
|
||||
%% @doc Send the player's partner card.
|
||||
%% @todo Handle the LID and comment properly.
|
||||
send_1500(Character, #state{socket=Socket, gid=DestGID}) ->
|
||||
#characters{slot=Slot, name=Name, race=Race, gender=Gender, class=Class, appearance=Appearance} = Character,
|
||||
case Appearance of
|
||||
#flesh_appearance{voicetype=VoiceType, voicepitch=VoicePitch} -> ok;
|
||||
#metal_appearance{voicetype=VoiceType, voicepitch=VoicePitch} -> ok
|
||||
end,
|
||||
RaceBin = psu_characters:race_atom_to_binary(Race),
|
||||
GenderBin = psu_characters:gender_atom_to_binary(Gender),
|
||||
ClassBin = psu_characters:class_atom_to_binary(Class),
|
||||
Comment = << 0:2816 >>,
|
||||
packet_send(Socket, << 16#15000300:32, 16#ffff:16, 0:144, 16#00011300:32, DestGID:32/little, 0:64,
|
||||
Name/binary, RaceBin:8, GenderBin:8, ClassBin:8, VoiceType:8, VoicePitch:8, 0:24,
|
||||
DestGID:32/little, 0:224, Comment/binary, 1, 4, 1, Slot, 0:64 >>).
|
||||
|
||||
%% @doc Send the background to use for the counter.
|
||||
%% @todo Handle LID properly.
|
||||
send_1711(Bg, #state{socket=Socket, gid=DestGID}) ->
|
||||
|
Loading…
Reference in New Issue
Block a user