* Fixed TELEPORT_ACK opcode

* Hacky fix to strange bug in MapMgr which prevented map loading in a x64 environment
This commit is contained in:
shlainn 2010-03-04 21:11:55 +00:00
parent 7882f809d3
commit 6517eb6a47
2 changed files with 7 additions and 3 deletions

View File

@ -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);
}
}

View File

@ -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);