* fixed few bugs reported by FG

This commit is contained in:
bluma4862 2008-07-08 05:24:39 +00:00
parent 3086c09146
commit 76ed684573
4 changed files with 15 additions and 8 deletions

View File

@ -177,6 +177,13 @@ bool PseuInstance::InitGUI(void)
logerror("GUI: Aborting init, GUI already exists!");
return false;
}
if (!GetConf()->enablegui)
{
logdebug("GUI: Can't start, gui disabled in config");
return false;
}
uint16 x,y,depth;
uint8 driver;
bool shadows,vsync,win;

View File

@ -479,7 +479,6 @@ bool SCPDatabaseMgr::Compact(char *dbname, char *outfile, uint32 compression)
else
{
logdebug("SCP Compact: Unable to compress '%s' (too small?)",outfile);
return false;
}
}

View File

@ -946,7 +946,7 @@ void WorldSession::_HandleMovementOpcode(WorldPacket& recvPacket)
uint8 unk8;
guid = recvPacket.GetPackedGuid();
recvPacket >> flags >> unk8 >> time >> x >> y >> z >> o >> unk32;
DEBUG(logdebug("MOVE: "I64FMT" -> time=%u flags=%u x=%.4f y=%.4f z=%.4f o=%.4f",guid,time,flags,x,y,z,o));
DEBUG(logdebug("MOVE: "I64FMT" -> time=%u flags=0x%X x=%.4f y=%.4f z=%.4f o=%.4f",guid,time,flags,x,y,z,o));
Object *obj = objmgr.GetObj(guid);
if(obj && obj->IsWorldObject())
{
@ -1274,7 +1274,8 @@ void WorldSession::_HandleLoginVerifyWorldOpcode(WorldPacket& recvPacket)
ByteBuffer& operator>>(ByteBuffer& bb, WhoListEntry& e)
{
bb >> e.name >> e.gname >> e.level >> e.classId >> e.raceId >> e.zoneId;
uint8 dummy;
bb >> e.name >> e.gname >> e.level >> e.classId >> e.raceId >> dummy >> e.zoneId;
return bb;
}

View File

@ -23,7 +23,7 @@ void ZCompressor::_compress(void* dst, uint32 *dst_size, void* src, uint32 src_s
// default Z_BEST_SPEED (1)
if (Z_OK != deflateInit(&c_stream, level))
{
logerror("ZLIB: Can't compress (zlib: deflateInit).\n");
logdebug("ZLIB: Can't compress (zlib: deflateInit).\n");
*dst_size = 0;
return;
}
@ -35,28 +35,28 @@ void ZCompressor::_compress(void* dst, uint32 *dst_size, void* src, uint32 src_s
if (Z_OK != deflate(&c_stream, Z_NO_FLUSH))
{
logerror("ZLIB: Can't compress (zlib: deflate)\n");
logdebug("ZLIB: Can't compress (zlib: deflate)\n");
*dst_size = 0;
return;
}
if (c_stream.avail_in != 0)
{
logerror("Can't compress (zlib: deflate not greedy)\n");
logdebug("Can't compress (zlib: deflate not greedy)\n");
*dst_size = 0;
return;
}
if (Z_STREAM_END != deflate(&c_stream, Z_FINISH))
{
logerror("Can't compress (zlib: deflate should report Z_STREAM_END)\n");
logdebug("Can't compress (zlib: deflate should report Z_STREAM_END)\n");
*dst_size = 0;
return;
}
if (Z_OK != deflateEnd(&c_stream))
{
logerror("Can't compress (zlib: deflateEnd)\n");
logdebug("Can't compress (zlib: deflateEnd)\n");
*dst_size = 0;
return;
}