From 11a15f6d900f2c2e1eea992309530ae0580fb67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Fri, 4 Jun 2010 19:21:59 +0200 Subject: [PATCH] proto: Fix send_map for conformance. It doesn't need the quest id either. --- src/egs_game.erl | 10 +++++----- src/egs_proto.erl | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/egs_game.erl b/src/egs_game.erl index 061b86a..3ca661d 100644 --- a/src/egs_game.erl +++ b/src/egs_game.erl @@ -220,7 +220,7 @@ counter_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) -> % 010d egs_proto:send_zone_init(CSocket, GID, counter), 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), % 0215 0215 020c 1202 1204 1206 1207 egs_proto:send_load_quest(CSocket, GID), @@ -253,7 +253,7 @@ lobby_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) -> % 010d egs_proto:send_zone_init(CSocket, GID, lobby), 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), % 020c egs_proto:send_load_quest(CSocket, GID), @@ -285,7 +285,7 @@ mission_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) -> % 010d egs_proto:send_zone_init(CSocket, GID, mission), 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), % 0215 0215 egs_proto:send_trial_start(CSocket, GID), @@ -337,7 +337,7 @@ myroom_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) -> % 010d egs_proto:send_zone_init(CSocket, GID, myroom), 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"), % 130e(a) 130e(b) 1202 1204 1206 egs_proto:send_load_quest(CSocket, GID), @@ -372,7 +372,7 @@ spaceport_load(CSocket, GID, Quest, MapType, MapNumber, MapEntry) -> send_packet_0a05(CSocket, GID), egs_proto:send_zone_init(CSocket, GID, spaceport), 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), % 020c send_packet_201(CSocket, GID, User, Char), diff --git a/src/egs_proto.erl b/src/egs_proto.erl index 7184a00..d4af61f 100644 --- a/src/egs_proto.erl +++ b/src/egs_proto.erl @@ -238,9 +238,10 @@ send_location(CSocket, GID, Quest, MapType, MapNumber, Location) -> packet_send(CSocket, << Packet/binary, 0:PaddingSize, 1:32/little-unsigned-integer >>). %% @doc Send the map ID to be loaded by the client. +%% @todo Last two values are unknown. -send_map(CSocket, Quest, MapType, MapNumber, MapEntry) -> - Packet = << 16#0205:16, 0:304, Quest:32/little-unsigned-integer, MapType:32/little-unsigned-integer, +send_map(CSocket, MapType, MapNumber, MapEntry) -> + 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 >>, packet_send(CSocket, Packet).