psu_proto: Move counter_background_locations_request to events.
This commit is contained in:
parent
ac624b34c6
commit
fe280b93e3
@ -555,6 +555,10 @@ event({chat, _FromTypeID, FromGID, _FromName, Modifiers, ChatMsg}) ->
|
||||
{ok, List} = egs_user_model:select(all),
|
||||
lists:foreach(fun(X) -> X#egs_user_model.pid ! {psu_chat, BcastTypeID, BcastGID, BcastName, Modifiers, ChatMsg} end, List);
|
||||
|
||||
%% @todo There's at least 9 different sets of locations. Handle all of them correctly.
|
||||
event(counter_background_locations_request) ->
|
||||
send_170c();
|
||||
|
||||
%% @todo Make sure non-mission counters follow the same loading process.
|
||||
%% @todo Probably validate the From* values, to not send the player back inside a mission.
|
||||
event({counter_enter, CounterID, FromZoneID, FromMapID, FromEntryID}) ->
|
||||
@ -1059,10 +1063,6 @@ handle(16#1216, Data) ->
|
||||
log("command 1216 with value ~b", [Value]),
|
||||
send_1216(Value);
|
||||
|
||||
%% @doc Counter-related handler.
|
||||
handle(16#170b, _) ->
|
||||
send_170c();
|
||||
|
||||
%% @doc Unknown command handler. Do nothing.
|
||||
handle(Command, _) ->
|
||||
log("dismissed packet ~4.16.0b", [Command]).
|
||||
|
@ -757,6 +757,21 @@ parse(Size, 16#1709, Channel, Data) ->
|
||||
?ASSERT_EQ(VarI, 0),
|
||||
counter_party_options_request;
|
||||
|
||||
parse(Size, 16#170b, Channel, Data) ->
|
||||
<< _LID:16/little, VarA:16/little, VarB:32/little, VarC:32/little, VarD:32/little, VarE:32/little, VarF:32/little, VarG:32/little, VarH:32/little, VarI:32/little >> = Data,
|
||||
?ASSERT_EQ(Size, 44),
|
||||
?ASSERT_EQ(Channel, 2),
|
||||
?ASSERT_EQ(VarA, 0),
|
||||
?ASSERT_EQ(VarB, 0),
|
||||
?ASSERT_EQ(VarC, 0),
|
||||
?ASSERT_EQ(VarD, 0),
|
||||
?ASSERT_EQ(VarE, 0),
|
||||
?ASSERT_EQ(VarF, 0),
|
||||
?ASSERT_EQ(VarG, 0),
|
||||
?ASSERT_EQ(VarH, 0),
|
||||
?ASSERT_EQ(VarI, 0),
|
||||
counter_background_locations_request;
|
||||
|
||||
parse(Size, 16#1710, Channel, Data) ->
|
||||
<< _LID:16/little, VarA:16/little, VarB:32/little, VarC:32/little, VarD:32/little, VarE:32/little,
|
||||
VarF:32/little, VarG:32/little, VarH:32/little, VarI:32/little, CounterID:32/little >> = Data,
|
||||
|
Loading…
Reference in New Issue
Block a user