proto: Fix send_map for conformance. It doesn't need the quest id either.

This commit is contained in:
Loïc Hoguin 2010-06-04 19:21:59 +02:00
parent 7e17c02ad3
commit 11a15f6d90
2 changed files with 8 additions and 7 deletions

View File

@ -220,7 +220,7 @@ counter_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) ->
% 010d % 010d
egs_proto:send_zone_init(CSocket, GID, counter), egs_proto:send_zone_init(CSocket, GID, counter),
egs_proto:send_zone(CSocket, ZoneFile), egs_proto:send_zone(CSocket, ZoneFile),
egs_proto:send_map(CSocket, Quest, MapType, MapNumber, MapEntry), egs_proto:send_map(CSocket, MapType, MapNumber, MapEntry),
egs_proto:send_location(CSocket, GID, Quest, MapType, MapNumber, AreaName), egs_proto:send_location(CSocket, GID, Quest, MapType, MapNumber, AreaName),
% 0215 0215 020c 1202 1204 1206 1207 % 0215 0215 020c 1202 1204 1206 1207
egs_proto:send_load_quest(CSocket, GID), egs_proto:send_load_quest(CSocket, GID),
@ -253,7 +253,7 @@ lobby_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) ->
% 010d % 010d
egs_proto:send_zone_init(CSocket, GID, lobby), egs_proto:send_zone_init(CSocket, GID, lobby),
egs_proto:send_zone(CSocket, ZoneFile), egs_proto:send_zone(CSocket, ZoneFile),
egs_proto:send_map(CSocket, Quest, MapType, MapNumber, MapEntry), egs_proto:send_map(CSocket, MapType, MapNumber, MapEntry),
egs_proto:send_location(CSocket, GID, Quest, MapType, MapNumber, AreaName), egs_proto:send_location(CSocket, GID, Quest, MapType, MapNumber, AreaName),
% 020c % 020c
egs_proto:send_load_quest(CSocket, GID), egs_proto:send_load_quest(CSocket, GID),
@ -285,7 +285,7 @@ mission_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) ->
% 010d % 010d
egs_proto:send_zone_init(CSocket, GID, mission), egs_proto:send_zone_init(CSocket, GID, mission),
egs_proto:send_zone(CSocket, ZoneFile), egs_proto:send_zone(CSocket, ZoneFile),
egs_proto:send_map(CSocket, Quest, MapType, MapNumber, MapEntry), egs_proto:send_map(CSocket, MapType, MapNumber, MapEntry),
egs_proto:send_location(CSocket, GID, Quest, MapType, MapNumber, AreaName), egs_proto:send_location(CSocket, GID, Quest, MapType, MapNumber, AreaName),
% 0215 0215 % 0215 0215
egs_proto:send_trial_start(CSocket, GID), egs_proto:send_trial_start(CSocket, GID),
@ -337,7 +337,7 @@ myroom_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) ->
% 010d % 010d
egs_proto:send_zone_init(CSocket, GID, myroom), egs_proto:send_zone_init(CSocket, GID, myroom),
egs_proto:send_zone(CSocket, ZoneFile), egs_proto:send_zone(CSocket, ZoneFile),
egs_proto:send_map(CSocket, Quest, MapType, MapNumber, MapEntry), egs_proto:send_map(CSocket, MapType, MapNumber, MapEntry),
myroom_send_packet(CSocket, "p/packet1332.bin"), myroom_send_packet(CSocket, "p/packet1332.bin"),
% 130e(a) 130e(b) 1202 1204 1206 % 130e(a) 130e(b) 1202 1204 1206
egs_proto:send_load_quest(CSocket, GID), egs_proto:send_load_quest(CSocket, GID),
@ -372,7 +372,7 @@ spaceport_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) ->
send_packet_0a05(CSocket, GID), send_packet_0a05(CSocket, GID),
egs_proto:send_zone_init(CSocket, GID, spaceport), egs_proto:send_zone_init(CSocket, GID, spaceport),
egs_proto:send_zone(CSocket, ZoneFile), egs_proto:send_zone(CSocket, ZoneFile),
egs_proto:send_map(CSocket, Quest, MapType, MapNumber, MapEntry), egs_proto:send_map(CSocket, MapType, MapNumber, MapEntry),
egs_proto:send_location(CSocket, GID, Quest, MapType, MapNumber, AreaName), egs_proto:send_location(CSocket, GID, Quest, MapType, MapNumber, AreaName),
% 020c % 020c
send_packet_201(CSocket, GID, User, Char), send_packet_201(CSocket, GID, User, Char),

View File

@ -238,9 +238,10 @@ send_location(CSocket, GID, Quest, MapType, MapNumber, Location) ->
packet_send(CSocket, << Packet/binary, 0:PaddingSize, 1:32/little-unsigned-integer >>). packet_send(CSocket, << Packet/binary, 0:PaddingSize, 1:32/little-unsigned-integer >>).
%% @doc Send the map ID to be loaded by the client. %% @doc Send the map ID to be loaded by the client.
%% @todo Last two values are unknown.
send_map(CSocket, Quest, MapType, MapNumber, MapEntry) -> send_map(CSocket, MapType, MapNumber, MapEntry) ->
Packet = << 16#0205:16, 0:304, Quest:32/little-unsigned-integer, MapType:32/little-unsigned-integer, Packet = << 16#02050300:32, 0:288, 16#ffffffff:32, MapType:32/little-unsigned-integer,
MapNumber:32/little-unsigned-integer, MapEntry:32/little-unsigned-integer, 0:64 >>, MapNumber:32/little-unsigned-integer, MapEntry:32/little-unsigned-integer, 0:64 >>,
packet_send(CSocket, Packet). packet_send(CSocket, Packet).