psu_proto: Move send_022c to psu_proto without reviewing it.

This commit is contained in:
Loïc Hoguin 2011-02-26 17:38:07 +01:00
parent 19350ba1ff
commit 5f0bd73303
3 changed files with 9 additions and 8 deletions

View File

@ -277,7 +277,7 @@ event({counter_enter, CounterID, FromZoneID, FromMapID, FromEntryID}, Client=#cl
psu_proto:send_0a06(User, Client2),
case User#users.partypid of
undefined -> ignore;
_ -> psu_game:send_022c(0, 16#12)
_ -> psu_proto:send_022c(0, 16#12, Client)
end,
Client3 = Client2#client{areanb=Client2#client.areanb + 1},
psu_proto:send_0208(Client3),
@ -482,13 +482,13 @@ event({npc_force_invite, NPCid}, Client=#client{gid=GID}) ->
psu_proto:send_0201(SentNPCUser, Client),
psu_proto:send_0215(0, Client),
psu_game:send_0a04(SentNPCUser#users.gid),
psu_game:send_022c(0, 16#12),
psu_proto:send_022c(0, 16#12, Client),
psu_game:send_1004(npc_mission, SentNPCUser, PartyPos),
psu_game:send_100f((SentNPCUser#users.character)#characters.npcid, PartyPos),
psu_game:send_1601(PartyPos);
%% @todo Also at the end send a 101a (NPC:16, PartyPos:16, ffffffff). Not sure about PartyPos.
event({npc_invite, NPCid}, #client{gid=GID}) ->
event({npc_invite, NPCid}, Client=#client{gid=GID}) ->
{ok, User} = egs_users:read(GID),
%% Create NPC.
log("invited npcid ~b", [NPCid]),
@ -497,7 +497,7 @@ event({npc_invite, NPCid}, #client{gid=GID}) ->
case User#users.partypid of
undefined ->
{ok, PartyPid} = psu_party:start_link(GID),
psu_game:send_022c(0, 16#12);
psu_proto:send_022c(0, 16#12, Client);
PartyPid ->
ignore
end,

View File

@ -169,10 +169,6 @@ send_0113() ->
GID = get(gid),
send(<< 16#01130300:32, 0:64, GID:32/little, 0:64, 16#00011300:32, GID:32/little, 0:64, GID:32/little, File/binary >>).
%% @todo No idea!
send_022c(A, B) ->
send(<< (header(16#022c))/binary, A:16/little, B:16/little >>).
%% @todo Force send a new player location. Used for warps.
%% @todo The value before IntDir seems to be the player's current animation. 01 stand up, 08 ?, 17 normal sit
send_0503({PrevX, PrevY, PrevZ, _AnyDir}) ->

View File

@ -1382,6 +1382,11 @@ send_0228(Type, Duration, Message, #client{socket=Socket, gid=DestGID}) ->
packet_send(Socket, << 16#02280300:32, 16#ffff:16, 0:144, 16#00011300:32, DestGID:32/little, 0:64,
TypeInt:32/little, Duration:32/little, UCS2Message/binary, 0:16 >>).
%% @todo No idea!
%% @todo This packet hasn't been reviewed at all yet.
send_022c(A, B, #client{socket=Socket, gid=DestGID}) ->
packet_send(Socket, << 16#022c0300:32, 0:160, 16#00011300:32, DestGID:32/little, 0:64, A:16/little, B:16/little >>).
%% @todo Not sure. Sent when going to or from room. Possibly when changing universes too?
send_0230(#client{socket=Socket, gid=DestGID}) ->
packet_send(Socket, << 16#02300300:32, 16#ffff:16, 0:16, 16#00011300:32, DestGID:32/little, 0:64, 16#00011300:32, DestGID:32/little, 0:64 >>).