mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[9389] Cleanup config data. Use proper names and expected types.
This commit is contained in:
parent
58d188f21a
commit
ebfb0f9835
63 changed files with 1591 additions and 967 deletions
|
|
@ -87,7 +87,7 @@ bool LoginQueryHolder::Initialize()
|
|||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADSOCIALLIST, "SELECT friend,flags,note FROM character_social WHERE guid = '%u' LIMIT 255", GUID_LOPART(m_guid));
|
||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADHOMEBIND, "SELECT map,zone,position_x,position_y,position_z FROM character_homebind WHERE guid = '%u'", GUID_LOPART(m_guid));
|
||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADSPELLCOOLDOWNS, "SELECT spell,item,time FROM character_spell_cooldown WHERE guid = '%u'", GUID_LOPART(m_guid));
|
||||
if(sWorld.getConfig(CONFIG_DECLINED_NAMES_USED))
|
||||
if(sWorld.getConfig(CONFIG_BOOL_DECLINED_NAMES_USED))
|
||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADDECLINEDNAMES, "SELECT genitive, dative, accusative, instrumental, prepositional FROM character_declinedname WHERE guid = '%u'", GUID_LOPART(m_guid));
|
||||
// in other case still be dummy query
|
||||
res &= SetPQuery(PLAYER_LOGIN_QUERY_LOADGUILD, "SELECT guildid,rank FROM guild_member WHERE guid = '%u'", GUID_LOPART(m_guid));
|
||||
|
|
@ -163,7 +163,7 @@ void WorldSession::HandleCharEnumOpcode( WorldPacket & /*recv_data*/ )
|
|||
{
|
||||
/// get all the data necessary for loading all characters (along with their pets) on the account
|
||||
CharacterDatabase.AsyncPQuery(&chrHandler, &CharacterHandler::HandleCharEnumCallback, GetAccountId(),
|
||||
!sWorld.getConfig(CONFIG_DECLINED_NAMES_USED) ?
|
||||
!sWorld.getConfig(CONFIG_BOOL_DECLINED_NAMES_USED) ?
|
||||
// ------- Query Without Declined Names --------
|
||||
// 0 1 2 3 4 5 6 7
|
||||
"SELECT characters.guid, characters.name, characters.race, characters.class, characters.gender, characters.playerBytes, characters.playerBytes2, characters.level, "
|
||||
|
|
@ -203,7 +203,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
|
||||
if(GetSecurity() == SEC_PLAYER)
|
||||
{
|
||||
if(uint32 mask = sWorld.getConfig(CONFIG_CHARACTERS_CREATING_DISABLED))
|
||||
if(uint32 mask = sWorld.getConfig(CONFIG_UINT32_CHARACTERS_CREATING_DISABLED))
|
||||
{
|
||||
bool disabled = false;
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
uint32 acctcharcount = fields[0].GetUInt32();
|
||||
delete resultacct;
|
||||
|
||||
if (acctcharcount >= sWorld.getConfig(CONFIG_CHARACTERS_PER_ACCOUNT))
|
||||
if (acctcharcount >= sWorld.getConfig(CONFIG_UINT32_CHARACTERS_PER_ACCOUNT))
|
||||
{
|
||||
data << (uint8)CHAR_CREATE_ACCOUNT_LIMIT;
|
||||
SendPacket( &data );
|
||||
|
|
@ -307,7 +307,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
charcount = fields[0].GetUInt8();
|
||||
delete result;
|
||||
|
||||
if (charcount >= sWorld.getConfig(CONFIG_CHARACTERS_PER_REALM))
|
||||
if (charcount >= sWorld.getConfig(CONFIG_UINT32_CHARACTERS_PER_REALM))
|
||||
{
|
||||
data << (uint8)CHAR_CREATE_SERVER_LIMIT;
|
||||
SendPacket( &data );
|
||||
|
|
@ -316,7 +316,7 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
}
|
||||
|
||||
// speedup check for heroic class disabled case
|
||||
uint32 heroic_free_slots = sWorld.getConfig(CONFIG_HEROIC_CHARACTERS_PER_REALM);
|
||||
uint32 heroic_free_slots = sWorld.getConfig(CONFIG_UINT32_HEROIC_CHARACTERS_PER_REALM);
|
||||
if(heroic_free_slots == 0 && GetSecurity() == SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT)
|
||||
{
|
||||
data << (uint8)CHAR_CREATE_UNIQUE_CLASS_LIMIT;
|
||||
|
|
@ -325,16 +325,16 @@ void WorldSession::HandleCharCreateOpcode( WorldPacket & recv_data )
|
|||
}
|
||||
|
||||
// speedup check for heroic class disabled case
|
||||
uint32 req_level_for_heroic = sWorld.getConfig(CONFIG_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING);
|
||||
if(GetSecurity() == SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && req_level_for_heroic > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||
uint32 req_level_for_heroic = sWorld.getConfig(CONFIG_UINT32_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING);
|
||||
if(GetSecurity() == SEC_PLAYER && class_ == CLASS_DEATH_KNIGHT && req_level_for_heroic > sWorld.getConfig(CONFIG_UINT32_MAX_PLAYER_LEVEL))
|
||||
{
|
||||
data << (uint8)CHAR_CREATE_LEVEL_REQUIREMENT;
|
||||
SendPacket( &data );
|
||||
return;
|
||||
}
|
||||
|
||||
bool AllowTwoSideAccounts = sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_ACCOUNTS) || GetSecurity() > SEC_PLAYER;
|
||||
CinematicsSkipMode skipCinematics = CinematicsSkipMode(sWorld.getConfig(CONFIG_SKIP_CINEMATICS));
|
||||
bool AllowTwoSideAccounts = sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_ACCOUNTS) || GetSecurity() > SEC_PLAYER;
|
||||
CinematicsSkipMode skipCinematics = CinematicsSkipMode(sWorld.getConfig(CONFIG_UINT32_SKIP_CINEMATICS));
|
||||
|
||||
bool have_same_race = false;
|
||||
|
||||
|
|
@ -778,7 +778,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)
|
|||
if(sWorld.IsShutdowning())
|
||||
sWorld.ShutdownMsg(true,pCurrChar);
|
||||
|
||||
if(sWorld.getConfig(CONFIG_ALL_TAXI_PATHS))
|
||||
if(sWorld.getConfig(CONFIG_BOOL_ALL_TAXI_PATHS))
|
||||
pCurrChar->SetTaxiCheater(true);
|
||||
|
||||
if(pCurrChar->isGameMaster())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue