P7: Small clean-up.

Signed-off-by: Gyx <2359980687@qq.com>
This commit is contained in:
Gyx
2012-01-08 11:35:00 +08:00
parent d0e201eafe
commit 79e7e86384
2 changed files with 2 additions and 22 deletions

View File

@@ -1242,12 +1242,7 @@ void World::SetInitialWorldSettings()
//No SQL injection as values are treated as integers
// not send custom type REALM_FFA_PVP to realm list
uint32 server_type;
if (IsFFAPvPRealm())
server_type = REALM_TYPE_PVP;
else
server_type = getIntConfig(CONFIG_GAME_TYPE);
uint32 server_type = IsFFAPvPRealm() ? REALM_TYPE_PVP : getIntConfig(CONFIG_GAME_TYPE);
uint32 realm_zone = getIntConfig(CONFIG_REALM_ZONE);
LoginDatabase.PExecute("UPDATE realmlist SET icon = %u, timezone = %u WHERE id = '%d'", server_type, realm_zone, realmID); // One-time query
@@ -2797,8 +2792,8 @@ void World::LoadDBVersion()
if (result)
{
Field* fields = result->Fetch();
m_DBVersion = fields[0].GetString();
m_DBVersion = fields[0].GetString();
// will be overwrite by config values if different and non-0
m_int_configs[CONFIG_CLIENTCACHE_VERSION] = fields[1].GetUInt32();
}

View File

@@ -22,21 +22,6 @@
#include "Utilities/ByteConverter.h"
#include <cassert>
/*enum
{
FT_NA='x', //not used or unknown, 4 byte size
FT_NA_BYTE='X', //not used or unknown, byte
FT_STRING='s', //char*
FT_FLOAT='f', //float
FT_INT='i', //uint32
FT_BYTE='b', //uint8
FT_SORT='d', //sorted by this field, field is not included
FT_IND='n', //the same, but parsed to data
FT_LOGIC='l', //Logical (boolean)
FT_SQL_PRESENT='p', //Used in sql format to mark column present in sql dbc
FT_SQL_ABSENT='a' //Used in sql format to mark column absent in sql dbc
};*/
class DBCFileLoader
{
public: