[9389] Cleanup config data. Use proper names and expected types.

This commit is contained in:
AlexDereka 2010-02-15 15:28:59 +03:00
parent 58d188f21a
commit ebfb0f9835
63 changed files with 1591 additions and 967 deletions

View file

@ -68,14 +68,14 @@ static void AttemptJoin(Player* _player)
// stop at success join
if(plr->GetGroup()->AddMember(_player->GetGUID(), _player->GetName()))
{
if( sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
if( sWorld.getConfig(CONFIG_BOOL_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
_player->LeaveLFGChannel();
break;
}
// full
else
{
if( sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && plr->GetSession()->GetSecurity() == SEC_PLAYER )
if( sWorld.getConfig(CONFIG_BOOL_RESTRICTED_LFG_CHANNEL) && plr->GetSession()->GetSecurity() == SEC_PLAYER )
plr->LeaveLFGChannel();
}
}
@ -126,20 +126,20 @@ static void AttemptAddMore(Player* _player)
// stop at join fail (full)
if(!_player->GetGroup()->AddMember(plr->GetGUID(), plr->GetName()) )
{
if( sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
if( sWorld.getConfig(CONFIG_BOOL_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
_player->LeaveLFGChannel();
break;
}
// joined
if( sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && plr->GetSession()->GetSecurity() == SEC_PLAYER )
if( sWorld.getConfig(CONFIG_BOOL_RESTRICTED_LFG_CHANNEL) && plr->GetSession()->GetSecurity() == SEC_PLAYER )
plr->LeaveLFGChannel();
// and group full
if(_player->GetGroup()->IsFull() )
{
if( sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
if( sWorld.getConfig(CONFIG_BOOL_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
_player->LeaveLFGChannel();
break;
@ -189,7 +189,7 @@ void WorldSession::HandleLfgClearOpcode( WorldPacket & /*recv_data */ )
for(int i = 0; i < MAX_LOOKING_FOR_GROUP_SLOT; ++i)
_player->m_lookingForGroup.slots[i].Clear();
if( sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
if( sWorld.getConfig(CONFIG_BOOL_RESTRICTED_LFG_CHANNEL) && _player->GetSession()->GetSecurity() == SEC_PLAYER )
_player->LeaveLFGChannel();
SendLfgUpdate(0, 0, 0);