game: Counter options are data and should be separated (mission visible/not).

This commit is contained in:
Loïc Hoguin 2010-06-05 20:27:07 +02:00
parent b1f76e4bc8
commit 43b4f6b263
2 changed files with 6 additions and 4 deletions

View File

@ -113,7 +113,7 @@
-define(COUNTERS, [
% Colony mission counters
{ 10497, [{lobby, [1100000, 0]}, {data, [
{0, "data/missions/colony.counter.ll.pack"}
{0, [{filename, "data/missions/colony.counter.ll.pack"}, {options, << 16#01a92800:32, 3, 3, 0, 3, 3, 3, 3, 0, 0:40, 3, 3, 3, 3, 3, 0:176 >>}]}
]}] },
% Lumilass
{ 731394, [{lobby, [1100000,11]}, {data, none}] }

View File

@ -649,7 +649,7 @@ handle(16#0c01, CSocket, GID, _, Orig) ->
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),
[{filename, Filename}, {options, _}] = 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);
@ -672,9 +672,11 @@ handle(16#0c0e, CSocket, GID, _, _) ->
%% @todo Temporarily allow rare mission and LL all difficulties to all players.
handle(16#0c0f, CSocket, GID, _, _) ->
User = egs_db:users_select(GID),
[{lobby, _}, {data, Data}] = proplists:get_value(User#users.quest, ?COUNTERS),
[{filename, _}, {options, Options}] = proplists:get_value(User#users.mapentry, Data),
Packet = << 16#0c100300:32, 0:32, 16#00011300:32, GID:32/little-unsigned-integer, 0:64,
16#00011300:32, GID:32/little-unsigned-integer, 0:64, 16#01a92800:32, 3, 3, 0,
3, 3, 3, 3, 0, 0:40, 3, 3, 3, 3, 3, 0:176 >>,
16#00011300:32, GID:32/little-unsigned-integer, 0:64, Options/binary >>,
egs_proto:packet_send(CSocket, Packet);
%% @doc Set flag handler. Associate a new flag with the character.