diff --git a/src/egs_game.erl b/src/egs_game.erl index 9a00c68..56591d9 100644 --- a/src/egs_game.erl +++ b/src/egs_game.erl @@ -266,7 +266,7 @@ event({counter_enter, CounterID, FromZoneID, FromMapID, FromEntryID}, State=#sta lists:foreach(fun(Other) -> Other#egs_user_model.pid ! {egs, player_unspawn, User} end, UnspawnList), %% load counter psu_proto:send_0c00(User), - psu_proto:send_020e(User, QuestFile), + psu_proto:send_020e(QuestFile, State), psu_proto:send_0a05(User), psu_proto:send_010d(User#egs_user_model{lid=0}, State), psu_game:send_0200(mission), diff --git a/src/psu/psu_game.erl b/src/psu/psu_game.erl index e6e99ae..c28d286 100644 --- a/src/psu/psu_game.erl +++ b/src/psu/psu_game.erl @@ -145,7 +145,7 @@ area_load(AreaType, IsStart, SetID, OldUser, User, QuestFile, ZoneFile, AreaName if QuestChange =:= true -> % load new quest psu_proto:send_0c00(User), - psu_proto:send_020e(User, QuestFile); + psu_proto:send_020e(QuestFile, State); true -> ignore end, if IsStart =:= true -> diff --git a/src/psu/psu_proto.erl b/src/psu/psu_proto.erl index 6e902b3..2414d7d 100644 --- a/src/psu/psu_proto.erl +++ b/src/psu/psu_proto.erl @@ -1207,10 +1207,10 @@ send_020c(#state{socket=Socket}) -> packet_send(Socket, << 16#020c0200:32, 16#ffff0000:32, 0:256 >>). %% @doc Send the quest file to be loaded by the client. -send_020e(DestUser, Filename) -> +send_020e(Filename, #state{socket=Socket}) -> {ok, File} = file:read_file(Filename), Size = byte_size(File), - packet_send(DestUser#egs_user_model.socket, << 16#020e0300:32, 16#ffff:16, 0:272, Size:32/little, 0:32, File/binary, 0:32 >>). + packet_send(Socket, << 16#020e0300:32, 16#ffff:16, 0:272, Size:32/little, 0:32, File/binary, 0:32 >>). %% @todo No idea what this is doing. send_0215(DestUser, UnknownValue) ->