game: Correct lobby pack file selection support.
This makes all other counters disconnect you because they don't exist!
This commit is contained in:
parent
b8baa0d461
commit
b1f76e4bc8
@ -108,9 +108,13 @@
|
||||
{ [1104000,0,900], [{type, spaceport}, {name, "Spaceport"}, {quest, "data/lobby/spaceport.quest.nbl"}, {zone, "data/lobby/spaceport.zone.nbl"}, {entries, [0]}] }
|
||||
]).
|
||||
|
||||
%% EGS counters settings. Associate counter QuestID with the QuestID and ZoneID of the lobby containing the counter.
|
||||
%% EGS counters settings.
|
||||
|
||||
-define(COUNTERS, [
|
||||
{ 10497, [1100000, 0] }, % Colony 4th Floor
|
||||
{ 731394, [1100000,11] } % Colony 3rd, Lumilass
|
||||
% Colony mission counters
|
||||
{ 10497, [{lobby, [1100000, 0]}, {data, [
|
||||
{0, "data/missions/colony.counter.ll.pack"}
|
||||
]}] },
|
||||
% Lumilass
|
||||
{ 731394, [{lobby, [1100000,11]}, {data, none}] }
|
||||
]).
|
||||
|
@ -627,7 +627,7 @@ handle(16#0811, CSocket, GID, _, Orig) ->
|
||||
|
||||
handle(16#0812, CSocket, GID, _, _) ->
|
||||
User = egs_db:users_select(GID),
|
||||
[QuestID, ZoneID] = proplists:get_value(User#users.quest, ?COUNTERS, [1100000, 0]),
|
||||
[{lobby, [QuestID, ZoneID]}, {data, _}] = proplists:get_value(User#users.quest, ?COUNTERS, [1100000, 0]),
|
||||
lobby_load(CSocket, GID, QuestID, ZoneID, User#users.maptype, User#users.mapnumber);
|
||||
|
||||
%% @doc Start mission handler.
|
||||
@ -646,8 +646,11 @@ handle(16#0c01, CSocket, GID, _, Orig) ->
|
||||
%% @doc Counter quests files request handler? Send huge number of quest files.
|
||||
%% @todo Handle correctly.
|
||||
|
||||
handle(16#0c05, CSocket, _, _, _) ->
|
||||
{ok, << File/bits >>} = file:read_file("data/missions/colony.counter.ll.pack"),
|
||||
handle(16#0c05, CSocket, GID, _, _) ->
|
||||
User = egs_db:users_select(GID),
|
||||
[{lobby, _}, {data, Data}] = proplists:get_value(User#users.quest, ?COUNTERS),
|
||||
Filename = proplists:get_value(User#users.mapentry, Data),
|
||||
{ok, << File/bits >>} = file:read_file(Filename),
|
||||
Packet = << 16#0c060300:32, 0:288, 1:32/little-unsigned-integer, File/binary, 0:32 >>,
|
||||
egs_proto:packet_send(CSocket, Packet);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user