[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

@ -82,7 +82,7 @@ void Channel::Join(uint64 p, const char *pass)
if(plr)
{
if(HasFlag(CHANNEL_FLAG_LFG) &&
sWorld.getConfig(CONFIG_RESTRICTED_LFG_CHANNEL) && plr->GetSession()->GetSecurity() == SEC_PLAYER &&
sWorld.getConfig(CONFIG_BOOL_RESTRICTED_LFG_CHANNEL) && plr->GetSession()->GetSecurity() == SEC_PLAYER &&
(plr->GetGroup() || plr->m_lookingForGroup.Empty()) )
{
MakeNotInLfg(&data);
@ -96,7 +96,7 @@ void Channel::Join(uint64 p, const char *pass)
plr->JoinedChannel(this);
}
if(m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL) ))
if(m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getConfig(CONFIG_BOOL_SILENTLY_GM_JOIN_TO_CHANNEL) ))
{
MakeJoined(&data, p);
SendToAll(&data);
@ -150,7 +150,7 @@ void Channel::Leave(uint64 p, bool send)
bool changeowner = players[p].IsOwner();
players.erase(p);
if(m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getConfig(CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL) ))
if(m_announce && (!plr || plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || !sWorld.getConfig(CONFIG_BOOL_SILENTLY_GM_JOIN_TO_CHANNEL) ))
{
WorldPacket data;
MakeLeft(&data, p);
@ -342,7 +342,7 @@ void Channel::SetMode(uint64 p, const char *p2n, bool mod, bool set)
// allow make moderator from another team only if both is GMs
// at this moment this only way to show channel post for GM from another team
if( (plr->GetSession()->GetSecurity() < SEC_GAMEMASTER || newp->GetSession()->GetSecurity() < SEC_GAMEMASTER) &&
plr->GetTeam() != newp->GetTeam() && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL) )
plr->GetTeam() != newp->GetTeam() && !sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CHANNEL) )
{
WorldPacket data;
MakePlayerNotFound(&data, p2n);
@ -398,7 +398,7 @@ void Channel::SetOwner(uint64 p, const char *newname)
return;
}
if(newp->GetTeam() != plr->GetTeam() && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
if(newp->GetTeam() != plr->GetTeam() && !sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
{
WorldPacket data;
MakePlayerNotFound(&data, newname);
@ -446,7 +446,7 @@ void Channel::List(Player* player)
size_t pos = data.wpos();
data << uint32(0); // size of list, placeholder
AccountTypes gmLevelInWhoList = (AccountTypes)sWorld.getConfig(CONFIG_GM_LEVEL_IN_WHO_LIST);
AccountTypes gmLevelInWhoList = (AccountTypes)sWorld.getConfig(CONFIG_UINT32_GM_LEVEL_IN_WHO_LIST);
uint32 count = 0;
for(PlayerList::const_iterator i = players.begin(); i != players.end(); ++i)
@ -538,7 +538,7 @@ void Channel::Say(uint64 p, const char *what, uint32 lang)
{
if(!what)
return;
if (sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
if (sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
lang = LANG_UNIVERSAL;
uint32 sec = 0;
@ -606,7 +606,7 @@ void Channel::Invite(uint64 p, const char *newname)
if (!plr)
return;
if (newp->GetTeam() != plr->GetTeam() && !sWorld.getConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
if (newp->GetTeam() != plr->GetTeam() && !sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_CHANNEL))
{
WorldPacket data;
MakeInviteWrongFaction(&data);