Fixed: .namego summon on mangos servers works now with PseuW@W, but still a animation bug to fix.

Fixed: The logfile now properly gets closed upon exit.
This commit is contained in:
Mini 2007-01-12 16:43:37 +00:00
parent f93fd5e246
commit ffc3096a0d
5 changed files with 31 additions and 0 deletions

View File

@ -64,6 +64,7 @@ PseuInstance::~PseuInstance()
delete _conf; delete _conf;
//delete _rsession; // deleted by SocketHandler!!!!! //delete _rsession; // deleted by SocketHandler!!!!!
delete _wsession; delete _wsession;
log_close();
} }

View File

@ -153,6 +153,8 @@ OpcodeHandler *WorldSession::_GetOpcodeHandlerTable() const
{MSG_MOVE_HEARTBEAT, &WorldSession::_HandleMovementOpcode}, {MSG_MOVE_HEARTBEAT, &WorldSession::_HandleMovementOpcode},
{MSG_MOVE_FALL_LAND, &WorldSession::_HandleMovementOpcode}, {MSG_MOVE_FALL_LAND, &WorldSession::_HandleMovementOpcode},
{MSG_MOVE_TELEPORT_ACK, &WorldSession::_HandleTelePortAckOpcode},
// table termination // table termination
{ 0, NULL } { 0, NULL }
}; };
@ -492,4 +494,24 @@ void WorldSession::_HandleMovementOpcode(WorldPacket& recvPacket)
// SendWorldPacket(opcode,&bb); // SendWorldPacket(opcode,&bb);
//} //}
// more to come // more to come
}
void WorldSession::_HandleTelePortAckOpcode(WorldPacket& recvPacket)
{
uint8 unk;
uint16 unk1, unk2;
uint32 unk3, unk4;
uint64 guid;
float x, y, z, o, ang;
recvPacket >> unk >> guid >> unk3 >> unk1 >> unk2 >> o >> x >> y >> z >> ang >> unk4;
//printf("DEBUG: Got teleport, data: x: %f, y: %f, z: %f, o: %f, guid: %d\n", x, y, z, o, guid);
// TODO: Still bugs with animation
WorldPacket response;
response.SetOpcode(MSG_MOVE_FALL_LAND);
response << uint32(0) << uint32(0) << x << y << z << o << uint32(0);
SendWorldPacket(response);
} }

View File

@ -76,6 +76,8 @@ private:
void _HandleTradeStatusOpcode(WorldPacket& recvPacket); void _HandleTradeStatusOpcode(WorldPacket& recvPacket);
void _HandleGroupInviteOpcode(WorldPacket& recvPacket); void _HandleGroupInviteOpcode(WorldPacket& recvPacket);
void _HandleTelePortAckOpcode(WorldPacket& recvPacket);
PseuInstance *_instance; PseuInstance *_instance;
WorldSocket *_socket; WorldSocket *_socket;

View File

@ -81,4 +81,9 @@ void logdebug(const char *str, ...)
} }
fflush(stdout); fflush(stdout);
} }
void log_close()
{
fclose(logfile);
}

View File

@ -7,6 +7,7 @@ void log_prepare(char *fn, PseuInstance* p);
void log(const char *str, ...); void log(const char *str, ...);
void logdetail(const char *str, ...); void logdetail(const char *str, ...);
void logdebug(const char *str, ...); void logdebug(const char *str, ...);
void log_close();
#endif #endif