diff --git a/src/Client/World/MapMgr.cpp b/src/Client/World/MapMgr.cpp index 868cb8c..842cca6 100644 --- a/src/Client/World/MapMgr.cpp +++ b/src/Client/World/MapMgr.cpp @@ -6,7 +6,7 @@ void MakeMapFilename(char *fn, uint32 m, uint32 x, uint32 y) { - sprintf(fn,"./data/maps/%lu_%lu_%lu.adt",m,x,y); + sprintf(fn,"./data/maps/%u_%u_%u.adt",(uint16)m,(uint16)x,(uint16)y); } bool TileExistsInFile(uint32 m, uint32 x, uint32 y) @@ -75,6 +75,7 @@ void MapMgr::_LoadNearTiles(uint32 gx, uint32 gy, uint32 m) { for(uint32 h = gx-1; h <= gx+1; h++) { + logdebug("MAPMGR: Loading tile x %u y %u on map %u",h,v,m); _LoadTile(h,v,m); } } diff --git a/src/Client/World/WorldSession.cpp b/src/Client/World/WorldSession.cpp index cfd3477..f63466f 100644 --- a/src/Client/World/WorldSession.cpp +++ b/src/Client/World/WorldSession.cpp @@ -1220,12 +1220,15 @@ void WorldSession::_HandleTelePortAckOpcode(WorldPacket& recvPacket) logdetail("Got teleported, data: x: %f, y: %f, z: %f, o: %f, guid: "I64FMT, x, y, z, o, guid); WorldPacket wp(MSG_MOVE_TELEPORT_ACK,8+4+4); - wp << guid << (uint32)0 << (uint32)getMSTime(); + //GUID must be packed! + wp.appendPackGUID(guid); + wp << (uint32)0 << (uint32)getMSTime(); SendWorldPacket(wp); // TODO: put this into a capsule class later, that autodetects movement flags etc. WorldPacket response(MSG_MOVE_FALL_LAND,4+2+4+4+4+4+4+4); - response << uint32(0) << (uint16)0 << (uint32)getMSTime(); // no flags; unk + response.appendPackGUID(guid); + response << uint32(0) << (uint16)0 << (uint32)getMSTime(); //flags and flags2 response << x << y << z << o << uint32(100); // simulate 100 msec fall time SendWorldPacket(response);